Batch M3U Creator 2.7 - Updated 23/09/2012

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 »

New version (2.1) is now available to download from my website. Changes include...

- Made compatible with MM3
- Added option to ignore tracks not in the album folder
- Added option to create playlists in the folder above album folder

Unfortunately I've not managed to include an option for running for artists. There are a few issues it brings up with multiple artists, etc, which I decided meant it would probably need to be a separate script.
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.
Guest

Post by Guest »

Heyho really nice script.

But is it possible to sort the files in the right order in the M3U file?

I have mp3 files all named like
01. <Artist> - <Title>.mp3
02. <Artist> - <Title>.mp3

etc. But when i create the M3Us the files arent ordered in the Playlist.
Is it possible to create a M3U with this script where they are sorted by name?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I would assume that the tracks were ordered by track number, as I am just using an MM album object. I don't do any sorting on them at all at the moment.
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.
Guest

Post by Guest »

hmm
I think i found my problem. The songs aren't right sorted in my database.
They are sorted after their database nr in your script. Thats the Problem. Now i must first find out how i can change the order of them in my databae :/♦
AliZ
Posts: 48
Joined: Tue Jan 15, 2008 2:55 am

Post by AliZ »

Hi trixmoto,

I have the same problem and I have ordered definitivly by track number.

I checked the script and found, that you are using the ItemID (itm.ID) after #EXTINF. Why?
Following the specification (http://hanna.pyxidis.org/tech/m3u.html) the length of the file must/should be used.
Maybe that's the problem.

Is there an overview about the fields which can/must be used in scripts?

Is it possible to implement an optional variable which extend the sql statement with an "order by trackNumber" (default true)

AliZ
AliZ
Posts: 48
Joined: Tue Jan 15, 2008 2:55 am

Post by AliZ »

I think the problem is, that the script doesn't take any ordering into account.
The MM internal procedure also does no sorting. The function reads the current item list and reads the items in the respective order.

For me the only way is, to implement a variable (sorting criterion) which can be acitvated (true/false) and can be filled with a field by own choise (e.g. TrackOrder, Name, etc.)

I would appreciate it. THX in advance.

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

Post by trixmoto »

The reason that I output the track ID there is because that is what MM does when it creates M3U records. However, as this is just a comment, it doesn't actually matter.

I believe MM2 used to return the tracks in the correct order whereas it appears MM3 does not. I will update the script to sort by the correct order shortly. :)
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.
Wombat
Posts: 1
Joined: Thu Jan 24, 2008 5:27 pm
Location: Netherlands

Post by Wombat »

Hi Trixmoto,

Nice script!

Is it possible to create the playlist limited to a specific source location? Now when I select albums on my portable MP3-player and generate playlists for them, I get all tracks multiple times in the playlist: for each version of the album MediaMonkey can find.

My situation:
1) my music collection is stored in FLAC-format on a disk (Y-drive )
2) all music is also stored in MP3-format on a separate disk (I know I can convert automatically during synchronization, but this way synchronization is much faster) (Z-drive)
3) part of my MP3-collection is synchronized to my MP3-player (M-drive)

When I select albums on my portable player en generate m3u-files, the files look like this:

#EXTM3U
#EXTINF:4608,U2 - Bullet The Blue Sky
Y:\Audio\U2\The Joshua Tree\04 - Bullet The Blue Sky - U2.flac
#Y:\Audio\U2\The Joshua Tree\04 - Bullet The Blue Sky - U2.flac
#EXTINF:13416,U2 - Bullet The Blue Sky
Z:\Music\U2\The Joshua Tree\04 - Bullet The Blue Sky - U2.mp3
#Z:\Music\U2\The Joshua Tree\04 - Bullet The Blue Sky - U2.mp3
#EXTINF:18518,U2 - Bullet The Blue Sky
M:\Media\Music\U2\The Joshua Tree\Bullet The Blue Sky.mp3
#M:\Media\Music\U2\The Joshua Tree\Bullet The Blue Sky.mp3
....

By the way: FullPath = False, but it still lists the complete path.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I think if you set "AlbumOnly" to True this will have the desired effect. It should ignore any tracks which aren't in the album folder.

The reason you are getting the full path could be because the tracks are not in a subfolder of the folder that the playlist is in. It does not build relative paths with ".." in to move up folders.
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.2) is now available to download from my website. Changes include...

- Moved logfile to windows temporary directory
- Added extra debug messaging at track level
- Fixed albums without names were being processed
- Fixed track comment appearing when track ignored
- Fixed comment showing track ID instead of song length

@Wombat - although the logic in the PM you sent me was actually identical to mine, yours didn't have a typo so it worked properly! :)
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.
gramac111

Question re Batch m3U creator script - Playlist node

Post by gramac111 »

trixmoto wrote:New version (2.2) is now available to download from my website. Changes include...

- Moved logfile to windows temporary directory
- Added extra debug messaging at track level
- Fixed albums without names were being processed
- Fixed track comment appearing when track ignored
- Fixed comment showing track ID instead of song length

@Wombat - although the logic in the PM you sent me was actually identical to mine, yours didn't have a typo so it worked properly! :)
This is a fantastic piece of work!! But I have a newbie question. I used it for a few albums but then realized that the playlists were getting created in the "imported m3U playlists" subgroup under the Playlist dropdown in my MediaMonkey. Can I get it to show up directly under the Playlist grouping just like a playlist I manually create by typing the name in MM3 does? Any help is greatly appreciated!

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

Post by trixmoto »

I imagine the reason they are getting put there is that you have File Monitor running on the folders where they are being created - this script does not actually add them to MM at all, it just creates M3U files.
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.
gramac111

Playlist subgroup and one more question

Post by gramac111 »

thanks. I guess it is an MM3 issue and maybe there is a fix there and not through the script. I have one more question. Is it possible to define the playlist naming style i.e. instead of Artist - Album, just Album?

thanks for all your help!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yes, there are a number of variables at the top of the script. Simply open "BatchM3UCreator.vbs" in a text editor and amend the line...

Code: Select all

Dim FileMask : FileMask = "<Artist> - <Album> (<Year>)" 'can include: <Artist><Album><Year>
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.
gramac111

script help

Post by gramac111 »

thanks!! this rocks!
Post Reply