Bug 17894 - urlmd5 column in tracks table aren't set correctly for FLAC + CUE images
: urlmd5 column in tracks table aren't set correctly for FLAC + CUE images
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.7.1
: PC Fedora
: -- normal with 5 votes (vote)
: 7.7.3
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-20 11:34 UTC by Hans Kuhn
Modified: 2013-06-24 12:26 UTC (History)
1 user (show)

See Also:
Category: Bug


Attachments
Cue sheet file which have the issue (1.44 KB, application/octet-stream)
2012-02-20 21:15 UTC, Erland Isaksson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Kuhn 2012-02-20 11:34:01 UTC
OVERVIEW

FLAC + CUE image files are deleted from database when a full scan is initiated. A database query shows the urlmd5 values don't match in the tracks table.

STEPS TO REPRODUCE

1) Run full scan by selecting "Clear library and rescan everything" from the "Basic Settings" tab.

2) Query the database with Erland Isaksson's Database Query Plugin with the following string:

  select url from tracks where urlmd5!=md5(url) limit 50

ACTUAL RESULTS

All existing FLAC and CUE files are deleted from the library. Only files added to the "Media Folders" since the last full scan are present in the library.

EXPECTED RESULTS

All FLAC and CUE files in the "Media Folders" should be in the library.

BUILD DATE AND PLATFORM

Logitech Media Server Version: 7.7.1 - r33751 @ Wed Dec 14 08:42:37 EST 2011 on Fedora Core 14 2.6.35.14-95.fc14.i686


NOTE

I will ftp a sample FLAC and CUE file for testing.
Comment 1 Erland Isaksson 2012-02-20 13:25:48 UTC
Just for information, I've confirmed this issue in my own setup.
Comment 2 Erland Isaksson 2012-02-20 21:15:38 UTC
Created attachment 7627 [details]
Cue sheet file which have the issue

The attached "Adele - 21.cue" file is one that have the issues. Hans will upload a complete problematic file with the FLAC to the ftp, but I'm just attaching this cue sheet file in case some community member want to help debug it.
Comment 3 Hans Kuhn 2012-02-21 10:14:02 UTC
I've uploaded the flac and cue files to hybridized.org. Both files start with "BUG_17894".
Comment 4 Hans Kuhn 2012-05-08 13:07:16 UTC
What's the process used to determine if a bug will get assigned? I'm a bit concerned about the lack of comments from Logitech.
Comment 5 Michael Herger 2013-06-24 07:49:27 UTC
Could you please provide access to another set of files? Andy is no longer working for us.
Comment 6 Michael Herger 2013-06-24 09:10:00 UTC
Are you still seeing this? I tried to reproduce with a small test folder (2x cue, 5x flac). All of them show up in the db, and all the hashes seem to be correct.
Comment 7 Erland Isaksson 2013-06-24 10:19:46 UTC
(In reply to comment #6)
> Are you still seeing this? I tried to reproduce with a small test folder (2x
> cue, 5x flac). All of them show up in the db, and all the hashes seem to be
> correct.

I just setup an environment with latest 7.8 from git and it shows the same problem.

After scanning, the following SQL
select url,urlmd5,content_type from tracks where url like '%Adele%'

Produces:
===========
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.cue    	30725ddafe5d5459c9a6b0164e8f72a3    	cue   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#0-228.293333333333    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#228.293333333333-451.56    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#451.56-701.693333333333    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#701.693333333333-944.893333333333    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#944.893333333333-1186.58666666667    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#1186.58666666667-1464.53333333333    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#1464.53333333333-1692.74666666667    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#1692.74666666667-1934.4    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#1934.4-2282.56    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#2282.56-2599    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac#2599-2884.04    	5c9a6dbd4c0640e41d4422c81a640ba1    	flc   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac    	5c9a6dbd4c0640e41d4422c81a640ba1    	fec   
file:///mnt/mp3music_small/external%C3%85%C3%84%C3%96/HansKuhn/Adele%20-%2021.flac    	5c9a6dbd4c0640e41d4422c81a640ba1    	fec   
=============

As you can see, all the fragments get the same MD5.

For the md5url column to make any sense it need to match the url field and be different for each fragment.
Comment 8 Erland Isaksson 2013-06-24 10:31:06 UTC
(In reply to comment #5)
> Could you please provide access to another set of files? Andy is no longer
> working for us.


You should have them in your mailbox now.
Comment 9 Michael Herger 2013-06-24 11:30:29 UTC
Thanks got them. And can confirm your experience. In my previous tests I did _NOT_ get a record of type 'fec', but correct hashes. With your files I get those additional records, but invalid hashes. Now I only have to figure out what is causing this different handling...
Comment 10 Michael Herger 2013-06-24 12:26:06 UTC
That was a very close relative to bug 18043: we need to make sure we always update md5 hashes of track objects.