Playlist Export aus iTunes für andere Programme?

B

Boogieman

Aktives Mitglied
Thread Starter
Dabei seit
26.06.2007
Beiträge
493
Reaktionspunkte
57
Hallo,

ich habe einen Mac und ein Sony Z5 Compact, also Android.
Auf dem Mac nutze ich iTunes als Musikdatenbank und habe verschiedene Playlists angelegt.
Ich habe es irgendwann mal geschafft, die Playlists mit Sony Bridge for Mac auf mein Z5 zu bekommen. Schließe ich es jetzt allerdings an, werden mir die Playlists aus iTunes nicht mehr korrekt in Sony Bridge angezeigt.

Bin mittlerweile recht genervt. Bei Sony funktioniert die Sync-Software nicht und bei Apples iTunes kann man Playlists nicht richtig exportieren. Lediglich die XML, um die Playlist auf einem anderen Mac in iTunes zu bekommen (muss ich noch probieren)

Hat jemand einen Rat?

Ich glaube das beste wäre, wenn ich die Playlists irgendwie aus iTunes auslesen / exportieren könnte und dann bequem auf die SD-Karte schiebe.
Aber wie kann ich Playlists exportieren? Also mit den Songs, nicht nur die XML-Datei, die sagt wo die Songs liegen. Ich wäre auch bereit eine Android-tauglich Software für Musik zu installieren, wenn ich hier die Playlists UND die Songs importieren kann und von dieser anderen Software aus alles auf das Smartphone kriege.

Vielleicht mache ich auch etwas in der Bedienung falsch.
Wie auch immer, ich komme nicht weiter und hoffe auf Tipps von Euch.

Danke!
thup.gif
 
Wenn es dir nur um die Dateien geht, so kannst du alle Titel einer Wiedergabeliste markieren, und dann per Ziehen und Ablegen in den entsprechenden Order bzw. auf die SD-Karte kopieren. Dann hast du ja quasi alles aus der Wiedergabeliste am gewünschten Ort. Ist bei nicht zu vielen Wiedergabelisten auch ganz tauglich. Ich selbst habe eine bestimmte Wiedergabeliste für das Auto, welche ich von Zeit zu Zeit einfach auf diesem Weg komplett auf eine SD-Karte ziehe.
 
Die Songs manuell in einen Ordner ziehen hätte aber den Nachteil, dass sie dann in alphabetischer Reihenfolge abgespielt werden und nicht wie in der Playlist.
Oder versteh ich was falsch?
 
Ja stimmt, ich höre aber im Auto und unterwegs eh immer per Zufallwiedergabe.
 
Eine bestimmte Reihenfolge zu exportieren geht normalerweise nicht. Diese Information steckt in der iTunes-Library und nicht in den Dateien. Es gibt dafür Zusatzdateien, die legt iTunes aber nicht an - und nicht alle Autoradios können damit etwas anfangen.
Je nachdem, wonach das Autoradio - oder welches Gerät eben gemeint ist - abspielt, bleiben zwei Möglichkeiten: Entweder die Dateien umbenennen mit einer Zahl am Anfang, wenn es nach Alphabet sortiert, oder die Dateien einzeln der Reihe nach exportieren, wenn das Gerät nach der physikalischen Reihenfolge auf dem Volume vorgeht.
 
Hallo,

schau mal hier im Forum nach SD-Export.
Wir haben genau dafür vor langem mal ein Skript geschrieben.

Viele Grüße
 
Dafür gibt es ja die Playlist. Wenn ich eine App hätte, die sowas wie eine .m3u Datei (oder was sich bei iTunes alles exportieren lässt) versteht, dann hätte ich mein Ziel auf manuellem Weg erreicht, oder?
 
Hallo,

schau mal hier im Forum nach SD-Export.
Wir haben genau dafür vor langem mal ein Skript geschrieben.

Viele Grüße

Aber ich meine, da ist auch das Problem, dass die Playlist nachher alphabetisch geordnet ist. Ich nutze das Script, leicht modifiziert, für meinen Server, aber ich lasse dann eben im Shuffle spielen.
Code:
global zielOrdner


-- gewünschten Zielordner wählen
set zielOrdner to (choose folder without invisibles) as string

-- Aktion ausführen
my auswahlKopieren()



-- iTunes Handler
on auswahlKopieren()
    tell application "iTunes"
      
        set sel to selection
      
        repeat with nTrack in sel
            try
                -- Quellpfad holen
                set nTrackPfad to location of nTrack
              
                -- Ordner ermitteln
                tell application "Finder"
                    set mOrdnerMutter to (name of (container of nTrackPfad)) as string
                    set mOrdnerMutterMutter to (name of (container of (container of nTrackPfad))) as string
                end tell
              
                -- Zu Ziel kopieren
                my verschieben(nTrackPfad, mOrdnerMutter, mOrdnerMutterMutter)
            on error
                -- hier eine Fehlermeldung ?
            end try
        end repeat
      
    end tell
end auswahlKopieren


-- Kopieren
on verschieben(nTrackPfad, mOrdnerMutter, mOrdnerMutterMutter)
    do shell script "mkdir -p " & quoted form of (POSIX path of (zielOrdner & mOrdnerMutterMutter & ":" & mOrdnerMutter & ":"))
    do shell script "cp " & quoted form of (POSIX path of nTrackPfad) & " " & quoted form of (POSIX path of (zielOrdner & mOrdnerMutterMutter & ":" & mOrdnerMutter & ":"))
end verschieben

Damit werden die markierten Lieder auf einen Zielpfad geschoben, so wie sie in iTunes gespeichert sind.
 
Hallo,

