-
Notifications
You must be signed in to change notification settings - Fork 685
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
File: Implemented get_images for file library #1925
base: main
Are you sure you want to change the base?
File: Implemented get_images for file library #1925
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1925 +/- ##
===========================================
- Coverage 76.78% 76.51% -0.27%
===========================================
Files 55 55
Lines 4691 4714 +23
===========================================
+ Hits 3602 3607 +5
- Misses 1089 1107 +18
Continue to review full report at Codecov.
|
cb67ec3
to
57678c7
Compare
Implements #1895 |
* Added get_images implementation to extract artwork from metadata and store in cache_dir.
57678c7
to
7f189d2
Compare
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.
I think updating the commit message with a brief explanation of how this works would be helpful. We could also do with more tests exercising the various ways this can fail, some of which are not yet handled. Note I am still yet to actually test this myself.
* Fetches image from track metadata if available. * Introduced new extension variable `folder_image_names` to configure the image names for folder-based cover arts. * Fetches folder based image if present and name matches one of the names in `folder_image_names`. * Returns a tuple of Image for each uri. * The image uri is base64 encoded so that it is accessible to clients other than localhost. * Added error handling incase _scanner.scan fails
0dd0045
to
b021af6
Compare
continue | ||
for i in self._folder_image_names: | ||
if (path.uri_to_path(uri).parent / i).exists(): | ||
with open(path.uri_to_path(uri).parent / i, "rb",) as f: |
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.
The trailing comma near the end of the open()
call can be removed.
It would be great to get this one merged. Is any help needed? |
Since this was last worked on, the project has been moved to Github Actions. At the very least it will need to be rebased on top of the master branch and force-pushed so that the latest CI can run. @parth-verma Do you think you'll have time to do this in the near future? If not, I'll see if I can pick it up. |
Fetches image from track metadata if available.
Introduced new extension variable
folder_image_names
to configure the image names for folder-based cover arts.Fetches folder based image if present and name matches one of the names in
folder_image_names
.Returns a tuple of Image for each uri.
The image uri is base64 encoded so that it is accessible to clients other than localhost.
Added error handling incase _scanner.scan fails