Caching + New Search Algorithm + Update Liked Songs - #126
FlaShHolloway wants to merge 19 commits into
Conversation
…y track link, including caching search results in a JSON file."
… and `search` commands; modified `search_songs` method in `ytmusic.py` to use new `get_best_fit_song_id_v2`
… and modified YTMusicTransfer class to use path variable for lookup.json file
…rithm, and refactored code in controllers, main, spotify, and ytmusic modules.
…normalization, modified scoring logic, and added extended search functionality."
…or text normalization, modified logic for caching and searching YouTube Music IDs.
…th a new one in lookup.json and made minor changes to controllers.py and main.py
…e song matching logic, added new variables and conditions, and modified scoring system.
|
In |
…default (All can be removed and re-added via --reset flag)
|
Hi man, I appreciate the effort, but this MR is way too big. The key in open source is to do incremental changes, not huge refactors doing everything at once In addition it would be great if you could point out what problems with the existing lib you are trying to fix (esp. regarding song matching) |
|
Understood! I appreciate your response. Here is what I faced and trying to fix:
You're correct, this all should've been incremental changes and not huge refactors, I'll keep that in mind next time. If you want, I can remove/revert any changes that doesn't seem important. I've added tests for new features. Lessons learned! |
|
Hi, just checking if there is any plans on implementing the code here? Either in separate smaller commits, or as a large one commit? I am quite interested in having this option of updating playlists by appending instead of replacing the entire playlist. |
|
I ditched Spotify completely so I rarely use this now. Open to ideas. |
|
I don't mind merging as long as it's one feature at a time. The current size is impossible to review. I like that most of the features are opt in. |
|
Alright, I`ll try. |
|
Caching and search CLI have been merged. |
|
Next I'll go for updating existing |
|
Should I create a separate command like |
|
I'm a bit confused to be honest. Maybe you could list all the possible use cases that aren't supported right now and we decide from there? |
|
Sure. I'll mention few:
|
|
@darshiz as you can see the option to append instead of replace already exists
The only new request I can tell from your comment is the ability to "exclude" tracks from the update by respecting what a user has manually removed? For example |
|
@sigma67 yes, update does the same thing, but once playlist is large enough, after a point, I could not update my playlist no matter how many times I tried, I kept getting timed out (The part were all tracks are removed and then immediately adding all the tracks back). I tried sleep timer (upto a minute) but didn't work either. And |
|
You're right, instead of making a whole new command, if append works as expected, only adding liked playlist support & |
|
Thank you very much for the hard work guys! I really appreciate the effort to get this committed into the main branch! Quick question on the |
|
@darshiz by default if you do not add |
|
Ah perfect, thank you for the clarification @FlaShHolloway @sigma67 would you be able to release an updated compiled version with the newly merged commit please? |
|
@sigma67 did something changed with |
|
@sigma67 Just realized it has already been discovered and fixed for |
|
Hi guys, I've tried using the If I remove the Can you please help me? |
Cheers thank you @FlaShHolloway! |
Description:
--use-cachedflag to create or use the cache.fix-matchcommand, which allows you to replace a bad match with a preferred video ID. This works only if you use the--use-cachedflag to ensure consistency in fetching that ID.cache-clearcommand, which removes the lookup file.--extended-searchflag. You can adjust the confidence level (optional) (e.g.--confidence 0.6) for better match quality (range 0-1).--search-albumsflag. It’s slower as it searches through all albums but has a higher probability of yielding good matches.--enable-fallbackoptional flag can be used to fall back to the default search algorithm if no matches are found within the specified confidence level. It ensures that at least something is returned from YouTube Music, even if it’s not a perfect match.searchoption can be used to search a Spotify's Youtube Music equivalent, all the same arguments as above can be used (i.e.--extended-search,--search-albums, etc.) to individually check matches or simply add a single song to lookup file using--use-cachedflag.Testing: