|
-
May 17th, 2002, 10:11 PM
#1
Thread Starter
Fanatic Member
Listview Listitem TAG property & .m3u
Hey, I'm planning on actually doing this right this time for compatibility. Can someone give me an example of how to use the Listview.listitem "tag" property? I'm wanting to do this so I can save playlists in my program as m3u. Also, I know these playlists are just text files, but how are they arranged? I want to be able to create playlists that are compatible with Winamp & Mediaplayer, as well as my program. I was using my own file extension and textfile pattern, but it was only compatible with my program. Sooo........ I'm wanting to go *.m3u. Any help is extremely appreciated.
-
May 17th, 2002, 10:23 PM
#2
PowerPoster
Just make a simple, one line playlist in winamp, then open it with notepad. I know the first line is always #EXTM3U, then comments are preceeded by # as well, I think. In my winamp playlist, each song filename is preceeded with a line
#EXTINF:songlength(315),trackname(AC/DC - It's a Long Way To the Top)
But I don't know if windows media player reads those lines.
-
May 17th, 2002, 10:26 PM
#3
PowerPoster
Oh and you can use the listview's tag property for anything... it holds a variant I believe:
VB Code:
ListView1.ListItems(1).Tag = "whatever (string or number)"
-
May 18th, 2002, 12:55 AM
#4
Thread Starter
Fanatic Member
M3U trouble
Ok, here's a good one for you. If I open and then copy and paste all the info in a m3u to another and save it, it works and loads in winamp, but say I just cut and paste the first 2 songs then it loads into the playlist, but won't play. and if you rightclick on it in the winamp playlist and choose show file info, it says "no file". Any ideas on this? So basically this works:
#EXTM3U
#EXTINF:310,Puddle of Mudd - Blurry (acoustic)(1)
D:\My Music\Other\Puddle of Mudd - Blurry (acoustic)(1).mp3
#EXTINF:184,Jimmy Eat World - The Middle (Acoustic)
D:\My Music\Other\Jimmy Eat World - The Middle (Acoustic).mp3
#EXTINF:281,train - drops of jupiter (acoustic)
D:\My Music\Other\Train - Drops of Jupiter (acoustic).mp3
#EXTINF:238,Weezer - Pink Triangle
D:\My Music\Weezer - Pink Triangle.mp3
#EXTINF:259,Tenacious D - Tribute
D:\My Music\Other\Tenacious D - Tribute to the Greatest Song in the World.mp3
and this doesn't:
#EXTM3U
#EXTINF:310,Puddle of Mudd - Blurry (acoustic)(1)
D:\My Music\Other\Puddle of Mudd - Blurry (acoustic)(1).mp3
Now if I'm right here, this makes no sense. #EXTM3U states the file is a playlist, the #EXTINF:310,Puddle of Mudd - Blurry (acoustic)(1) tells winamp the track is 310 secs, and the rest is the tag info. Then the followin line is simply the path of the file. So why would my second example not work. Any enlightenment is appreciated.
-
May 18th, 2002, 01:25 AM
#5
PowerPoster
Do you have a return after the filename? There might need to be a blank line after the file name for winamp to read it properly.
-
May 18th, 2002, 01:28 AM
#6
Thread Starter
Fanatic Member
don't know but......
I opened up an old Napster *.m3u playlist in notepad and it just has filepaths. And Mediaplayer and Winamp both read this so I guess it's the best way to go. Thanks for your help
-
May 18th, 2002, 01:41 AM
#7
Thread Starter
Fanatic Member
Nevermind!
Winamp load the list but won't play it, and Mediaplayer says the filepath doesn't exist when it does. Is *.m3u not a STANDARD? Seems like it should be.
-
May 18th, 2002, 09:38 AM
#8
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|