FAQ  •  Register  •  Login

ASX Playlists in media scan

<<

Peteyus

Serviio newbie

Posts: 10

Joined: Sun Sep 08, 2013 5:39 pm

Post Sun Dec 01, 2013 6:48 pm

ASX Playlists in media scan

I am running Serviio 1.3.1 on a Windows Home Server machine that serves as a media server for my home network. I have two Windows Media center boxes which access the video files on my server (via direct file share), and then I have a small DLNA box hooked up to one TV and a friend who uses MediaBrowser to access my videos from her home. Serviio has so far been great but I have a small problem with playlists.

I have a script that runs which creates ASX playlists for my Windows Media Center boxes (and works wonderfully) to shuffle episodes of my favorite shows or to create a "season" playlist that plays the episodes in order. It's working perfectly on there but I would like my other boxes to be able to access the playlists as well. I assumed that it was not working on Serviio because it didn't support ASX files but then I looked in the logs and saw it was having a problem parsing my files. Here is a sample log entry:

  Code:
2013-12-01 10:52:42,515 WARN  [LibraryAdditionsCheckerThread] Cannot add playlist file Shuffle.asx. Message: Cannot parse playlist (ASX) 'D:\shares\Videos\Playlists\Simpsons\Shuffle.asx' because: Error on line 145: The entity name must immediately follow the '&' in the entity reference.
org.serviio.library.playlist.CannotParsePlaylistException: Cannot parse playlist (ASX) 'D:\shares\Videos\Playlists\Simpsons\Shuffle.asx' because: Error on line 145: The entity name must immediately follow the '&' in the entity reference.
   at org.serviio.library.playlist.AsxParserStrategy.parsePlaylist(AsxParserStrategy.java:75)
   at org.serviio.library.playlist.PlaylistParser.parse(PlaylistParser.java:64)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.addNewPlaylistFile(LibraryAdditionsCheckerThread.java:226)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:149)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:134)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:134)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.run(LibraryAdditionsCheckerThread.java:83)


And here is the "offending" entry in the ASX file:

  Code:
<Entry>
<Param Name = "SourceURL" Value = "\\motherbrain\videos\Simpsons, The\Season 18\Simpsons, The - S18E09 - Kill Gil, Volumes I & II.avi" />
<Title>Simpsons, The - S18E09 - Kill Gil, Volumes I & II.avi</Title>
<Ref href = "\\motherbrain\videos\Simpsons, The\Season 18\Simpsons, The - S18E09 - Kill Gil, Volumes I & II.avi" />
</Entry>


This appears on all playlists which have an ampersand in any of the file names. However, even if the file names don't have an ampersand, I get an error like this:

  Code:
2013-12-01 10:58:42,234 WARN  [LibraryAdditionsCheckerThread] Cannot add playlist file Shuffle.asx. Message: Cannot parse playlist (ASX) 'D:\shares\Videos\Playlists\Futurama\Shuffle.asx' because: Invalid byte 2 of 4-byte UTF-8 sequence.
org.serviio.library.playlist.CannotParsePlaylistException: Cannot parse playlist (ASX) 'D:\shares\Videos\Playlists\Futurama\Shuffle.asx' because: Invalid byte 2 of 4-byte UTF-8 sequence.
   at org.serviio.library.playlist.AsxParserStrategy.parsePlaylist(AsxParserStrategy.java:77)
   at org.serviio.library.playlist.PlaylistParser.parse(PlaylistParser.java:64)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.addNewPlaylistFile(LibraryAdditionsCheckerThread.java:226)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:149)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:134)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.searchForNewFiles(LibraryAdditionsCheckerThread.java:134)
   at org.serviio.library.local.metadata.LibraryAdditionsCheckerThread.run(LibraryAdditionsCheckerThread.java:83)


Any thoughts? I was planning to just create a second set of playlists for Serviio but if I can make both the file system and Serviio work with the same set that would be more ideal!
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Dec 02, 2013 9:14 pm

Re: ASX Playlists in media scan

Your ASX is an invalid XML - ampersand must be escaped as &amp;

The other problem - it looks like the file is saves using an unsupported character encoding, try with just a simple UTF-8, or even iso-8859-1
<<

Peteyus

Serviio newbie

Posts: 10

Joined: Sun Sep 08, 2013 5:39 pm

Post Tue Dec 03, 2013 12:07 am

Re: ASX Playlists in media scan

I'm creating the playlists via a VBScript so I'm not entirely sure I have control over the encoding at creation time but since it's trying to read it as UTF I changed the CreateTextFile method to create it as a Unicode file and now I'm getting the following:

  Code:
2013-12-02 17:00:47,140 WARN  [PlaylistParser] Could not find a suitable playlist parser for file 'D:\shares\Videos\Playlists\Simpsons\Shuffle.asx', it is either not supported or the file is corrupted.


Here is the header, first entry, and footer from the playlist:

  Code:
<Asx Version = "3.0">
<Title>Shuffled Playlist</Title>

<Entry>
<Param Name = "SourceURL" Value = "\\motherbrain\videos\Simpsons, The\Season 09\Simpsons, The - S09E04 - Treehouse of Horror VIII.avi" />
<Title>Simpsons, The - S09E04 - Treehouse of Horror VIII.avi</Title>
<Ref href = "\\motherbrain\videos\Simpsons, The\Season 09\Simpsons, The - S09E04 - Treehouse of Horror VIII.avi" />
</Entry>

</Asx>


I created the file based off information from wikipedia, http://en.wikipedia.org/wiki/Advanced_Stream_Redirector

If there is a better playlist format I could use (that's compatible with Windows Media center as well as Serviio) I'm entirely open to writing a new script for that.
<<

Peteyus

Serviio newbie

Posts: 10

Joined: Sun Sep 08, 2013 5:39 pm

Post Tue Dec 03, 2013 3:36 pm

Re: ASX Playlists in media scan

Interesting side note -- when I change the format to unicode, Windows Media center (and Media Player and VLC) stops being able to read the playlist.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 05, 2013 8:11 pm

Re: ASX Playlists in media scan

attach an example playlist that was giving he original error (as unicode doesn't seem to be the way to go). not copy & paste, attach the file pls.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 21 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.