[SlimDevices: Beta] Re: Album name problem with 6.5b3
jgs
jgs.2fbt6n1160255401 at no-mx.forums.slimdevices.com
Sat Oct 7 14:07:30 PDT 2006
While I couldn't agree more with others who've commented that slimserver
SHOULD provide the option to continue to recognize albums even when
divided across multiple folders, it appears that it ain't going to
happen. Hacking the Perl to fix this "feature" seemed like too much
work, so I knuckled under and changed my library instead. As
previously noted, this would have been an absurd amount of work if done
by hand, so I've scripted it instead.
More precisely, I've adapted one of Doug Adams' Applescripts, "NOT part
of a compilation"
(http://www.dougscripts.com/itunes/scripts/scripts07.php?page=3#notpartofacompilation)
to do the opposite of what it does out of the box -- in my version it
finds tracks that should have "part of a compilation" checked, but
don't, and checks it. If you have "Keep iTunes Music folder organized"
checked in the iTunes preferences, running this script has the effect of
rearranging your libarary so that each album is in a single folder of
its own, the way slimserver now insists.
It's not clear to me what the copyright issues are with my posting my
adapted script, so I'm not doing so. I've offered it to Doug to add to
his collection. In the mean time, you can easily get Doug's script and
make the necessary changes yourself using Script Editor. My changes
are below, in the form of a diff between Doug's script and mine. (Even
if you're not familiar with diff, the format should be pretty self-
explanatory, it's snippets of the original and changed file, with
changed lines set off by exclamation marks, added lines by plusses, and
deleted lines by minuses.)
On my library at least, this script takes a LONG time to run --
overnight for me. There are some timeouts in the script you might want
to increase (I didn't and as I recall, I did have to re-run the script
to let it finish doing its work).
Provided with no guarantees at all, but it worked for me.
Code:
--------------------
*** NOT Part of a Compilation.txt Wed Sep 27 22:39:45 2006
--- Make Part of a Compilation.txt Wed Sep 27 22:39:46 2006
***************
*** 1,4 ****
--- 1,11 ----
(*
+ "Part of a Compilation" for iTunes
+ by John Scudder
+ jgs+compilationscript at bgp.nu
+ September 21, 2006
+
+ I did very little of my own work on this, it's adapted from another script. The original comment of that script:
+
"NOT Part of a Compilation" for iTunes
written by Doug Adams
dougadams at mac.com
***************
*** 41,51 ****
end if
end repeat
! if flag1 is true then -- that is, all track are by same Artist
set fixed indexing to true
repeat with t in theseTracks
try
! set t's compilation to false
end try
end repeat
-- increase count of Abums changed
--- 48,58 ----
end if
end repeat
! if flag1 is false then -- that is, tracks are by two or more Artists
set fixed indexing to true
repeat with t in theseTracks
try
! set t's compilation to true
end try
end repeat
-- increase count of Abums changed
***************
*** 65,71 ****
with timeout of 3000 seconds
tell application "iTunes"
! set list1 to (album of file tracks of library playlist 1 whose compilation is true)
end tell
set listOfAlbums to {}
--- 72,78 ----
with timeout of 3000 seconds
tell application "iTunes"
! set list1 to (album of file tracks of library playlist 1 whose compilation is false)
end tell
set listOfAlbums to {}
***************
*** 81,86 ****
to explain()
tell application "iTunes"
activate
! display dialog "This script will comb your iTunes library for Album tracks designated as Compilations but which are actually all by the same Artist, and un-designate them as Compilations." buttons {"Cancel", "Proceed..."} default button 2
end tell
end explain
--- 88,93 ----
to explain()
tell application "iTunes"
activate
! display dialog "This script will comb your iTunes library for Albums whose tracks are not designated as Compilations but which are actually by two or more Artists, and designate them as Compilations." buttons {"Cancel", "Proceed..."} default button 2
end tell
end explain
--------------------
--
jgs
------------------------------------------------------------------------
jgs's Profile: http://forums.slimdevices.com/member.php?userid=7538
View this thread: http://forums.slimdevices.com/showthread.php?t=27424
More information about the beta
mailing list