[conduit] Fixed iPodModule configuration.
- From: Alexandre Rosenfeld <arosenfeld src gnome org>
 
- To: svn-commits-list gnome org
 
- Subject: [conduit] Fixed iPodModule configuration.
 
- Date: Sun,  7 Jun 2009 14:54:47 -0400 (EDT)
 
commit 154f5d01b82958745e13cb38eadd6e5a38528c84
Author: Alexandre Rosenfeld <airmind gmail com>
Date:   Sun Jun 7 15:50:08 2009 -0300
    Fixed iPodModule configuration.
---
 conduit/modules/iPodModule/iPodModule.py |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/conduit/modules/iPodModule/iPodModule.py b/conduit/modules/iPodModule/iPodModule.py
index 854b8b7..2363023 100644
--- a/conduit/modules/iPodModule/iPodModule.py
+++ b/conduit/modules/iPodModule/iPodModule.py
@@ -700,7 +700,9 @@ class IPodMediaTwoWay(IPodBase):
         #self.tracks = {}
         self.tracks_id = {}
         self.track_args = {}
-        self.keep_converted = True
+        self.update_configuration(
+            keep_converted = True,
+        )
         
     def get_db(self):
         if self.db:
@@ -846,7 +848,9 @@ class IPodMusicTwoWay(IPodMediaTwoWay):
     def __init__(self, *args):
         IPodMediaTwoWay.__init__(self, *args)
         self.encodings = IPOD_AUDIO_ENCODINGS
-        self.encoding = 'aac'
+        self.update_configuration(
+            encoding = 'mp3',
+        )
 
 IPOD_VIDEO_ENCODINGS = {
     #FIXME: Add iPod mpeg4 restrictions. Follow:
@@ -880,8 +884,10 @@ class IPodVideoTwoWay(IPodMediaTwoWay):
     def __init__(self, *args):
         IPodMediaTwoWay.__init__(self, *args)
         self.encodings = IPOD_VIDEO_ENCODINGS
-        self.encoding = 'mp4_x264'
-        self.video_kind = 'movie'
+        self.update_configuration(
+            encoding = 'mp4_x264',
+            video_kind = 'movie',
+        )
         self._update_track_args()
         
     def _update_track_args(self):
@@ -899,11 +905,5 @@ class IPodVideoTwoWay(IPodMediaTwoWay):
         
     def set_configuration(self, config):
         IPodMediaTwoWay.set_configuration(self, config)
-        if 'video_kind' in config:
-            self.video_kind = config['video_kind']
+        #FIXME Move this to update_configuration callback
         self._update_track_args()
-
-    def get_configuration(self):
-        config = IPodMediaTwoWay.get_configuration(self)
-        config.update({'video_kind':self.video_kind})
-        return config
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]