Page 1 of 1

VLC can't load songs from playlist using URL since 1.1.0

Posted: 03 Aug 2010 10:03
by Donama
I was previously using VLC 1.0.5 and when I upgraded to 1.1.2 yesterday found out that VLC now won't load songs from my XSPF playlists that use a URL (of the form file://localhost/C:/folder/song.mp3 instead of file path C:\folder\song.mp3). It gets an I/O error as if it can't understand the file location string in my XML.

Why has this changed? All my XSPF files are now broken :(

I get the same problem in VLC 1.1.0 and 1.1.1. Am using Windows XP so possibly it's only in the Win32 releases of VLC.

Snippet of problematic XSPF which won't load the song:

Code: Select all

<trackList> <track> <location>file://localhost/F:/musik/Franz%20Ferdinand/Franz%20Ferdinand/11%2040'.mp3</location> <creator>Franz Ferdinand</creator> <album>Franz Ferdinand</album> <title>40'</title> <duration>204486</duration> </track> ... </trackList>

Re: VLC can't load songs from playlist using URL since 1.1.0

Posted: 03 Aug 2010 17:11
by RĂ©mi Denis-Courmont
Looks like a bug to me.

Re: VLC can't load songs from playlist using URL since 1.1.0

Posted: 04 Aug 2010 03:35
by Donama
Does anyone know how I could verify whether or not it is a bug?

Or where I could find the ticket relating to the change that altered this functionality?

Thanks

Re: VLC can't load songs from playlist using URL since 1.1.0

Posted: 04 Aug 2010 03:45
by Donama
In case anyone has the same problem, here is the XSLT I have used to fix up my existing XSPF files (of the flavour created by Sift project) to work in VLC 1.1.x. May need adapting if you want to keep more information than just the creator, album, title and duration for each track.

NB: This experiment showed that the URL form file:///c:/folder/song.mp3 will work, just not file://localhost/c:/folder/song.mp3 (thanks to advice from Remi on this thread viewtopic.php?f=2&t=77605).

Code: Select all

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="http://xspf.org/ns/0/" xmlns:spf="http://xspf.org/ns/0/"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/" xmlns="http://xspf.org/ns/0/"> <xsl:for-each select="spf:playlist" xmlns:spf="http://xspf.org/ns/0/"> <playlist xsl:exclude-result-prefixes="spf"> <title><xsl:value-of select="spf:title"/></title> <identifier><xsl:value-of select="spf:identifier"/></identifier> <trackList> <xsl:for-each select="spf:trackList/spf:track"><track> <location><xsl:choose> <xsl:when test="contains(spf:location, 'file://localhost/')">file:///<xsl:value-of select="substring-after(spf:location,'file://localhost/')"/></xsl:when> <xsl:otherwise><xsl:value-of select="spf:location"/></xsl:otherwise> </xsl:choose></location> <creator><xsl:value-of select="spf:creator"/></creator> <album><xsl:value-of select="spf:album"/></album> <title><xsl:value-of select="spf:title"/></title> <duration><xsl:value-of select="spf:duration"/></duration> </track></xsl:for-each> </trackList> </playlist> </xsl:for-each> </xsl:template> </xsl:stylesheet>