musiqpad / mqp-server

NodeJS server base for hosting an individual pad
MIT License
30 stars 18 forks source link

[Bug] Weird Playlist Duplication bug #9

Closed ImExiled closed 8 years ago

ImExiled commented 8 years ago

Well.... Playlists like to dupe songs. A lot.

http://i.imgur.com/CfR9AkB.png

The playlists above are imported straight from plug. I shouldn't have 721 tracks.

There are like 18 copies of "Nightcore - Senpai" down the list.

Please fix ;_;

explodingcamera commented 8 years ago

Just tried it too and I'm not having any problems, maybe check if your exported json had the duplicates in it?

virtuaCode commented 8 years ago

Same bug here...

bug_media

explodingcamera commented 8 years ago

I was using leveldb so probably only using mysql

virtuaCode commented 8 years ago

It seems like only playlists that were imported as a file are affected by this bug.

ImExiled commented 8 years ago

Indeed. I don't like deleting many many copies of tracks via PhpMyAdmin. There are literally hundreds upon hundreds of dupes I would need to get rid of. Screencap: http://i.imgur.com/KgJg6lE.png

Also when I say hundreds upon hundreds of dupes, I dont mean hundreds of the same song. I mean hundreds of dupelicated tracks in general. Example in the screencap.

foodbandlt commented 8 years ago

I'll try to look into this a little deeper tonight. @DerpgonCz wrote the MySQL code, so I've yet to look at it.

ImExiled commented 8 years ago

@foodbandlt Alright then ;3

virtuaCode commented 8 years ago

If you need a solution immediately you could delete all duplicates on the 'media' table and create a unique constraint for 'cid' and 'pid':

ALTER IGNORE TABLE media
ADD UNIQUE INDEX uq_media (pid, cid);
ImExiled commented 8 years ago

@virtuaCode Thanks for the help, i'll try when I get some free time.

ImExiled commented 8 years ago

The amount of confusion with that close/reopen there :|

foodbandlt commented 8 years ago

We thought the issue was solved, but after more testing found that it wasn't. Still needs to be looked into.

ImGrumpy commented 8 years ago

I have a couple of users commenting this morning that this https://github.com/musiqpad/mqp-server/issues/9#issuecomment-199803977 is true and still happening. They are using the DT importer. Looks like the import works OK, but on refresh they have multiple copies of each song.

DerpgonCz commented 8 years ago

@ImGrumpy I will try to check it today