Image 01
profile-image

rickcox

Rick Cox
AmarokMPC

Amarok 1.x Scripts by chrisKA 19 comments

I guess the link doesn't work. Try this instead:

http://www.kde-apps.org/content/show.php?content=78111 - Mar 31 2008
AmarokMPC

Amarok 1.x Scripts by chrisKA 19 comments

While I'm no Python expert I realize my instructions may have been confusion to someone completely unfamiliar with programming. To save you the hassle of having to search and find the fix, here is my updated file.

DISCLAIMER:
I haven't used this for a while and haven't tested it on any newer versions of Amarok. Let me know if it works for you.

Link:
http://www.filedropper.com/amarokmpc - Mar 23 2008
AmarokMPC

Amarok 1.x Scripts by chrisKA 19 comments

I had a problem with this working with Amarok 1.4.7. I found this was due to the current.xml playlist file not haveing a filename field. To fix I replaced the getCurrentPlaylist function / definition with the following (taken from a transcode script) with changes in bold:

Quote:
def getCurrentPlaylist(playlistPath):
# create Reader object
reader = Sax2.Reader()
# parse the document
file = codecs.open(playlistPath, encoding='utf-8')
doc = reader.fromStream(playlistPath)
playlist = []
playlistElem = doc.getElementsByTagName('playlist')[0]
for itemElem in playlistElem.getElementsByTagName('item'):

filename = itemElem.getAttribute("url")
filename = filename.replace("file://", "").replace("file:", "")
filename = filename.replace("%20"," ").replace("%27","'").replace("%26","&").replace("%23","#").replace("%2B","+").replace("%3D","=").replace("%3F","?").replace("%5B","[").replace("%5D","]").replace("%25","%").replace("%3A",":")

playlist.append(filename)

return playlist
- Aug 27 2007