Export to iTunes

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Wargazm
Posts: 161
Joined: Thu Dec 06, 2007 10:52 am

Re: Export to iTunes

Post by Wargazm »

Thanks for the work on this! I haven't used it yet but I look forward to trying it.

I have a few questions, though:

1. What does the iTunes library need to look like in order for this script to work? Ideally for my needs, the iTunes library would be completely empty, with iTunes just working as a dumb relay between MM and the iPhone. Is this the case, or do the tracks in Mediamonkey need to exist in the iTunes library?
2. Will this provide true syncronization, or do you manually need to clear the iPhone of tracks that no longer exist in the playlist? So if I sync Songs A, B, and C on first sync, then the next time I do songs B, C, and D, does song A get automatically deleted from the iPhone, or does it stay on the device?
3. In addition to playcounts, can ratings be syncronized between the iPhone and MM using this method? It would be great if I could rate a song on the iPhone and have it sync back to Mediamonkey.

Thanks again!
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

1. What does the iTunes library need to look like in order for this script to work? Ideally for my needs, the iTunes library would be completely empty, with iTunes just working as a dumb relay between MM and the iPhone. Is this the case, or do the tracks in Mediamonkey need to exist in the iTunes library?
2. Will this provide true syncronization, or do you manually need to clear the iPhone of tracks that no longer exist in the playlist? So if I sync Songs A, B, and C on first sync, then the next time I do songs B, C, and D, does song A get automatically deleted from the iPhone, or does it stay on the device?
3. In addition to playcounts, can ratings be syncronized between the iPhone and MM using this method? It would be great if I could rate a song on the iPhone and have it sync back to Mediamonkey.
1. iTunes will have the tracks added to synchronise as you export each playlist. The script adds them, you do not need to do this manually. (This isnt as inefficient as it sounds, if the track is there already, the copying step is skipped) It is perfectly legitimate to have the same track in multiple playlists, this does not duplicate in iTunes.
2. At present the removal of tracks from the iPhone is manual. The script is add only but soon to change in the next release. At present to remove a playlist, rename it to "zzz" in iTunes. Generally it's unnecessary to remove a track from iTunes. It is membership of a playlist that controls weather it is synchronised to the phone.
3. I'll add it to the wish list! I'm having some problems with the logic for playcounts ... I suspect I'll have the same problem with ratings. Basically, you have to decide where is the master (iPhone, iTunes or MM) otherwise you can't tell which one has changed.

I suggest that you try it out, it's very straight forward.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

Mark:

Just a minor thing but the installation package puts the script info in the scripts.ini file as the script being in the scripts folder but the vbs file is put in the auto folder. I only get the message that the vbs is missing because I use Onenonymous' Clean Scripts.ini script and it keeps popping up as an error unless I modify the scripts.ini file.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

If anyone wants to try it out this is a beta of the next release It has a dialogue box which allows the selection (and deslection) of playlists to by exported.

To use this file simply overwrite the C:\Program Files\MediaMonkey\Scripts\Auto\ExportToItunes.vbs file.

Feedback to this forum topic would be appreciated.

Mark

Code: Select all

    
    option explicit     

    const sMMName = "MM Exported Playlists"

    const EXPORTING = "itunes_export_active"
    const ExportM3UsObject = "ExportToItunesObject"
    const ExportM3UsForSubNodes = "ExportToItunes"
    const ExportM3UsForSubNodesPopUp = "ExportToItunesPopUp"
    const ExportM3UsForSubNodesMenu = "ExportToItunesMenu"

    const ScriptingDictionary ="Scripting.Dictionary"
    const CurrentAddingID = "CurrentAddingID"
    const TracksAdded = "TracksAdded"
    const SkipOnEvent = "SkipOnEvent"

    const ITPlaylistKindUser = 2 
    const ITUserPlaylistSpecialKindFolder = 4 
    const CompareMethodText = 1
    Const emptyName = "zzz"
    Const syncList = "<MM>"
    Const emptySlotCount = 100
    Const dirSeparator ="/" 
    const ignoreParents = "Playlists|Imported m3u playlists" 

    Dim iTunesApp ' as itunes.App
    Dim Unused() ' As IITPlaylist
    Dim UnusedNodeName() ' as String
    Dim UnusedCheck() ' as Checkbox
    Dim UnusedCount ' as int 
    
    Dim Progress 


Sub OnStartUp()
    Dim oCtrl
    Dim sCaption

    ' script functions to trigger upon these events 
    Script.RegisterEvent SDB, "OnChangedSelection", "OnChangedSelection"
    Script.RegisterEvent SDB, "OnTrackListFilled", "OnTrackListFilled"

    ' make popup
    sCaption = "iTunes (Export)"
    If SDB.Objects(ExportM3UsForSubNodesPopUp) Is Nothing Then
	' create popup
        Set oCtrl = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_Tree_Sendto, 0, 0)
        oCtrl.Caption = sCaption
        oCtrl.IconIndex = 18
        oCtrl.UseScript = Script.ScriptPath
        oCtrl.OnClickFunc = "ExportToItunes"
        oCtrl.Visible = False
        SDB.Objects(ExportM3UsForSubNodesPopUp) = oCtrl
    Else
	' already created .... simply show popup
        SDB.Objects(ExportM3UsForSubNodesPopUp).Visible = True
    End If

    'make menu
'    If SDB.Objects(ExportM3UsForSubNodesMenu) Is Nothing Then
'        Set oCtrl = SDB.UI.AddMenuItem(SDB.UI.Menu_File, 2, 0)
'        oCtrl.Caption = sCaption
'        oCtrl.IconIndex = 18
'        oCtrl.UseScript = Script.ScriptPath
'        oCtrl.OnClickFunc = "ExportToItunes"
'        SDB.Objects("ExportM3UsForSubNodesMenu") = oCtrl
'    Else
'        SDB.Objects("ExportM3UsForSubNodesMenu").Visible = True
'    End If

    If SDB.Objects(ExportM3UsObject) Is Nothing Then
        Set SDB.Objects(ExportM3UsObject) = CreateObject(ScriptingDictionary)
'        SDB.Objects(ExportM3UsObject).Add "OptionSheet", _
'                SDB.UI.AddOptionSheet("Export Playlists for Child Nodes", _
'                Script.ScriptPath, "InitOptionSheet", "SaveOptionSheet", -1)
        SDB.Objects(ExportM3UsObject).Add CurrentAddingID, 0
        SDB.Objects(ExportM3UsObject).Add TracksAdded, True
        SDB.Objects(ExportM3UsObject).Add SkipOnEvent, False
    End If


End Sub


Sub OnChangedSelection()
    SDB.Objects(ExportM3UsObject).Item(CurrentAddingID) = SDB.MainTracksWindow.CurrentAddingID
            
    If Not SDB.MainTree.CurrentNode Is Nothing Then
        SDB.Objects(ExportM3UsForSubNodesPopUp).Visible = True
        SDB.Objects(ExportM3UsForSubNodesPopUp).Enabled = True
    Else
        SDB.Objects(ExportM3UsForSubNodesPopUp).Visible = False
    End If
End Sub

Sub OnTrackListFilled()
    SDB.Objects(ExportM3UsObject).Item(TracksAdded) = True
End Sub

Sub createSyncPlaylists(Name, UnusedName)

    initProgress "Check for folder " & Name , 0 
    Dim f 'As IITPlaylist
    Set f = iTunesApp.LibraryPlaylist.Source.playlists.ItemByName(Name)

    ' does it not exist? 
    If f Is Nothing Then
        initProgress "Creating " & Name & "\" & UnusedName & " playlists" , emptySlotCount 

        Set f = iTunesApp.CreateFolder(Name)
        
        Dim i
        For i = 0 To emptySlotCount - 1 
            f.CreatePlaylist (UnusedName)
            if countProgress() then exit For 
        Next

        MsgBox SDB.Localize("iTunes now contains a folder called " & Name & " containing playlists called " & unusedname & ". Please attach the iPod/iPhone that you wish to synchronise this library to and then on the Music tab of the device ensure that the " & Name & " folder is selected along with all of it's contained playlists. This will ensure that the device is synchronised as playlists are added."  ), 64, "iTunes Export Script"

        UnusedCount = 0 
    End If
    
    
End Sub
        
Sub getItunesPlaylists(ParentName)

    if UnusedCount > 0 then 

        initProgress "Got children of " & ParentName , ubound(Unused)

    else 

    initProgress "Getting child playlists of " & ParentName , iTunesApp.LibraryPlaylist.Source.playlists.count 

    Dim f 'As IITUserPlaylist
    Dim p 'As IITPlaylist
    Dim up 'As IITUserPlaylist
    Dim parent 'As IITUserPlaylist
    Dim fLow 'as Long 
    Dim fHigh 'as Long 
    Dim Playlists 

    Set f = iTunesApp.LibraryPlaylist.Source.playlists.ItemByName(ParentName)
    
    If f.SpecialKind = ITUserPlaylistSpecialKindFolder Then
        
        fLow = iTunesApp.ITObjectPersistentIDLow(f)
        fHigh = iTunesApp.ITObjectPersistentIDHigh(f)
        'f.Reveal
        
        UnusedCount = 0
        set Playlists = f.Source.playlists
        For Each p In Playlists
        
            If p.Kind = ITPlaylistKindUser Then
            
                Set up = p
                Set parent = up.parent
                
                If parent Is Nothing Then
                Else
                    If iTunesApp.ITObjectPersistentIDLow(parent) = fLow then
                        if iTunesApp.ITObjectPersistentIDHigh(parent) = fHigh Then
                            'up.Reveal

                            dim i : i = UnusedCount
                            UnusedCount = UnusedCount + 1

                            ReDim Preserve Unused(i)
                            ReDim Preserve UnusedNodeName(i)
                            ReDim Preserve UnusedCheck(i)

                            ' remember the playlist and appropriate name
                            Set Unused(i) = up
                            UnusedNodeName(i) = getLastMmName(up.Name)
                        end if
                    End If
                End If
                
            End If
            if countProgress() then exit For 
        Next


    End If
        
    end if 

End Sub

Function findUnused(fullName)

    Dim i
    Dim j
    
    j = -1
    For i = 0 To UnusedCount - 1
    
        If Unused(i).Name = fullName Then
            j = i
            Exit For
        End If
        
    Next
    
    ' wasn't there 
    If j < 0 Then
        ' look for empty slot 
        For i = 0 To UnusedCount - 1
        
            If Unused(i).Name = emptyName Then

                ' rename to be the same
                initProgress "Renaming from " & Unused(i).name & " to " & FullName, 0
                unused(i).Name = fullName

                j = i
                Exit For
            End If
            
        Next
    End If
    
    findUnused = j
    
End Function

sub initProgress( Title , MaxValue )

    'SDB.Messagebox Title , mtWarning, Array(mbYes,mbNo)

    if MaxValue = 0 then 
        Progress.Text = SDB.Localize(Title)
    else
        Progress.Text = SDB.Localize(Title & " (" & cstr(MaxValue) & ")" )
    end if 
    Progress.MaxValue = MaxValue 
    Progress.value = 0
    SDB.ProcessMessages 
    
end sub 

function countProgress( ) 

    progress.value = progress.value + 1
    SDB.ProcessMessages 

    countProgress = progress.Terminate 
    
end function

sub deleteItunesTracks( p2 ) 

    ' delete what is there already
    initProgress "Deleting tracks " & p2.name , p2.Tracks.Count
    dim i : for i = p2.tracks.count to 1 step -1
        p2.Tracks.Item(1).Delete
        if countProgress() then exit for
    next

end sub 

sub deleteItunes( p2 ) 

    ' delete what is there already
    deleteItunesTracks( p2 ) 

    ' and the name 
    initProgress "Deleting name " & p2.name , 0
    p2.name = emptyName 

end sub 

Sub copyPlaylist(p1 , p2)

    Dim count : count = p1.tracks.count

