JacobMcAuley / playlist_import

A module for Foundry VTT for importing playlists.
GNU General Public License v3.0
7 stars 13 forks source link

Duplicate playlists, `<original>-1` #54

Open VelniasQ opened 1 year ago

VelniasQ commented 1 year ago

Module Version: v1.7.5

Describe the bug When I import the playlist first time everything is great. When I do it the second time, the playlist have the name like <original>-1 If I do it again, the playlists with names like <original>-1 are updated.

Expected behavior The playlists are imported by their original names <original>, not <original>-1.

Screenshots image image

Browser:

Foundry Version: Latest 9

Game System: Tested on Starfinder, but I have this issue in different systems.

Additional context ~50 modules, but this is the only module that's related to sound.

p4535992 commented 1 year ago

Maybe i don't understand the use case, but can't you just delete the imported playlists with the button and import again ? The module do not "merge" the folder with the same name .

VelniasQ commented 1 year ago

If I delete the imported playlists, foundry will unlink my soundtracks. The IDs will be changed: image

I want to re-import the playlists from time to time, when I update my music library. But I don't want to re-assign the soundtracks.

tcj-one commented 1 year ago

Yeah this is a very inconvenient problem. It also breaks the Video Game Music module, which relies on actors and scenes being configured with playlists. It just isn't viable to reattach all the playlists after they get deleted every single import.

I feel like the option "Override Playlist" should be doing something here, but isn't. I assume the intent was to take the existing playlist of the same name, and force it to match the files now in the directory, rather than making a duplicate playlist, which I would again assume should only happen when Override is unchecked.

Not sure if the code for that got broken, or it's doing something else beyond my understanding.

This is also breaking much simpler use cases like wanting your playlists to always be shuffled. If they're deleted and remade, they lose the shuffle setting. If they just get overridden with new tracks, the shuffle status would remain active.