Shuttle2
Shuttle2 copied to clipboard
Rescanning the local S2 media provider merges playlists
🌎 Environment
S2 built from sources (current main
branch)
💬 Description
Rescanning the local S2 media provider merges playlists instead of replacing them
🦶 Reproduction Steps
- Have a
stuff.m3u
on the disk, with this contentA/a.mp3 B/b.mp3 C/c.mp3
- Add a S2 Media Provider
- It successfully imports a playlist named
stuff
, with these 3 items - On the disk, modify
stuff.m3u
so that it now containsA/a.mp3 D/d.mp3 C/c.mp3
- In S2, click
Rescan
Expected result (I think):
The stuff
playlist now contains the items as they are on the disk, because we've just scanned the disk
Actual result:
The stuff
playlist contains a merged version of the previous content and the one from the disk:
- A
- B
- C
- D
Expected result is not very clear actually. @timusus , what is the "rescan" philosophy after all? The code has a great support for "updating" scanned playlists instead of bluntly replacing them (see e.g. MediaImporter.PlaylistUpdateData
).
Is this on purpose?
The described behaviour looks like a bug to me, but maybe there are other workflows where this is actually expected? 🤔
Edit: totally removing the S2 Media Provider before adding it again "correctly" imports the stuff
playlist with its content from disk. Am I supposed to use this workflow instead?
In this case, should we rephrase the "rescan" button (or description) to explain the difference between removing/adding the provider again?
There is a deliberate effort to ensure that playlists don't get overwritten during a scan.
I haven't thought about this for some time.. The worry is that you might import a playlist - so it's no longer based on its 'm3u' source, but is now just a 'local' S2 playlist. Then, if you make changes to it, you might not want those changes overwritten when you rescan your library.
One possible solution would be to provide this option as a checkbox.. some sort of UI to indicate whether you want to 'merge' or 'replace'..