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

Save covers directly into covers dir #306

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

City-busz
Copy link
Contributor

Instead of saving the pixbuf of the new cover into a temporary file and then copy into covers dir, save it directly to there. Without this, a lot of temporary files are created on import, which remain on the system even after the application is closed.

Instead of saving the pixbuf of the new cover into a temporary file and
then copy into covers dir, save it directly to there. Without this, a lot
of temporary files are created on import, which remain on the system even
after the application is closed.
Checking for file extension does not ensure that the image file can be
actually opened. Check if it can be loaded into a pixbuf, and convert it if
necessary.
Decoding/encoding errors sometimes raise an OSError or ValueError.
convert_cover() now always return a temporary file, which needs to be
removed after the cover is saved. Without this, these files would remain on
the system until reboot. Also remove the downloaded temporary files after
save.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant