Jellyfin Forum
Find duplicate entries in playlist - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Find duplicate entries in playlist (/t-find-duplicate-entries-in-playlist)



Find duplicate entries in playlist - pixel24 - 2023-08-26

Hi@all,

I love randomness and listening to music across genres. This is also great in Jellyfin. Whether at home on the computer or on the road in the car with the Jellyfin app. I open my Bilbilothe and start the random playback. Regularly songs are played that I really like and I did not know yet. These are then inserted into various playlists. Sometimes it happens that the same song is inserted several times.

Do I have a way to show me duplicate entries in playlists? Or sort the playlist by title to find multiple entries?

with best
pixel24


RE: Find duplicate entries in playlist - TheDreadPirate - 2023-08-26

In my testing I cannot add the same listing for a song more than once to a playlist.   I am then assuming these are duplicate music files in the file system.

In the Jellyfin UI, I am not aware of a way to sort playlists.  I'm hoping you are on Linux.  With some Linux bash sorting you can find duplicates in the playlist.xml if the file names are the same.

Code:
cd /var/lib/jellyfin/data/playlists/TestPlaylist
grep Path playlist.xml | sed 's/<Path>//g' | sed 's/<\/Path>//g' | awk -F '/' '{print $NF}' | sort | uniq -c
      1 00 Lilium.mp3
      1 01 2112.mp3
      1 04 Castle.mp3

If these are duplicate songs within your file system, the better solution is use something like dupeGuru.  In addition to looking for duplicate file names, it can also analyze the contents to find duplicate files with different file names.

https://dupeguru.voltaicideas.net/

I recommend backing up whatever folder you analyze.  I didn't have issues with false positives when I was trimming dupes in my music collection, but it is better to be safe.


RE: Find duplicate entries in playlist - pixel24 - 2023-08-27

Sorry for this misinformation! I have tested it. If I add a track to a playlist by mistake no message is displayed. But Jellyfin adds the track only once :-)

Yes, I use Linux.