Bug 3619 - MusicMagic Importer doesn't appear to create new track with attributes
: MusicMagic Importer doesn't appear to create new track with attributes
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: MusicIP
: 6.5b1
: PC Linux (other)
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-20 23:48 UTC by KDF
Modified: 2008-12-15 11:58 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description KDF 2006-06-20 23:48:26 UTC
scanner.pl --musicmagic --wipe --prefsfile=/etc/slimserver/slimserver.pref --d_info


no attributes appear as part of d_info, and does not appear to be doing any readTags when there is no music folder setting.

Log:
2006-06-20 23:43:03.2787 MusicMagic: Exporting song: /myth/music/Flac/Alanis Morissette/Jagged Little Pill/Alanis Morissette - (08) Head Over Feet.flac
2006-06-20 23:43:03.2873 New Track for file:///myth/music/Flac/Alanis%20Morissette/Jagged%20Little%20Pill/Alanis%20Morissette%20-%20(08)%20Head%20Over%20Feet.flac
2006-06-20 23:43:03.2884 Adding file:///myth/music/Flac/Alanis%20Morissette/Jagged%20Little%20Pill/Alanis%20Morissette%20-%20(08)%20Head%20Over%20Feet.flac : musicmagic_mixable to 1
2006-06-20 23:43:03.2893 Adding file:///myth/music/Flac/Alanis%20Morissette/Jagged%20Little%20Pill/Alanis%20Morissette%20-%20(08)%20Head%20Over%20Feet.flac : remote to 0
2006-06-20 23:43:03.2951 forceCommit: syncing to the database.
Comment 1 KDF 2006-06-21 00:27:31 UTC
commenting out line 95 of Slim::Music::Import seems to solve it, but it shouldn't be executing that line if there is no folder set, correct? I did restart the server several times with no music folder setting just to make sure it wasn't some interraction.  

with a music folder setting, I seem to also be getting a bunch of blank album names (all mixable items have no album, in fact).  This may be linked to philip's issue of blank album names.
Comment 2 KDF 2006-06-21 01:05:27 UTC
album problem may be due to stale data.  stay tuned on this issue.

main issue is the lack of attributes or readTags when music folder setting is empty.

MIP version is 1.6b1 for linux
Comment 3 KDF 2006-06-21 10:59:44 UTC
I seem to get a lot of this from the scanner:

Use of uninitialized value in string eq at D:\slim\server/Slim/Schema.pm line 1608, <MMMDATA> chunk 113.
Use of uninitialized value in string eq at D:\slim\server/Slim/Schema.pm line 1608, <MMMDATA> chunk 113.

I think this is due to having no attributes when musicfolder scan exists.  I'm guessing this is somehow causing all musicmagic tracks to get merged into albums of an undefined name.

I also wonder what happens if a user has a folder defined, and musicmagic has tracks that are not in the music folder.  I assume those tracks would then have no metadata and no readtags.  Maybe we should always set readTags for musicmagic import, and simply skip the read if the track already exists in the system.

As a start, I think line 91 of Slim/Music/Import.pm needs to be changed to:
if ($Importers{$folderScanClass}->{'use'} && !$class->scanPlaylistsOnly) {

This way, if there is no music folder, the 'use' setting can be checked for the results of the folderscan init. This seems to work for me when using only musicmagic. 

Now, I'll try to sort out how best to circumvent the album loss.

Comment 4 Dan Sully 2006-06-21 11:01:25 UTC
It's because the AUDIO flag isn't being set. I have a patch for this already...
Comment 5 Dan Sully 2006-06-21 18:58:52 UTC
Fixed in change 8088
Comment 6 KDF 2006-06-22 00:17:59 UTC
Looks good now :)
Comment 7 James Richardson 2008-12-15 11:58:07 UTC
This bug has been fixed in the latest release of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.