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

MelodyMania Beta: Using the SongFileCache mod duplicates every song in "Sing" View #471

Open
massenmensch opened this issue Sep 23, 2024 · 5 comments

Comments

@massenmensch
Copy link

massenmensch commented Sep 23, 2024

Issue type: Bug report

Actual behaviour

Songs are shown duplicated in song view.

Expected behaviour

Song view loads every song duplicated.

Steps to reproduce

  • Reproducible (mark with x): [x] always, [ ] sometimes
  1. Set Song Folder in SongFileCache Mod
  2. Activate Mod and Caching Option
  3. Wait for Cache to be loaded
  4. Restart MelodyMania
  5. Click "Sing" to go to song view

Details

After restarting the songs are being loaded from the cache file, but the song view loads every song duplicated. The songs are somehow grouped by artist but repeat after all songs by the artist have been listed.

  • Screenshots:
    image
    image

  • Song folder is disabled:

image

  • Command output of ls in song folder:
drwxr-xr-x 1 username 197609 0 Sep 23 17:23  ./
drwxr-xr-x 1 username 197609 0 Sep 23 16:55  ../
drwxr-xr-x 1 username 197609 0 Mar 17  2024 'ABBA - Super Trouper'/
drwxr-xr-x 1 username 197609 0 Mar 17  2024 'ABBA - Take A Chance On Me'/
drwxr-xr-x 1 username 197609 0 Mar  7  2024 'Adele - Hello'/
drwxr-xr-x 1 username 197609 0 Mar  7  2024 'Alicia Keys - Fallin’'/
  • Command output of ls in single song folder:
-rw-r--r-- 1 username 197609   320594 Mar 17  2024 'ABBA - Super Trouper [BG].jpg'
-rw-r--r-- 1 username 197609   776614 Mar 17  2024 'ABBA - Super Trouper [CO].jpg'
-rw-r--r-- 1 username 197609  8018652 Mar 17  2024 'ABBA - Super Trouper.mp3'
-rw-r--r-- 1 username 197609     9016 Mar 17  2024 'ABBA - Super Trouper.txt'
-rw-r--r-- 1 username 197609 21041942 Jan 19  2024 'ABBA - Super Trouper.webm'

System Info

  • Game version: MelodyMania 1.4.2-beta1
  • Operating System and version: Windows 10 (64 bit)
@achimmihca
Copy link
Collaborator

achimmihca commented Nov 8, 2024

Thank you for the detailed bug report.

  • The config and log file look good to me.

    • Also I cannot reproduce the issue.
  • Is the number of songs correct in the song select when you enable in "Design" options "Show Song Index in Song Select"?

  • Are the duplicate songs still present after you restarted Melody Mania?

    • Is this still reproducible when you delete the mod files and start anew?
  • What are your settings for the song order (you can change these in the song select, the button next to the search bar)?

Not sure what the reason for the issue is.

You might want to try on-demand loading of songs as an alternative to the cache. This can be enabled in the song library options.

@massenmensch
Copy link
Author

Hi, thanks for your response.

The issue is unfortunately still reproducible on two Windows machines on which I tested this.

The number of songs displayed is also not correct. I have set up a minimal example of 5 song folders, each containing one TXT file. After activating the mod and restarting the game, the number of songs is displayed as "10". I have also noticed, that the number of songs displayed increases by 5, each time I deactivate and activate the SongFileCache mod (without restarting the game in between). It seems to me that the cache is being saved and loaded correctly, but when starting the game or activating the extension, the game somehow does not replace the current song list, but appends it.

Restarting MelodyMania does not change anything unfortunately. I have also deleted all mod files at C:\Users\<user>\AppData\LocalLow\melodymania\Melody Mania\ModsPersistentData\SongFileCache and started a new run of caching song files, still the issue persists.

Changing the song order does not help as well. I tried all available options.

Is there any other way to debug this issue further? Until this works I'm probably going to use the on-demand loading option.

@achimmihca
Copy link
Collaborator

Maybe there is a misconception.
The current mod is intended to load songs from cache on startup, instead of using a song folder.
From the mod description: "use this mod's settings instead of a regular song folder".

the number of songs displayed increases by 5, each time I deactivate and activate the SongFileCache mod

I admit, this could be better. However, it runs only once when starting the game, so should work "good enough".

when starting the game or activating the extension, the game somehow does not replace the current song list, but appends it

I agree. Maybe not well done but currently expected behavior.
This is why it should be used instead of a song folder. Otherwise, duplicate songs are expected.

So, here is what you could try:

  • disable all song folders
  • configure one song folder in the mod and enable it
  • restart the game
  • now, only the mod should loads songs, possibly from cache.

Sorry for the confusion.
This mod was hacked together in few hours, in the intention that it might be useful for someone.
However, given the confusion it causes and that it does not work well together with other song folders, I think it makes more sense to remove this mod completely. I don't want to maintain this.

If you have a large song library, then on-demand song loading might be the better choice.

@massenmensch
Copy link
Author

Hi, I'm sorry for the confusion my bug description might have caused. I use the mod as you described, using it instead of activating the folder as a song folder. Currently there is no song folder activated, I even "deleted" all song folders in the "Songs" settings in Melody Mania by using the trashcan icon.

I find this mod to be very useful because on-demand Song loading sometimes stutters and all in all makes the experience when using Melody Mania not as smooth as I want it to be, therefore I loved using this mod while it still worked on my installation. On the other hand I can understand that you don't want to maintain it, as the user base might be too small and the description causes more confusion than utility for users.

@achimmihca
Copy link
Collaborator

I use the mod as you described, using it instead of activating the folder as a song folder. Currently there is no song folder activated

In this case, there should be no duplicate songs.

Don't know what is the issue here. As I said, I cannot reproduce. And don't want to maintain this.

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