Mercurial > code > home > repos > light9
changeset 624:9071cd1bb29c
fix wavecurve
Ignore-this: 49aff50aa4bcbb6fe0aec412c46d7911
author | drewp@bigasterisk.com |
---|---|
date | Wed, 15 Jun 2011 05:31:33 +0000 |
parents | 46d319974176 |
children | ad41fdc33a91 |
files | bin/wavecurve light9/ascoltami/playlist.py |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/wavecurve Wed Jun 15 05:30:19 2011 +0000 +++ b/bin/wavecurve Wed Jun 15 05:31:33 2011 +0000 @@ -26,10 +26,12 @@ from light9 import showconfig from light9.namespaces import L9 from rdflib import RDF + from light9.ascoltami.playlist import Playlist graph = showconfig.getGraph() playlist = Playlist.fromShow(showconfig.getGraph(), showconfig.showUri()) - for inpath in playlist.allSongPaths(): + for song in playlist.allSongs(): + inpath = playlist.songPath(song) for curveName, t in [('music', .01), ('smooth_music', .07)]: outpath = showconfig.curvesDir() + "/%s-%s" % (
--- a/light9/ascoltami/playlist.py Wed Jun 15 05:30:19 2011 +0000 +++ b/light9/ascoltami/playlist.py Wed Jun 15 05:31:33 2011 +0000 @@ -32,11 +32,14 @@ """Returns a list of the filesystem paths to all songs in order.""" paths = [] for song in self.songs: - p = self.graph.value(song, L9['showPath']) - assert p.startswith("file://"), p - p = p[len("file://"):] - paths.append(p) + paths.append(self.songPath(song)) return paths + + def songPath(self, uri): + """filesystem path to a song""" + p = self.graph.value(uri, L9['showPath']) + assert p.startswith("file://"), p + return p[len("file://"):] @classmethod def fromShow(playlistClass, graph, show):