Skip to content

Conversation

@Myxelium
Copy link

@Myxelium Myxelium commented Mar 21, 2025

Added functionality for exporting and importing downloaded songs, so it becomes easier to share setlists between friends when playing multiplayer.

image

@Myxelium Myxelium closed this Mar 21, 2025
@Myxelium Myxelium reopened this Mar 21, 2025
@Myxelium Myxelium force-pushed the tracklist-update branch 4 times, most recently from 5df0a57 to 82c305f Compare March 22, 2025 00:31
@Myxelium
Copy link
Author

Not the best solution with localstorage since it's capped at 5mb, probably a database or electron-store would be more suitable.

And I'm not sure if the chart Data input for the download method has to contain so much data for it to being able to download?

@Geomitron
Copy link
Owner

I like this idea, but there are two things I would want it to do before merging:

  • Scan the chart library directory automatically and add charts from there
  • Store the data in a more scalable place, like you said

The first can be done by adding some code to the electron side, which I already have in the Chorus Encore server code. I can try doing that part. I don't have a lot of time at the moment, but I can get that done if you use a better system for data storage :)

@Myxelium
Copy link
Author

Myxelium commented Mar 25, 2025

I like this idea, but there are two things I would want it to do before merging:

  • Scan the chart library directory automatically and add charts from there
  • Store the data in a more scalable place, like you said

The first can be done by adding some code to the electron side, which I already have in the Chorus Encore server code. I can try doing that part. I don't have a lot of time at the moment, but I can get that done if you use a better system for data storage :)

I'm wondering how It's going to work, scanning charts if the chart library directory contains charts that don't exist on Chorus? Will it try to search for each chart and then if Chorus have it, then add? I'm just worried about the amount of searches it would do.

About the data storage, do you have any preference?

Also, I'm thinking of renaming this to Setlist instead of Playlist since it seems more commonly used in the community.

@Geomitron
Copy link
Owner

For charts that aren't on Chorus, it can have a separate column on the table that says if the chart exists on Chorus. I'll see if I can make an endpoint that will do a bulk check against the database if you provide a list of chart hashes.

After a little bit of research, it seems like https://www.npmjs.com/package/sqlite3 would be the best option for storing the data locally, but it will take some work to set up.

I would want this tab to be named "Library" and moved to the second tab. Then it would show all charts in your library, and the buttons would be labeled "Import Setlist" and "Export Setlist".

@Myxelium
Copy link
Author

Okay perfect, I was thinking of sqlite as an option! I will push the code in the upcoming days.

@Myxelium Myxelium closed this Mar 27, 2025
@Myxelium Myxelium deleted the tracklist-update branch March 27, 2025 17:08
@Myxelium Myxelium restored the tracklist-update branch March 27, 2025 17:10
@Myxelium Myxelium reopened this Mar 27, 2025
@Myxelium
Copy link
Author

Added a Sqlite database along with migrations. However, I'm not completely sure how the scanning part works.

@Geomitron
Copy link
Owner

Awesome, I'll probably have time to look into this more some time next week, and I'll add in the scanning stuff

@Myxelium Myxelium changed the title Add playlists Add Library Mar 28, 2025
@Myxelium
Copy link
Author

Myxelium commented Apr 13, 2025

On afterthought, the table should probably have pagination or Infinite Scrolling since some people have 4000+ songs which might be slow to load into the table for some computers. Should I take a look at it?

@Geomitron
Copy link
Owner

Yeah, that would be important. I would suggest infinite scrolling to be consistent with how the search results tab works

@Myxelium
Copy link
Author

Myxelium commented May 4, 2025

Added infinite scroll until it reaches the end of the table.

@Myxelium
Copy link
Author

Myxelium commented Sep 16, 2025

Need to use sql.js with typeorm instead of the sqlite npm package, otherwise it will be a pain in the ass to get the builds working on multiple platforms. With sql.js it will still use sqlite db file.

Can do this change when I have time possibly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants