Import M3U 3.8 - Updated 26/10/2013

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

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

A script could be written to add all the songs in the playlist, adding those that don't exist as new inaccessible tracks. This script could in fact be modified to do that.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
vanmeterannie
Posts: 34
Joined: Mon Mar 05, 2007 10:58 am

Post by vanmeterannie »

But I guess that wouldn't be able to take advantage of the volume adjusting feature, so that would defeat my purpose....really, what I'm after is a way to keep holiday songs in a different database, but be able to pull them in when I want to mix them in without making them a permanent part of the "main" library.

It'd be cool if MM could be configured to load everything, but only see certain parts of the database based on selection when it loads...that way if you wanted to play everything in the library except certain genres or groupings it would be simple.
mm_user2k6
Posts: 5
Joined: Fri Apr 07, 2006 1:35 pm

Post by mm_user2k6 »

This script could in fact be modified to do that.
Really? This sounds interesting .

How would I go about doing it?

TIA
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

If you open the .vbs file in a text editor you'll fine lines 75-77 are...

Code: Select all

        If trax.EOF Then
          Call debug("Not found: "&mess)
        End If
Code needs to be added here to create a new track. This is untested, but something like...

Code: Select all

        If trax.EOF Then
          Call debug("Not found: "&mess)
          Dim itm : Set itm = SDB.NewSongData
          itm.Path = mess
          itm.MetadataFromFilename
          itm.UpdateDB
        End If
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
sonicm
Posts: 10
Joined: Fri Apr 06, 2007 8:36 am
Location: England
Contact:

Post by sonicm »

When I try this under Vista x64 I get the follwing error:

Error #429 - Microsoft VBScript Runtime Error
ActiveX Component can't create object: "Scripting.FileSystemObject"
File "c:\program files (x86)\mediamonkey\scripts\importm3u.vbs", Line 43, Column: 12

Any help would be appreciated as i've just registered media monkey and installed the version that came with it and it wiped my sync playlist for my Zen player and I would rather no set that all up again if I can help it?

I have a backup in a M3U format but adding it to the playlist folder normall in MM creates the playlist name but it's blank so I thought I would give this a go and have the above results.

Thanks in advance
Mike
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, I no nothing about Vista. This message implies that the Windows Scripting Host is not installed, so you could try to find the Vista version on the Windows download site and try installing that.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (2.6) is now available from my website. It contains the above mentioned code for creating a new track if the file is not found, but the option is switched off by default.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

Hi Trix:

First let me say that I enjoy your scripts very much, they are very helpful to a novice such as myself. Although MM already has this feature, I do not like my playlists put into the Imported Playlists node(?). So if possible, can someone tell me how to either:

1. Import my playlists in batch mode to the playlist node, rather than imported playlists.
2. Batch move my playlists from the imported playlists to the playlist node.
3. Change the location of imported playlists to the playlist node so that MM will always import them to the playlist node.

Please forgive my ignorance, I am very new to MM and am trying to learn the features through trial and error.

Nyn
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I think you can drag and drop the playlists onto the root Playlists node to reorganise them.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
aidan_cage
Posts: 291
Joined: Mon Dec 11, 2006 9:45 pm

Post by aidan_cage »

will this be super hard to cross over to MM3? I tried to do this recently, and wasn't able to
I thought it was a native ability
I thought wrong
:-?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

It's lines 63-75 that will need amending as these currently build an SQL statement, in MM3 they will need to build an SQLite statement. It is on my list of scripts to update though! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (3.0) is now available to download from my website. It is now compatible with MM3.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post by nynaevelan »

YYYEEEAAAHHHH!!! Now my MM3 is complete, thank you very much.
8) :P 8)

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
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

No problem, I'm glad it's working (presumably)! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
qwench
Posts: 7
Joined: Mon Mar 19, 2007 5:26 am

Post by qwench »

I fixed the script to create track not found in mm3 db:

Code: Select all

        Dim trax : Set trax = SDB.Database.QuerySongs(sql) 
        If trax.EOF Then 
          set trax = Nothing
          If CreateLog Then 
            Call debug("Not found: "&mess&vbcrfl&"**"&sql) 
          End If 
          If CreateNew Then 
            prog.Text = "Creating: "&line 
            Dim itm : Set itm = Nothing
            set itm = SDB.NewSongData 
            itm.ArtistName = mess
            itm.UpdateDB
            itm.UpdateArtist
            itm.UpdateAlbum
            list.AddTrack(itm)
          End If 
        else 
            While Not trax.EOF 
              prog.Text = "Adding: "&mess 
              count = count + 1 
              list.AddTrack(trax.Item) 
              trax.Next 
            WEnd        
            set trax = Nothing
        End if                    

Replace in main code. 8)

If you want to find more matching tracks, change this (add the '-1'):

Code: Select all

        If IgnoreExt Then 
          line = Left(line,InStrRev(line,".")-1)&"%" 
        End If        
This will remove the dot at the end of the track. You can find tracks like 'songtitle (remix)' for 'songtitle.mp3'

Set the IgnoreExt and CreateNew to 'True' to enable this.
Post Reply