You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mopidy v1.0 Library.get_images() allows retrieving images for any URI, not just tracks. To facilitate this, a mapping of URIs to image paths should be kept, probably in an SQLite database.
Since the local scanner only provides a track URI in the model passed to local.Library.add(), the implementation needs too first call add() and then lookup on the delegate library to extract any album or artist URIs assigned by Mopidy-Local-SQLite, for example.
The text was updated successfully, but these errors were encountered:
Cleanup should be handled using database triggers. For example, if the last track is removed for an image, all other model mappings for that image must be removed, too, and the file deleted from disk.
Deleting a track will delete the model_image and all track_model records for that track.
Deleting a track_model will delete all model_image records for that model, unless the model is referenced by another track.
Deleting a model_image will delete the image unless referenced otherwise.
This definitely needs some unit tests...
tkem
transferred this issue from mopidy/mopidy-local-images
Dec 9, 2019
Mopidy v1.0
Library.get_images()
allows retrieving images for any URI, not just tracks. To facilitate this, a mapping of URIs to image paths should be kept, probably in an SQLite database.Since the local scanner only provides a track URI in the model passed to
local.Library.add()
, the implementation needs too first calladd()
and thenlookup
on the delegate library to extract any album or artist URIs assigned by Mopidy-Local-SQLite, for example.The text was updated successfully, but these errors were encountered: