Currently in the process of developing a web interface for XBMC that involves ajax. Because of the limitations of our ajax functionality, I had to resort to using local resources instead of my usual ajax class which generates output. I am working with a specific string where the * indicates potential changes.
Here is the string:
Filename:smb://SERVER/Music/3 Doors Down/2000 The Better Life/07 Better Life.mp3 PlayStatus:Playing SongNo:6 Type:Audio Title:Better Life Track:7 Artist:3 Doors Down Album:The Better Life Genre:Alternative Year:2000 URL:smb://xbox:xbox@SERVER/Music/3 Doors Down/2000 The Better Life/07 Better Life.mp3 Lyrics: Bitrate:193 Samplerate:44 Thumb:DefaultAlbumCover.png Time:02:05 Duration:03:07 Percentage:66 File size:4509417 Changed:False
I am trying to figure out how to match the Title, Artist, Time and Duration. I attempted regex but haven't been successful due to limited JS knowledge.
Thanks, Brantje
EDIT: "Are you sure that's the string? All run together like that with no newlines? Edit: I edited the question to fix the formatting. – Ariel 2 hours ago"
Nope, The output from Shows as follows when playing a video
HTML code:
<html>
<li>Filename:smb://SERVER/Movies/Drive Angry/Drive Angry (2011) DVDRip XviD-MAXSPEED.avi
<li>PlayStatus:Playing
<li>VideoNo:0
<li>Type:Video
<li>Thumb:DefaultVideoCover.png
<li>Time:00:00:28
<li>Duration:01:44:31
<li>Percentage:0
<li>File size:1666804442
<li>Changed:False</html>
When playing music it's slightly different.
<html>
<li>Filename:smb://SERVER/Music/3 Doors Down/2000 The Better Life/01 Kryptonite.mp3
<li>PlayStatus:Playing
<li>SongNo:-1
<li>Type:Audio
<li>Title:Kryptonite
<li>Track:1
<li>Artist:3 Doors Down
<li>Album:The Better Life
<li>Genre:Alternative
<li>Year:2000
<li>URL:smb://xbox:xbox@SERVER/Music/3 Doors Down/2000 The Better Life/01 Kryptonite.mp3
<li>Lyrics:
<li>Bitrate:192
<li>Samplerate:44
<li>Thumb:DefaultAlbumCover.png
<li>Time:00:05
<li>Duration:03:54
<li>Percentage:2
<li>File size:5618471
<li>Changed:False</html>