diff -urN SlimServer_v5.3.1-ut/Slim/Music/iTunes.pm SlimServer_v5.3.1/Slim/Music/iTunes.pm --- SlimServer_v5.3.1-ut/Slim/Music/iTunes.pm 2004-10-01 23:34:08.000000000 +0200 +++ SlimServer_v5.3.1/Slim/Music/iTunes.pm 2004-10-10 00:38:20.000000000 +0200 @@ -55,6 +55,7 @@ my $opened = 0; my $locked = 0; my $iBase = ''; +my $groupCompilations = 0; my $inPlaylists; my $inTracks; @@ -467,6 +468,8 @@ my $file = $ituneslibraryfile || findMusicLibraryFile();; + $groupCompilations = Slim::Utils::Prefs::get('itunes_group_compilations'); + if ($doneXML) { my $artScan = artScan(); if (!$artScan) { @@ -478,7 +481,7 @@ # this assumes that iTunes uses file locking when writing the xml file out. if (!$opened) { if (!open(ITUNESLIBRARY, "<$file")) { - $::d_itunes && warn "Couldn't open iTunes Library: $file"; + warn "Couldn't open iTunes Library: $file"; return 0; } $opened = 1; @@ -550,7 +553,7 @@ my $file = Slim::Utils::Misc::pathFromFileURL($url, 1); if (!$file || !-r $file) { - $::d_itunes && msg("iTunes: file not found: $file\n"); + warn("iTunes: file not found: $file\n"); $url = undef; } } @@ -565,7 +568,10 @@ $cacheEntry{'ARTIST'} = $curTrack{'Artist'}; $cacheEntry{'COMPOSER'} = $curTrack{'Composer'}; $cacheEntry{'TRACKNUM'} = $curTrack{'Track Number'}; - + + if ($groupCompilations && $curTrack{'Compilation'}) { + $cacheEntry{'ARTIST'} = "Compilation"; + } my $discNum = $curTrack{'Disc Number'}; my $discCount = $curTrack{'Disc Count'}; $cacheEntry{'DISC'} = $discNum if defined $discNum; diff -urN SlimServer_v5.3.1-ut/Slim/Utils/Prefs.pm SlimServer_v5.3.1/Slim/Utils/Prefs.pm --- SlimServer_v5.3.1-ut/Slim/Utils/Prefs.pm 2004-10-01 23:34:08.000000000 +0200 +++ SlimServer_v5.3.1/Slim/Utils/Prefs.pm 2004-10-09 23:45:27.000000000 +0200 @@ -142,6 +142,7 @@ ,'itunes_library_autolocate' => 1 ,'itunes_library_music_path' => defaultAudioDir() ,'ignoredisableditunestracks' => 0 + ,'itunes_group_compilations' => 0 ,'instantMixMax' => 12 ,'varietyCombo' => 50 ,'ignoreDirRE' => '' diff -urN SlimServer_v5.3.1-ut/Slim/Web/Setup.pm SlimServer_v5.3.1/Slim/Web/Setup.pm --- SlimServer_v5.3.1-ut/Slim/Web/Setup.pm 2004-10-01 23:34:08.000000000 +0200 +++ SlimServer_v5.3.1/Slim/Web/Setup.pm 2004-10-10 00:17:16.000000000 +0200 @@ -2001,7 +2001,7 @@ ,'GroupOrder' => ['Default','iTunesPlaylistFormat'] ,'Groups' => { 'Default' => { - 'PrefOrder' => ['itunesscaninterval','ignoredisableditunestracks','itunes_library_autolocate','itunes_library_xml_path','itunes_library_music_path'] + 'PrefOrder' => ['itunesscaninterval','ignoredisableditunestracks','itunes_group_compilations','itunes_library_autolocate','itunes_library_xml_path','itunes_library_music_path'] } ,'iTunesPlaylistFormat' => { 'PrefOrder' => ['iTunesplaylistprefix','iTunesplaylistsuffix'] @@ -2037,6 +2037,13 @@ ,'0' => string('SETUP_IGNOREDISABLEDITUNESTRACKS_0') } } + ,'itunes_group_compilations' => { + 'validate' => \&validateTrueFalse + ,'options' => { + '1' => string('SETUP_ITUNES_GROUP_COMPILATIONS_1') + ,'0' => string('SETUP_ITUNES_GROUP_COMPILATIONS_0') + } + } ,'itunes_library_xml_path' => { 'validate' => \&validateIsFile ,'changeIntro' => string('SETUP_OK_USING') diff -urN SlimServer_v5.3.1-ut/strings.txt SlimServer_v5.3.1/strings.txt --- SlimServer_v5.3.1-ut/strings.txt 2004-10-01 23:34:13.000000000 +0200 +++ SlimServer_v5.3.1/strings.txt 2004-10-10 00:47:23.000000000 +0200 @@ -2773,6 +2773,18 @@ NO Ikke ignorer sanger bortvalgt i iTunes SE Ignorera inte låtar som är omarkerade i iTunes +SETUP_ITUNES_GROUP_COMPILATIONS + EN Support for iTunes Compilations + +SETUP_ITUNES_GROUP_COMPILATIONS_DESC + EN When scanning your iTunes Music Library, SlimServer can group compilations into a single 'Compilations artist'. This option determines if grouping of compilations will be done. Changes to this option become active after the next rescan of your iTunes Music Library. + +SETUP_ITUNES_GROUP_COMPILATIONS_0 + EN Don't group iTunes compilations + +SETUP_ITUNES_GROUP_COMPILATIONS_1 + EN Group iTunes compilations + SETUP_HISTORYLENGTH DE Länge des Verlaufs DK Historiklængde