# HG changeset patch # User drewp@bigasterisk.com # Date 2011-06-15 05:31:33 # Node ID 9071cd1bb29cdb7c78650bac5a0a29d83baec03c # Parent 46d319974176dd61444a8288b3e41a755db07014 fix wavecurve Ignore-this: 49aff50aa4bcbb6fe0aec412c46d7911 diff --git a/bin/wavecurve b/bin/wavecurve --- a/bin/wavecurve +++ b/bin/wavecurve @@ -26,10 +26,12 @@ if options.all: 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" % ( diff --git a/light9/ascoltami/playlist.py b/light9/ascoltami/playlist.py --- a/light9/ascoltami/playlist.py +++ b/light9/ascoltami/playlist.py @@ -32,11 +32,14 @@ class Playlist(object): """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):