Author Topic: M3U to YAAP Playlist Converter  (Read 1971 times)

lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
M3U to YAAP Playlist Converter
« on: August 14, 2010, 03:59:30 pm »
Since ViRUS hasn't implemented M3U support in YAAP, I decided to throw together a little program that takes M3U files and converts them into YAAP files.

Here's a screenshot:




Download Links!
Download M3U to YAAP - Full Download
Download M3U to YAAP - Update from 20101113
Download M3U to YAAP - Source Code


CHANGELOG:
20110128:
 + M3U2YAAP now reads the YAAP playlist directory from the registry if it doesn't have a config file.
 + M3U2YAAP also passes the playlist name as an argument to YAAP if it's set to start it after conversion.
    * For some reason, I only managed to get this to work when the playlist has no spaces in the filename. Unsure where the problem lies - my program, YAAP bug, or my error with it?
20101113:
 + Added options window
    * This is where the YAAP playlist directory settings moved to
 + Added support for starting YAAP after conversion
 + Configuration now saves to and loads from "m3u2yaap.cfg"
    + If m3u2yaap.cfg already exists when you try to save it, the existing one becomes m3u2yaap.cfg~. If that file exists, it's simply deleted.
20100806:
 + Added support to ignore all lines starting with #. Ignores blank lines too, while I was adding if conditions in there.
     * Note that the line counter will not count the lines above. So if your M3U had 200 lines of songs, and 50 comments, the finished progress bar would read 200/200.
« Last Edit: January 28, 2011, 09:53:20 pm by lavacano201014 »

Green = listening, red = surfing

blue_h3x

  • Hero Member
  • *****
  • Posts: 4577
    • View Profile
    • AS Tournament
Re: M3U to YAAP Playlist Converter
« Reply #1 on: August 16, 2010, 10:12:36 am »
IIRC ViRUS did once use M3U in YAAP though dropped it so he could use jump lists without stealing file 'ownership' from Foobar2000.

Nice tool though
Austria is just like Yorkshire, but they have bigger hills.... oh and they have real snow too

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3156
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #2 on: August 16, 2010, 11:42:52 am »
IIRC ViRUS did once use M3U in YAAP though dropped it so he could use jump lists without stealing file 'ownership' from Foobar2000.

Nice tool though

That and I couldn't get YAAP to read M3U files properly, sometimes it'd drop files, other times it'd try to load commented lines, fail and crash so yeah, I ended up dropping it...

Good work, lava ^_^


lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #3 on: August 16, 2010, 02:20:08 pm »
other times it'd try to load commented lines

Wait, M3U has comments? shit D-:

What do they start with? I can easily get my program to ignore them.

Green = listening, red = surfing

Mincus

  • Hero Member
  • *****
  • Posts: 2394
    • View Profile
Re: M3U to YAAP Playlist Converter
« Reply #4 on: August 16, 2010, 04:17:31 pm »
other times it'd try to load commented lines

Wait, M3U has comments? shit D-:

What do they start with? I can easily get my program to ignore them.

It has #EXTINF stuff.
Basically, just ignore any line that starts with a #.

lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #5 on: August 16, 2010, 05:07:33 pm »
Comment character is #. Got it. Working now. Done. Soon as it uploads it'll be the same DL link.
« Last Edit: August 16, 2010, 05:17:48 pm by lavacano201014 »

Green = listening, red = surfing

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3156
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #6 on: August 16, 2010, 05:58:13 pm »
I've modified YAAP's post to link to this one :)


lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #7 on: August 16, 2010, 08:37:08 pm »
I've modified YAAP's post to link to this one :)

D'awwww <3

Green = listening, red = surfing

lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #8 on: November 13, 2010, 02:05:34 pm »
AN UPDATE? WTF?!

Green = listening, red = surfing

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3156
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #9 on: January 27, 2011, 02:12:52 pm »
Hey lava, just noticed, you can get YAAP's playlists folder by looking on HKCU\Software\YAAP\Playlists on the registry, that way your users won't have to set it manually :)

EDIT: And if you store the converted playlist on the user's playlist folder, you can make YAAP load a playlist automatically at startup by using commandline arguments (e.g.: "C:\YAAP\YAAP.exe converted.ypf").

EDIT2: Since 3.9 you can use only a playlist name (like the example above) to load a playlist that's inside the user's playlists folder or specify a path to load a playlist outside the folder (e.g.: "C:\YAAP\YAAP.exe C:\Random folder\Random playlist.ypf").
« Last Edit: January 28, 2011, 12:00:11 am by ViRUS »


lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #10 on: January 28, 2011, 09:09:54 pm »
Hey lava, just noticed, you can get YAAP's playlists folder by looking on HKCU\Software\YAAP\Playlists on the registry, that way your users won't have to set it manually :)

EDIT: And if you store the converted playlist on the user's playlist folder, you can make YAAP load a playlist automatically at startup by using commandline arguments (e.g.: "C:\YAAP\YAAP.exe converted.ypf").

EDIT2: Since 3.9 you can use only a playlist name (like the example above) to load a playlist that's inside the user's playlists folder or specify a path to load a playlist outside the folder (e.g.: "C:\YAAP\YAAP.exe C:\Random folder\Random playlist.ypf").

I can do the playlist loading thing right now. The registry could take a bit - pywin32 has no documentation that I can find. ah, nope, got it. Implementing now.
« Last Edit: January 28, 2011, 09:16:00 pm by lavacano201014 »

Green = listening, red = surfing

lavacano201014

  • Hero Member
  • *****
  • Posts: 1757
  • We're an underground revolution working overtime.
    • ICQ Messenger - 431938899
    • MSN Messenger - thatotherguy370@msn.com
    • AOL Instant Messenger - lavacano201014
    • Yahoo Instant Messenger - lavacano201014
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #11 on: January 28, 2011, 09:54:00 pm »
Pardon my double toast, but the update is live.

Green = listening, red = surfing

ViRUS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3156
    • MSN Messenger - newvirus@live.com.ar
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #12 on: August 01, 2011, 08:00:16 pm »
Just wanted to say that I fixed the bug on YAAP when loading playlists with spaces on the filename via command line so it should be working on M3U2YAAP as well.

EDIT:
Just tried it and it's still not working. I'm 100% sure this works fine on YAAP's side as I tested it myself in many different ways. How's M3U2YAAP sending the location of the converted playlist?

Also, it's loading the directory where YAAP playlists are stored as the YAAP exe location.
« Last Edit: August 01, 2011, 08:05:29 pm by ViRUS »


SohnoJam

  • Jr. Member
  • **
  • Posts: 87
  • nin addict
    • MSN Messenger - jetta-jetta@hotmail.com
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #13 on: October 25, 2011, 05:46:30 pm »
I'm running into a little issue here. It adds the directory the .m3u file is located in at the beggining of every line. Nothing Notepad++ won't have fixed, but you might want to have that looked into.

Lebon14

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Email
Re: M3U to YAAP Playlist Converter
« Reply #14 on: February 07, 2012, 11:33:32 pm »
I have an even more simple solution that this addon to convert M3U to YAAP.

change the .m3u extension to .ypf

Problem solved and it works.
True story.
«AudioSurf, you'll love it!»
by Sloganizer
Core i7 950 3.06GHz, 6GB 1333MHz DDR3 Corsair XMS3 RAM, Asus nVidia Geforce GTX460 1GB Factory Overclocked, ~1.5To of data storage, 90GB OCZ Vertex 2 SSD, 1x LG Blu-ray drive (burns CD and DVD too) & HT Omega Claro sound card, Asus VW246H 1920x1080 HDMI