Aber ich meine, da ist auch das Problem, dass die Playlist nachher alphabetisch geordnet ist. Ich nutze das Script, leicht modifiziert, für meinen Server, aber ich lasse dann eben im Shuffle spielen.
Du kannst ja einfach einen Index vor den Dateinamen schreiben.

Also vor der Schleife "set index to 0" und im Rumpf der Schleife immer "set index to index + 1" und beim Dateeinamen mit "set fileName to index & " -" artist …" erweitern.

Weil "selection" gibt Dir in der Liste die Titel immer in aktueller Sortierreihenfolge zurück.

Viele Grüße
 
  • Gefällt mir
Reaktionen: Veritas
Ah, das schaue ich mir mal an, danke.
 
Damit kann man die Playlisten expoertieren
Code:
property |linefeed| : ASCII character 10


try
    with timeout of 1800 seconds
       
        tell application "iTunes"
            set playlist_names to name of user playlists
            set the playlist_text to "#CURTRACK 0" & |linefeed|
            set the playlist_name to item 1 of (choose from list playlist_names)
            set the export_folder to POSIX path of "/DeinPfadFuerDiePlaylist/"
            set the target_file to export_folder & playlist_name & ".m3u" as Unicode text
            tell application "System Events" to set fileExists to exists disk item (my POSIX file target_file as string)
            if the result then
                display dialog "Diese Datei existiert bereits " & playlist_name & ".m3u. Möchtest du diese Datei ersetzen?" buttons {"Abbrechen", "Forftahren"} cancel button 1 with icon caution
            end if
            tell playlist playlist_name
                set the track_count to the count of tracks
            end tell
            repeat with z from 1 to the track_count
                tell track z of playlist playlist_name
                    copy {location} to {loc}
                end tell
                set name_z to name of (track z of playlist playlist_name)
                set time_z to duration of (track z of playlist playlist_name)
                set time_z to round (time_z) rounding down
                set the posixloc to POSIX path of loc as text
                set new_posixloc to my replace_chars(posixloc, "/Volumes", "/media")
                set encoded_posixloc to my encode_text(new_posixloc, true, false)
                set the playlist_text to the playlist_text & new_posixloc & |linefeed|
            end repeat
        end tell
        set this_result to my write_to_file(playlist_text, POSIX file target_file)
        if this_result is not true then
            error this_result -- There was a problem writing the playlist file.
        end if
    end timeout
on error error_message number error_number
    tell application "iTunes"
        if the error_number is not -128 then
            beep
            display dialog error_message buttons {"abbrechen"} default button 1
        end if
    end tell
end try

on write_to_file(this_data, target_file)
    try
        set the target_file to the target_file as Unicode text
        set the open_target_file to open for access file target_file with write permission
        set eof open_target_file to 0
        write this_data to the open_target_file
        close access the open_target_file
        return true
    on error error_message
        try
            close access file target_file
        end try
        return error_message
    end try
end write_to_file

on replace_chars(this_text, search_string, replacement_string)
    set AppleScript's text item delimiters to the search_string
    set the item_list to every text item of this_text
    set AppleScript's text item delimiters to the replacement_string
    set this_text to the item_list as string
    set AppleScript's text item delimiters to ""
    return this_text
end replace_chars

-- this sub-routine is used to encode text
on encode_text(this_text, encode_URL_A, encode_URL_B)
    set the standard_characters to "abcdefghijklmnopqrstuvwxyz0123456789"
    set the URL_A_chars to "$+!'?;&@=#%><{}[]\"~`^\\|*"
    set the URL_B_chars to ".-_:/()"
    set the acceptable_characters to the standard_characters
    if encode_URL_A is false then set the acceptable_characters to the acceptable_characters & the URL_A_chars
    if encode_URL_B is false then set the acceptable_characters to the acceptable_characters & the URL_B_chars
    set the encoded_text to ""
    repeat with this_char in this_text
        if this_char is in the acceptable_characters then
            set the encoded_text to (the encoded_text & this_char)
        else
            set the encoded_text to (the encoded_text & encode_char(this_char)) as string
        end if
    end repeat
    return the encoded_text
end encode_text

on encode_char(this_char)
    set the ASCII_num to (the ASCII number this_char)
    set the hex_list to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
    set x to item ((ASCII_num div 16) + 1) of the hex_list
    set y to item ((ASCII_num mod 16) + 1) of the hex_list
    return ("%" & x & y) as string
end encode_char

In der Zeile den Ausgabepfad angeben: set the export_folder to POSIX path of "/DeinPfadFuerDiePlaylist/"
In der Zeile wird der Pfad angepasst, da meine Playlisten in einem anderen Ordner auf einem Netzwerkspeicher liegen: set new_posixloc to my replace_chars(posixloc, "/Volumes", "/media")
 
Ah, da fällt mir ein:

Wahrscheinlich wäre es gut, wenn bei dem Index im Dateinamen immer entsprechend eine Null bzw. Nullen vorgestellt werden.
Je nach Autoradio etc. wird sonst Titel 10, 11 etc. nach 1 gespielt.

Viele Grüße
 
Ah, da fällt mir ein:

Wahrscheinlich wäre es gut, wenn bei dem Index im Dateinamen immer entsprechend eine Null bzw. Nullen vorgestellt werden.
Je nach Autoradio etc. wird sonst Titel 10, 11 etc. nach 1 gespielt.

Viele Grüße

Danke für den Hinweis, das mache ich generell eigentlich immer, da das öfters zu Problemen führt. Ich nutze die Playlist aus iTunes nur für DLNA/UPnP Geräte. Playlist in iTunes erstellen, Script starten und sie wird auf den "Server"geschoben, Index neu erstellen und die Geräte können darauf zugreifen. Aber ich teste das vielleicht mal am BlackBerry.
 
Zurück
Oben Unten