Creating ASX playlists for Windows Mobile instead of M3U

Get answers about syncing MediaMonkey 4 with iPods and other devices.

Moderator: Gurus

wombler
Posts: 1
Joined: Mon May 26, 2008 5:33 am

Creating ASX playlists for Windows Mobile instead of M3U

Post by wombler »

Can anyone help me?

Media Monkey creates m3u format playlists on my Windows Mobile device. Windows Mobile does not support m3u playlists (not on my device, and not according to the MS KB for version WMP 9 Mobile).

Am I right?

At the moment, I am using a grep utility to transform the m3u playlists into asx format, then I copy them back to the device. It doesn't take long, but it would be nicer if media monkey did it. The m3u format is so simple I don't know why MS don't support it! (Although the relative address in the m3u file means it won't work anyway).

Is it possible to cause media monkey to write .asx format playlists when synchronising? There is a post elsewhere that shows an asx file being created for WM2003SE Smartphone: http://www.mediamonkey.com/forum/viewto ... x+playlist
... and that this is out of MM's control because it is created by the MS WMDM interface... so why is that not happening for me?

Many thanks for anyone's help

My Device: HTC Touch, WM6, WMP 10 Mobile
wto605
Posts: 5
Joined: Sat Nov 15, 2008 1:52 am

Re: Creating ASX playlists for Windows Mobile instead of M3U

Post by wto605 »

While I was searching for a pre-made fix this post was pretty high up in Google, so I thought I'd post what I ended up doing here...

Windows Mobile phones have an issue syncing through activesync to the card (lots of posts about that)... so I take my card out and sync it through the WMDM plugin. Problem is, with a regular card reader the WMDM plugin
1) defaults to m3u
2) gives the relative path starting with "\Music\", but it should be "\Storage Card\Music\"

For the first one, we just need to change the format to ASX, which is still plain text it just has some HTML-style markups (for more details open up an asx or Google the format). For the second one we just need to add the listed directory in the right place.

Unfortunately the second one shots down the chance of using all of the ASX <-> M3U converters I could find.

I've created a C++ program that automates these two steps simply by dragging dropping any number of m3u files onto it. Do note it will delete the previous asx when you run it. I haven't included any error checking whatsoever, but it doesn't modify the input file so it shouldn't corrupt any of your data (though it will fail very ungracefully).

I don't post here much so correct me if I'm wrong, but it looks like I cannot attach files... I'll look into putting a compiled version up somewhere when I get a chance, for now here's the code.

As usual on the internet: I make no guarantees this code will not harm your files, computer, or dog; use at your own risk. As for 'licensing' do what you want with the code, I really don't care.

Code: Select all

#include <fstream> // File stream library
#include <string> // String library

using namespace std; // Standard namespace

int main( int argc, char *argv[] ) { // Main with arguments
    int ii; // Loop variable
    for (ii = 1; ii < argc; ii++) { // Loop through arguments 1 to end
        char *infile = argv[ii]; // CString of current argument (m3u filepath)
        string data; // String to hold lines
        ifstream m3u(infile); // Open m3u file (current argument)
        string outfile = infile; // String to prepare asx filepath
        outfile.erase(outfile.end() - 3, outfile.end()); // Delete m3u extension
        outfile += "asx"; // Add asx extension
        remove(outfile.c_str()); // Remove existing asx file
        ofstream asx(outfile.c_str()); // Create new asx file
        asx << "<asx version=\"3.0\">\n"; // Start asx markup
        while (getline( m3u, data )) { // Grab new line until no more lines
            asx << "<entry><ref href=\"\\Storage Card" << data << "\"/></entry>\n";
            // Write the line with extra markup and filepath for Windows Mobile
            data.clear(); // Clear the string for the next line
        } // End loop through each line of m3u file
        asx << "</asx>"; // End asx markup
        m3u.close(); // Close m3u file
        asx.close(); // Close asx file
    } // End loop through arguments 1 to end
    return 0; // Quit with status 0
} // End main
I've found the easiest thing to do is leave the executable in my "playlists" directory on my memory card. Every time after I sync with MediaMonkey I go in, sort by type, then select all the m3u files and drop them on the exe and I'm done.
wto605
Posts: 5
Joined: Sat Nov 15, 2008 1:52 am

Re: Creating ASX playlists for Windows Mobile instead of M3U

Post by wto605 »

Just remembered I had found a decent file hosting site where the files [should] stay for ever (provided they aren't music or video, which this isn't).

Sorry about the adds... no guarantees they're SFW, feel free to re-post.

Previous site went under... see post below
Last edited by wto605 on Thu Apr 23, 2009 1:46 pm, edited 1 time in total.
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Re: Creating ASX playlists for Windows Mobile instead of M3U

Post by rovingcowboy »

i have an asx creator program for the old win 8 or 9 wmp but the creator of it had a crash and lost the programs and help for it. still i got him some help typed up for it but still m$ seems to have changed the asx formating some how. because now that program no longer works. it will make the asx file but the asx file won't play.

so that might be the trouble with the other converters you found. :-?
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
wto605
Posts: 5
Joined: Sat Nov 15, 2008 1:52 am

Re: Creating ASX playlists for Windows Mobile instead of M3U

Post by wto605 »

I now have web hosting where I can put this, and it seems la.gg is no longer in existence... so here's a new link

http://wto605.com/m3u_convert.exe

enjoy!
Post Reply