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
Metadata syncing rework #349
Conversation
|
||
|
||
def find_library(server, item): | ||
from database import get_sync |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to move import to top of file instead of in function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't work. No, I don't know why, but it throws import errors in the database init. Mystery for another day, imo.
I got the "error with sync" dialog come up doing a sync of all the libraries.
Looks like that section of code might just need indented one more level
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
It was throwing errors if a server doesn't have any collections defined. good catch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good now. Music sync is significantly faster. Great work
Started as just polishing music syncing, but ... the codebase forced more changes. Massively increases music sync speed.
Using a library of 9300 songs:
Fixes #347 and fixes #122
Side effect is that each object type now inherits
library
as an attribute instead of being passed in during each function call.Example:
Also gets rid of the
library_check
wrapper. This gives some improvement to initial sync times for all media types, but it's not super significant. Most of the speed improvements come from music syncing only using 3 api calls instead of potentially several thousand depending on library size.