Jump to content
Sign in to follow this  
StungStang

Playlist question

Recommended Posts

StungStang

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!

Share this post


Link to post
Share on other sites
iamtheky

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

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

Share this post


Link to post
Share on other sites
StungStang

It dont work always, mu3 file can contain mms:// or more than one link,...i see on script example 3/4 player with the same mu3 parser...it work very well but i've lost the source :x

Share this post


Link to post
Share on other sites
StungStang

Problem solved, i've write a great mu3 and .pls parser, all work very good :x

Hi to all

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.