Ich versuche herauszufinden, wie ich die Datei für iTunes-Songs herunterladen kann, die noch nicht auf meinen lokalen Computer heruntergeladen wurden (und sich in der iTunes Match Cloud befinden), indem ich AppleScript oder eine andere Bibliothek verwende.
Mein Ziel ist es, ein Skript lokal auf einem Cron laufen zu lassen, das jeden Song mit 5-Sterne-Bewertung herunterlädt. Da ich den Großteil meiner Musik über iTunes Match streame, möchte ich diese hoch bewerteten Songs automatisiert herunterladen.
Ich habe mich umgesehen und dachte, so etwas würde funktionieren:
tell application "iTunes"
activate
set results to (every file track of playlist "Library" whose rating is 100)
repeat with t in results
download t
end repeat
end tell
Obwohl es nur explodiert:
error "iTunes got an error: item 1 of
{file track id 86657 of library playlist id 61224 of source id 66, .... }
doesn’t understand the “download” message."
Jede Hilfe wäre willkommen.
tell application "iTunes"
set matchedSongs to tracks of library playlist 1 whose rating is 100 and cloud status is matched
set uploadedSongs to tracks of library playlist 1 whose rating is 100 and cloud status is uploaded
set results to matchedSongs & uploadedSongs
repeat with aTrack in results
if class of aTrack is shared track then
try
download aTrack
end try
end if
end repeat
end tell
Das macht den Job!
Ich konnte nicht herausfinden, wie ich eine verschachtelte Bedingung für das ausführen soll, whose
also erhalte ich einfach beide Suchsätze nach übereinstimmenden und hochgeladenen Songs und kombiniere sie.
Stellen Sie try
einfach if
sicher, dass wir die gültigen Tracks herunterladen, wenn sie lokal nicht vorhanden sind.