Local album covers detection is case-sensitive

Bug #462512 reported by Olivier Tilloy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
Low
Peter

Bug Description

Steps to reproduce:
1) Have two music albums in two separate directories, each containing the album's cover as an image file:
    * album 1: "cover.jpg"
    * album 2: "Cover.jpg"
2) Start Moovida, add those directories to the music library
3) Go to MUSIC / Library

Expected result: the local covers show for the two albums.

Current result: the local cover show only for album 1. The cover for album either doesn't show at all or is downloaded from last.fm.

The covers' filenames detection should be made case-insensitive (both on the filename and on the extension) so that Moovida equally finds "cover.jpg", "Cover.jpg", "COVER.JPG", "cOvEr.JpG", and so forth.

Related branches

Olivier Tilloy (osomon)
Changed in elisa:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Peter (maubp) wrote :

Redoes the local cover art search, use os.listdir() rather than trying os.path.isfile() for all possible filenames which is not practical once we consider mixed cases. Keeps the check for is a file and the correct access requirements. Note this preserves the existing priorities (the order recorded in the preferences).

Also note that I was seeing iterate_candidates sometimes called with None as the track_path, so I added a check for this.

Developed and test on Linux with Python 2.6

Revision history for this message
Olivier Tilloy (osomon) wrote :

I submitted a merge request containing this patch on behalf of Peter. See: https://www.moovida.com/quality/review/request/%<email address hidden>%3E.

tags: added: patch-available
Changed in moovida:
assignee: nobody → Kaleo (fboucault)
milestone: none → bug-fixing-day
status: Confirmed → In Progress
Revision history for this message
Florian Boucault (fboucault) wrote :
Changed in moovida:
importance: Medium → Low
milestone: bug-fixing-day → none
assignee: Kaleo (fboucault) → nobody
status: In Progress → Confirmed
Revision history for this message
Michał Sawicz (saviq) wrote :

Maybe a faster solution would be to compare the dirname of the file's uri to dirnames of already found covers and use ones that you already decided to use for this directory.

Instead of querying the filesystem, query the database or even cache a list of found covers while scanning.

Changed in moovida:
milestone: none → bug-fixing-day
assignee: nobody → Peter (j-launchpad-maubp-freeserve-co-uk)
status: Confirmed → Fix Committed
Changed in moovida:
milestone: bug-fixing-day → 1.0.9
Olivier Tilloy (osomon)
Changed in moovida:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.