-
Notifications
You must be signed in to change notification settings - Fork 38
Add Library #88
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
base: master
Are you sure you want to change the base?
Add Library #88
Conversation
5df0a57 to
82c305f
Compare
|
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? |
|
I like this idea, but there are two things I would want it to do before merging:
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. |
|
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". |
|
Okay perfect, I was thinking of sqlite as an option! I will push the code in the upcoming days. |
|
Added a Sqlite database along with migrations. However, I'm not completely sure how the scanning part works. |
|
Awesome, I'll probably have time to look into this more some time next week, and I'll add in the scanning stuff |
|
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? |
|
Yeah, that would be important. I would suggest infinite scrolling to be consistent with how the search results tab works |
|
Added infinite scroll until it reaches the end of the table. |
Add infinite scrolling and fix selecting rows
9c69f2f to
cd8cc71
Compare
|
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. |
Added functionality for exporting and importing downloaded songs, so it becomes easier to share setlists between friends when playing multiplayer.