'    SDB.Messagebox "copy1 " & cstr(count) , mtWarning, Array(mbYes,mbNo)

    ' do not export zero length MM playlists
    if count = 0 Then 
        initProgress "Zero length so skipping " & p2.Name , 0
        deleteItunes p2 
    else
        
    ' is it the right number of tracks 
    if p2.tracks.count = count then
        ' do nothing 
        initProgress "Same length (" & cstr(count) & ") so skipping " & p2.Name , 0
    else
        ' remove the tracks from the playlist
        deleteItunesTracks p2 

        initProgress "Exporting """ & p2.Name & """ to iTunes" , count
        dim k : k = 0 
        Dim j : For j = 0 to count - 1 
        
  
            dim path : path = p1.tracks.item(j).path

            ' only export mp3 files             
            if instr(1,path ,".mp3", CompareMethodText) > 0 then 

                ' add the file to iTunes
                Dim os 'As IITOperationStatus
                Set os = p2.AddFile(path)
                if not os is nothing then
                    ' wait for it to complete (it runs asynchronously)
                    While os.InProgress
                    Wend
                    
                    ' copy the playcount over as well
                    'dim playcounter : playcounter = p1.tracks.item(j).playcounter
                    'os.tracks(1).playcounts = playcounter 

                    k = k + 1
                end if 

            end if 

            if countProgress() then exit For 
        Next

        ' it we failed to write anything then delete the playlist altogether 
        if k = 0 then deleteItunes p2 
                   
    end if 

    end if 
    
End Sub

function Surround( a ) 
    Surround = "|" & a & "|"
end function 

' covert a tree node caption (cccc) in a tree into aaaa/bbbb/cccc
function getFullMmName( tree, node , prependParents ) 

    dim n : n = node.caption
    dim p : set p = node
    
    if prependParents then 
        dim i : for i = 1 to 10 
            set p = tree.ParentNode(p)

            if p is nothing then exit for
            if p.caption = "" then exit for 
            if instr( 1, Surround( ignoreParents ) , Surround(  p.caption ) , CompareMethodText) = 0  then
                n = p.Caption + dirSeparator + n
            end if 
        next 
    end if

    getFullMmName = n 

end function

' convert aaaa/bbbb/cccc into cccc
function getLastMmName( fullName ) 

    dim parts : parts = split(fullName,dirSeparator)
    
    getLastMmName = parts(ubound(parts))

end function

sub getSDBPlaylists( tree , node , prependParents )

    node.expanded = true 

    ' do we contain child playlists
    if node.HasChildren then 

        ' recurse through the children
       dim n : set n = tree.FirstChildNode(node)
        while not ( n is nothing ) 
            getSDBPlaylists tree , n , prependParents
            set n = tree.nextsiblingnode(n)
       wend 

    else

        dim fullName : fullName = getFullMmName( tree , node , prependParents )
        Dim s : s = findUnused(fullName)
        if ( s < 0 ) Then exit sub ' too many playlists to export 
        UnusedNodeName(s) = node.caption

    end if 

end sub

sub SyncPlaylists

    dim i : for i = 0 to UnusedCount - 1 

        dim p2 : set p2 = Unused(i)
        
        if p2.name <> EmptyName then

            if UnusedCheck(i).checked <> 0 then 

                dim srcName : srcName = UnusedNodeName(i)

                initProgress "Looking up " & srcName, 0 
                Dim p1 : Set p1 = SDB.PlaylistByTitle(srcName)

                ' export us
                copyPlaylist p1 , p2

            else
                ' remove us
                deleteItunes p2
            end if 

        end if 

    next 

end sub

sub CreateItunes

    '  launch iTunes
    initProgress "Connect to iTunes" , 0
    set iTunesApp = CreateObject("iTunes.Application")

end sub 

sub syncIpod( alwaysSync ) 

    if alwaysSync then 
        initProgress "Ipod Synchronising", 0
        iTunesApp.UpdateIPod    
    end if 
    
end sub 


function newLabel( form , left , top , caption )

    Dim Label1 : Set Label1 = SDB.UI.NewLabel(Form)
    Label1.Caption = caption
    Label1.Common.Left = left
    Label1.Common.Top = top

    set newLabel = Label1

end function 


function newEdit( form , left , top , width , name , text )

    Dim e : Set e = SDB.UI.NewEdit(form)
    e.Common.Left = left 
    e.Common.Top = top 
    e.Common.Width = width 
    e.Common.ControlName = name
    e.Text = text

    set newEdit = e 

end function 

function newButton( form , left , top , width , height , caption , OnClickFunc )

    Dim Browse : Set Browse = SDB.UI.NewButton(Form)
    Browse.Caption = caption
    Browse.Common.Height = height
    Browse.Common.Width = width 
    Browse.Common.Top = top
    Browse.Common.Left = left
    Browse.UseScript = Script.ScriptPath
    Browse.OnClickFunc = OnClickFunc

    set newButton = Browse

end function 

function newCheckbox( form , left , top , width , caption , checked )

    Dim Edt26 : Set Edt26 = SDB.UI.NewCheckbox(form)
    Edt26.Caption = caption
    Edt26.Common.Left = left
    Edt26.Common.Top = top 
    Edt26.Common.Width = width
    Edt26.Checked = checked 

    set newCheckBox = Edt26

end function 

function newCombobox( form , left , top , width , name , list )

    Set Edt27 = SDB.UI.NewDropDown(form)
    Edt27.Common.Left = left 
    Edt27.Common.Top = top
    Edt27.Common.Width = width 
    Edt27.Common.ControlName = name
    Edt27.Style = 2

    dim listArr : listArr = split( list , "|")
    dim i : For each i in listArr
        Edt27.AddItem i
    Next

    set newCombobox = Edt27

end function 

function newForm( left , top , width , height , caption ) 

    Dim Form : Set Form = SDB.UI.NewForm
    Form.Common.SetRect left , top , width , height 
    Form.BorderStyle  = 2   
    Form.FormPosition = 4   
    Form.Caption = caption 

    set newForm = Form

end function 

sub buildForm( ) 

    Dim form : Set form = newForm( 100, 100, 400, 600 , "Export to iTunes" )

    dim j : j = 0 
    dim i : for i = 0 to UnusedCount - 1 

        dim n : n = Unused(i).Name

        if n <> emptyName then 

            ' build the name and geometry
            n = n & "|" + UnusedNodeName(i)
            dim left : left = 5 	
            dim top : top = 5 + (j * 15)

            ' show on the screen
            dim check : set check = newCheckbox( form , left , top , 200 , n , true )
            set unusedCheck(i) = check 

            j = j + 1 
	else

            set unusedCheck(i) = nothing 

        end if 

    next 

    dim b : set b = newButton( form , 5, 5 + check.common.top + check.common.height , 60 , 25 , "OK" , "" ) 
    b.Default = True
    b.ModalResult = 1
    dim c : set c = newButton( form , 5 + b.common.left + b.common.width , b.common.top , 60 , 25 , "Cancel" , "" ) 
    c.Cancel = True
    c.ModalResult = 2

    ' show us on the screen
    form.ShowModal() 

end sub 

sub ExportToItunes(Item)

    If SDB.MainTree.CurrentNode Is Nothing Then Exit Sub

    set progress = SDB.Progress

    ' connect to itunes
    createItunes

    ' create structures in iTunes
    createSyncPlaylists syncList, emptyName

    ' read what we have in iTunes (the children of <MM>)
    getItunesPlaylists syncList  

    ' add/merge the SDB ones
    getSDBPlaylists SDB.MainTree , SDB.MainTree.CurrentNode , true 

    ' put the result on the screen
    buildForm

    ' delete/update/add playlists   
    syncPlaylists

    ' sync the device 
    syncIpod true
    
    set progress=nothing 

end sub 

Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
Con

Re: Export to iTunes

Post by Con »

markstuartwalker wrote:If anyone wants to try it out this is a beta of the next release It has a dialogue box which allows the selection (and deslection) of playlists to by exported.

To use this file simply overwrite the C:\Program Files\MediaMonkey\Scripts\Auto\ExportToItunes.vbs file.

Feedback to this forum topic would be appreciated.

Mark
Doesn't run for me. I get a can not be opened error then when I ignore I get a Error #13 Type Mismatch in line 1, column 0.
I may be doing something wrong here so any help is appreciated. Thanks.
Wargazm
Posts: 161
Joined: Thu Dec 06, 2007 10:52 am

Re: Export to iTunes

Post by Wargazm »

markstuartwalker wrote:I suggest that you try it out, it's very straight forward.
Thanks for answering my questions...I will definitely try it out.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

I must be missing it because I cannot find where to run it, it no longer shows on the context menu.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
Con

Re: Export to iTunes

Post by Con »

nynaevelan wrote:I must be missing it because I cannot find where to run it, it no longer shows on the context menu.
I'm assuming you're talking about the beta version. Because it now give you the option to choose which playlists to sync you need to access it from Tools/Scripts.

Let me know if you have any issue running it. I couldn't get the beta to run. Thanks.

Con
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

I cannot get it to run from the scripts menu, I get this error:

Image

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

Con wrote:
Doesn't run for me. I get a can not be opened error then when I ignore I get a Error #13 Type Mismatch in line 1, column 0.
I may be doing something wrong here so any help is appreciated. Thanks.
I get the same error once I move the script from the Auto folder to the Scripts folder.

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

Here is 2.2. http://www.mediafire.com/?dn9jjjckift

Major difference is the ability to select and deselect playlists from iTunes without having to use iTunes.

Complete re-write internally (use of classes)

Next steps
* Ini settings and options page

Questions
* How do you convert from a tree node item to find the ID of the playlist that it associates to?
* Examples of options page (I can't get mine to work)

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
codecrafter
Posts: 5
Joined: Sun Dec 16, 2007 3:20 pm

Re: Export to iTunes

Post by codecrafter »

Mark,

[Not sure you got the PM I sent a few days ago]:

I added a hack for converting .wma and other tracks that iTunes doesn't like.

I added code to trap errors when trying to add a track to iTunes. It adds these tracks to a MM playlist called 000-itunes-to-convert. Then, you convert all the tracks in that playlist to .mp3 tracks and put them in a ".mp3" subdirectory of the original location. Finally, you re-export the playlists to iTunes. The code looks for converted files in .mp3 subdirectories and will send them to iTunes. The .mp3 subdirectories appear to be ignored by iTunes if you re-scan for new tracks.

When you use Tools|Convert Audio Format, you can set the destination mask to ".\.mp3\<Filename>" so that every time you need to convert more tracks, they end up in the expected location. So, to create the mp3 files, just click on the 000-itunes-to-convert playlist, select all, Tools|Convert Audio Format. Select the conversion options you want and use the above mask.

I put the updated script here

You can merge it with your code (assuming you want the code).
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Export to iTunes

Post by nynaevelan »

I cannot get the script to run, I am getting the following error:

Image

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
markstuartwalker
Posts: 931
Joined: Fri Jul 10, 2009 8:10 am

Re: Export to iTunes

Post by markstuartwalker »

Version 2.3 http://www.mediafire.com/?sharekey=b7ee ... 6e282a0ee8

* I've incoroporated codecrafter's 'not mp3 file' fix though not tested it.
* Generally made more robust
* Internally adoptions of more classes and better structure
* Queuing mechanisms for can submit new exports while earlier ones are in progress.

Generally this is a pretty useful tool now. I'm using it on a regular basis to maintain the iPhone contents.

Mark
Windows 7,8 / Ubuntu 13.10 / Mavericks 10.9 / iOS 7.1 / iTunes 11.1
iTunes plugin (d_itunes & itunes4) http://www.mediamonkey.com/forum/viewto ... =2&t=45713
Running MM under Mac OS X with Wine http://www.mediamonkey.com/forum/viewto ... =4&t=58507
Con

Re: Export to iTunes

Post by Con »

nynaevelan wrote:I cannot get the script to run, I am getting the following error:

Image

Nyn
I get the same error. How can I correct this?

Mark?

con-
Post Reply