summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2010-01-30 23:15:02 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2010-02-09 00:08:20 +0800
commitb113b4d39874bb1be0b0c3bd91a32f0d79889400 (patch)
tree694bcfccd920edfb67e5d0bbcb698a4b6a48806f
parent097ee411a2f8d1ff6dab8c2faa51bf77355001d3 (diff)
totem: some cleanups
-rw-r--r--totem/plugin/ppstream.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/totem/plugin/ppstream.py b/totem/plugin/ppstream.py
index a9ab651..034b0d4 100644
--- a/totem/plugin/ppstream.py
+++ b/totem/plugin/ppstream.py
@@ -530,12 +530,12 @@ class PPStream (totem.Plugin):
def __parse_movies (self, res, class_path, page, count):
cls = self.get_movie_class (class_path)
+ result = None
if res:
try:
result = self.ppslist.parseMovieList(cls, res, page)
except Exception, e:
print "Couldn't parse movie list:", class_path, e
- result = None
cls.parsing_movies = False
return result
@@ -1253,14 +1253,6 @@ class PPStream (totem.Plugin):
selection.connect ("changed", self.on_movies_selection_changed)
def on_add_to_playlist (self, treeview):
- ### add selected movie to recent list
- treeview_name = 'movies'
- treeview = self.treeview[treeview_name]
- selection = treeview.get_selection ()
- model = treeview.get_model ()
- model, rows = selection.get_selected_rows ()
- self.add_movie_to_recent (treeview, rows[0])
-
treeview_name = 'files'
treeview = self.treeview[treeview_name]
selection = treeview.get_selection ()
@@ -1272,6 +1264,14 @@ class PPStream (totem.Plugin):
mrl = model.get_value (iter, 2)
self.totem.action_remote (totem.REMOTE_COMMAND_ENQUEUE, mrl)
+ ### add selected movie to recent list
+ treeview_name = 'movies'
+ treeview = self.treeview[treeview_name]
+ selection = treeview.get_selection ()
+ model = treeview.get_model ()
+ model, rows = selection.get_selected_rows ()
+ self.add_movie_to_recent (treeview, rows[0])
+
def on_copy_location (self, action):
treeview_name = 'files'
treeview = self.treeview[treeview_name]
@@ -1406,7 +1406,8 @@ class PPStream (totem.Plugin):
### add selected movie to recent list
movies_treeview = self.treeview['movies']
- movies_model, movies_rows = movies_treeview.get_selection ().get_selected_rows ()
+ selection = movies_treeview.get_selection ()
+ movies_model, movies_rows = selection.get_selected_rows ()
self.add_movie_to_recent (movies_treeview, movies_rows[0])
def on_movies_selection_changed (self, selection):