Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated tracks aren't deduplicated in albums #180

Closed
notinecrafter opened this issue Oct 14, 2021 · 3 comments
Closed

Duplicated tracks aren't deduplicated in albums #180

notinecrafter opened this issue Oct 14, 2021 · 3 comments
Milestone

Comments

@notinecrafter
Copy link

If you have an album twice, and have it correctly tagged with musicbrainzid, the scanner will nicely detect the duplicate tracks.
When you then go to the album in lms, all of the tracks still show up twice.

It would be great if lms were to realise all the tracks are duplicate and only show them once.

@epoupon
Copy link
Owner

epoupon commented Oct 14, 2021

Do you want to eventually keep duplicate tracks?
Lms exposes a scan report to list them to help users clean their database.
Duplicate tracks are not supposed to exist, but maybe there are legitimate cases when you want to keep your duplicate tracks?

@notinecrafter
Copy link
Author

We have a rather unique situation, where our music is supplied by several individual users. They put their music in their own folders, which they also use for their personal offline players, and sync them to our server, where they're indexed by LMS. So if two people have the same album, we'll have duplicate tracks; but we don't want to remove those, because that means one of our users don't have the track offline anymore.

I was going to submit a pull request that would remove all but one of a set of duplicates from the db after scanning (with a toggle in the conf), but I though I'd submit an issue in advance.

Our previous music server (Ampache) had the option to enable/disable tracks; disabled tracks were unplayable and wouldn't show up in playlists. You could also make something like this, with duplicates automatically being disabled. Would be a cleaner solution, but also much more effort.

@epoupon
Copy link
Owner

epoupon commented Oct 15, 2021

Ok I understand :)
Indeed we could just skip tracks that are already in the database and keep the first once scanned.
It would work since missing tracks are checked first at the beginning of the scan process (i.e. meaning no risk to skip a track and later remove the only one we have since it was removed).
And it has the advantage to keep the existing track when a duplicate one is added, to keep stats, stars, etc.
But for migration, we would still need to remove duplicates if they already exist.

@epoupon epoupon added this to the v3.28.0 milestone Oct 15, 2021
@epoupon epoupon pinned this issue Feb 1, 2022
@epoupon epoupon closed this as completed Feb 2, 2022
@epoupon epoupon unpinned this issue Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants