re-downloading already downloaded lyrics

Bug #1168770 reported by Castro Pippo Juan Manuel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lrcShow-X
Fix Committed
Medium
Unassigned

Bug Description

Voy a hacer la redacción en Español porque se me complica mucho hacerla en ingles, espero se entienda el bug.

lrcShow-x 2.1.1.
Python 2.7

Preferencias => General => "Nombre el archivo lrc descargado igual al archivo multimedia." TILDADO
Preferencias => Rutas => "Guardar el archivo lrc en la ruta de las pistas." TILDADO
Preferencias => Rutas => "Buscar adicionalmente el archivo lrc en la ruta de las pistas." TILDADO

El bug es que cuando encuentra un lrc en internet y lo descarga en la carpeta del archivo multimedia con el mismo nombre de ese archivo, luego cuando vuelvo a reproducir la canción no detecta que ese LRC ya existe y lo intenta descargar nuevamente.

If you don't understand the bug report tell me and I will try it in English.

Revision history for this message
Castro Pippo Juan Manuel (juan-pippo) wrote :

I have a theory that part of this bug is related with .flac files. Or may be this is another bug. But .flac files are always seached in the internet.

Revision history for this message
Castro Pippo Juan Manuel (juan-pippo) wrote :

Im trying to fix the bug.

I need to know what does this mean: [Ll][Rr][Cc]

file: "searchLocalLrc.py"
line: for lrcfile in glob.glob(os.path.join(path, '*.[Ll][Rr][Cc]')):

Salute

Revision history for this message
Castro Pippo Juan Manuel (juan-pippo) wrote :

I made some progress in my research:

if a folder has "[ ]" in its name for example "2001 - Room in a Fire [FLAC]"

the line: "print glob.glob(os.path.join(path, '*.[Ll][Rr][Cc]'))" does not return anything

Revision history for this message
Castro Pippo Juan Manuel (juan-pippo) wrote :

I duplicate the folder, one with the [ ] (the original), and one without [] (the one created for the example)

And this is the return in the console:

>>> glob.glob(os.path.join("/home/jotape/Musica/Musica en albumes/The Strokes/2006 - First Impressions Of Earth [FLAC]", '*.lrc'))
[]
>>> glob.glob(os.path.join("/home/jotape/Musica/Musica en albumes/The Strokes/2006 - First Impressions Of Earth FLAC", '*.lrc'))
['/home/jotape/Musica/Musica en albumes/The Strokes/2006 - First Impressions Of Earth FLAC/07 - Ask Me Anything.lrc', '/home/jotape/Musica/Musica en albumes/The Strokes/2006 - First Impressions Of Earth FLAC/03 - Heart In A Cage.lrc']
>>>

Revision history for this message
Castro Pippo Juan Manuel (juan-pippo) wrote :

Okey

Finally I fix the bug. Really there were two.

Number One: folders with "[" "]" where skipped in the scanning. That's a problem of the glob library. I solved using os.listdir and fnmatch.

Number Two: if you tick the option Preferences => Path => "Search the LRC files in the multimedia files path."
and then if you download the lyrics in the same folder where are the multimedia files the program does not search that folder.

Well, both bugs are fixed. Here is the patch. Test it please. :)

from Argentina... sorry for my bad english.

Revision history for this message
frank (xujia19) wrote :

Bug's confirmed, thank you very much.

Changed in lrcshow-x:
status: New → Fix Committed
importance: Undecided → Medium
Revision history for this message
frank (xujia19) wrote :

committed

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.