Jump to content

Playlist question


Recommended Posts

Hi to all,

This is my first post on this forum, but i browser it every day for 2/3 years :P

Im writting a mediaplayer with streaming support...now i want to add .mu3 and .pls support. Yesterday i see other player with this function on the forum...but but unfortunately I lost the source of this programm.

I see that they use regex for grab the link in the file...but i don't know how i can grab that link...

Can anyone explain me how i can do that and grab the streaming link?...

I search on the forum for hour but i dont found that damn topic :x

Hi, thank's for help!

Link to comment
Share on other sites

See the part where you posted code and showed what is failing to work, ohhhh right that never happened you just keep adding useful bits like "UP".

Nonetheless, here is how I would parse M3Us (edit, apparently transposed the 3 and U in the code as well) and feed them to a media player.

#Include <File.au3>
#include <Array.au3>


Dim $MU3array , $mp3s[1]


 $I= inputbox ("M3U??" , "Select M3U File")
    _FileReadToArray ($I, $MU3array)


    $URLs = _ArrayFindAll ($MU3array , "http://" , 0 ,0 ,0 , 1)


    For $k = 0 to ubound ($URLs) - 1

        _ArrayAdd ($mp3s , $MU3array[$URLs[$k]])
    Next

_ArrayDelete ($mp3s , 0)

$HttpMarkup = _ArrayToString ($mp3s)

$noMarkup = StringRegExpReplace ($HttpMarkup , "%20" , " ")

$mp3list = StringSplit ($noMarkup , "|")


For $m = 1 to $mp3list[0]

runwait ("mplay32 /play " & $mp3list[$m])

Next
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...