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

Add Search Caching #5

Open
aag opened this issue Jul 8, 2019 · 0 comments
Open

Add Search Caching #5

aag opened this issue Jul 8, 2019 · 0 comments

Comments

@aag
Copy link
Owner

aag commented Jul 8, 2019

The current code does a YouTube search for every song in every playlist. This is a problem because the current Google API credits system ranks searches as very expensive, so a normal account doesn't have enough credits to search for all the songs in every playlist in a single day.

Since the songs in the charts don't change that quickly, and some songs are in multiple playlists, we can do better by caching the search results. We should write the video ID and creation date to a file (perhaps a Shelve or an SQLite file) each time we do a search, and always look for an entry in the cache before doing a search. We could also clean up old entries after a certain amount of time, maybe a year.

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

1 participant