Page 3 of 11

Posted: Thu May 17, 2007 3:39 am
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.

Posted: Thu May 17, 2007 6:48 am
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.

Posted: Thu May 17, 2007 7:41 pm
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

Posted: Fri May 18, 2007 4:04 am
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

Posted: Tue May 29, 2007 4:17 pm
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

Posted: Wed May 30, 2007 6:14 am
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.

Posted: Wed Jun 06, 2007 5:04 pm
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.

Posted: Fri Jul 06, 2007 3:55 pm
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

Posted: Mon Jul 09, 2007 3:40 am
by trixmoto
I think you can drag and drop the playlists onto the root Playlists node to reorganise them.

Posted: Sat Jan 19, 2008 11:24 pm
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
:-?

Posted: Sun Jan 20, 2008 7:29 am
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! :)

Posted: Thu Feb 07, 2008 11:15 am
by trixmoto
New version (3.0) is now available to download from my website. It is now compatible with MM3.

Posted: Thu Feb 07, 2008 11:37 am
by nynaevelan
YYYEEEAAAHHHH!!! Now my MM3 is complete, thank you very much.
8) :P 8)

Nyn

Posted: Fri Feb 08, 2008 4:00 am
by trixmoto
No problem, I'm glad it's working (presumably)! :)

Posted: Wed Mar 05, 2008 10:35 am
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.