# HG changeset patch # User drewp@bigasterisk.com # Date 2011-06-14 07:40:36 # Node ID 9ec0396c6f1fde697bca771ed71befeb90ad68bf # Parent ef09899cd92c84c10b128a104d17015dd742c453 small asco bugs left over from last year Ignore-this: e4ff6d000a1f51ee35c507f9f9e74fe9 diff --git a/bin/ascoltami2 b/bin/ascoltami2 --- a/bin/ascoltami2 +++ b/bin/ascoltami2 @@ -4,7 +4,7 @@ from rdflib import URIRef sys.path.append(".") from light9.ascoltami.player import Player from light9.ascoltami.playlist import Playlist, NoSuchSong -from light9.ascoltami.webapp import makeApp +from light9.ascoltami.webapp import makeWebApp from light9 import networking, showconfig class App: diff --git a/light9/ascoltami/player.py b/light9/ascoltami/player.py --- a/light9/ascoltami/player.py +++ b/light9/ascoltami/player.py @@ -21,7 +21,8 @@ class Player(object): self.playStartTime = 0 self.lastWatchTime = 0 self.autoStopTime = 0 - + self.onEOS = onEOS + # before playbin2: #self.pipeline = gst.parse_launch("filesrc name=file location=%s ! wavparse name=src ! audioconvert ! alsasink name=out" % songFile) diff --git a/light9/ascoltami/playlist.py b/light9/ascoltami/playlist.py --- a/light9/ascoltami/playlist.py +++ b/light9/ascoltami/playlist.py @@ -7,6 +7,7 @@ class NoSuchSong(ValueError): class Playlist(object): def __init__(self, graph, playlistUri): + self.graph = graph self.songs = list(graph.items(playlistUri)) def nextSong(self, currentSong): """Returns the next song in the playlist or raises NoSuchSong if @@ -31,7 +32,7 @@ class Playlist(object): """Returns a list of the filesystem paths to all songs in order.""" paths = [] for song in self.songs: - p = graph.value(song, L9['showPath']) + p = self.graph.value(song, L9['showPath']) assert p.startswith("file://"), p p = p[len("file://"):] paths.append(p)