frondeus / fvtt-syrin-control

Syrinscape Online Control plugin for FoundryVTT
MIT License
16 stars 6 forks source link

0.4.0-beta2: importing a soundset that was already imported creates a duplicate #73

Open Majea opened 1 year ago

Majea commented 1 year ago

Describe the bug

Let's say you have a soundset A that you imported into Foundry. You start mapping moods from that soundset to your scenes. Then you create a new scene and also create a new mood for that scene in the same soundset.

What happens: a new playlist named A is created. The old A playlist stays there. You now have duplicate playlists with slightly different content. If I delete the old playlist, then my scenes are no longer mapped to a mood and I have to do the mapping again with the new playset

What I would expect: the "import soundset" function detects that the same soundset was already imported and either (1) update the existing one or (2) ask the user whether he prefers to update the existing one or create a new one.

To Reproduce

  1. import a soundset (A)
  2. => playlist A is created
  3. map mood M from A to scene S
  4. add a new mood N to A
  5. import the soundset A again
  6. => A second playlist called A is created. The new playlist contains N, unlike the old one.
  7. delete the old A playlist
  8. => S is no longer linked to M

Expected behavior

When a soundset that was already imported before is imported again:

frondeus commented 1 year ago

With this one I'm not sure what to do honestly. The idea is - I don't want to force any kind of synchronization between Playlist and Soundset because that limits GM's creativity.

What if you want to keep the playlist called "Awesome tracks" that should contain X different moods from different soundsets?

Should the synchronization be only limited to created playlists by SyrinControl but should I also allow to move mood playlist item from "controlled" playlist to custom one? (detaching the link between mood and soundset).

I'm not saying "no". Just I'd like to make a clear specification how the plugin should behave not only in green path.

Majea commented 1 year ago

So, let me first explain how I work and why I introduced this ticket. I'm typically using the same sound set for several scenes. So, I have different moods from the same sound set that are assigned to different scenes. But when I design my world, I tend to work scene by scene, adding the moods to the sound set when I switch from one scene to the other. So, when I add a new scene, I also add a new mood, and I have to reimport the sound set. But since it comes as a new playlist in foundry, I'm facing 2 choices: either I keep many duplicate playlists which are copies of the sound set at different points in time, or I delete the old one to keep my foundry world clean and only have the latest version of the sound set registered. I prefer the second case, but if I delete the old playlist, then I have to redo the mapping of all the scenes I worked on before.

Another possibility is that I create 1 sound set for each scene in syrinscape, but I guess that it's just moving the clutter from one place to the other in the end.

Is it possible that, when the user clicks on the "import sounsets" button and selects 1 or more soundsets to process, the plugin checks if there is already a playlist for a soundset and ask the user whether he prefers to create a new one or merge with the existing one? If we merge, it's important to keep the same ids for the moods that already existed before so that the mapping in the existing scenes is not lost.

Another possibility could also to have this option in the plugin configuration but that would assume that users will always want to have a duplicate or always want to merge. From what you explained above, I guess that it could depend on what they are doing at that moment.

frondeus commented 1 year ago

Okay, sure, I can see that being useful :)

frondeus commented 1 year ago

Okay, I think this is now more a feature request than an actual bug. I would call it "papercut" but since I don't want to introduce a new label, I will mark it as an enhancement and focus on it within the next release cycle.