diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-24 18:38:28 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-09-24 18:38:28 +0800 |
commit | bdf1742497065587b495060e2b2b10526e77d5de (patch) | |
tree | 8aa967d87cea5f451f966ae5288c9a1ae7161ec9 | |
parent | 5817847ba7e7f76bc3fcca7249fb8bc23e44d243 (diff) |
totem: don't load system playlist if user's playlist exists
-rw-r--r-- | totem/plugin/sopcast.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/totem/plugin/sopcast.py b/totem/plugin/sopcast.py index dffbb39..e546bd1 100644 --- a/totem/plugin/sopcast.py +++ b/totem/plugin/sopcast.py @@ -528,9 +528,9 @@ class Sopcast (totem.Plugin): def load_playlist (self, path = sc_playlist): parser = ConfigParser.ConfigParser () if not parser.read ([path]): - return [] + return None if not parser.has_section ('playlist'): - return [] + return None result = {} for item in parser.items ('playlist'): key = item[0] @@ -656,8 +656,8 @@ class Sopcast (totem.Plugin): def load_personal_channels (self): try: self.playlist = self.load_playlist () - if not self.playlist: - self.playlist = self.load_playlist (sc_system_playlist) + if self.playlist is None: + self.playlist = self.load_playlist (sc_system_playlist) or [] except Exception, e: print 'Failed to load play list', e self.playlist = [] |