The branch, dharma has been updated
       via  973eea484e4a7e6aad617c39f9c9c6905cc67517 (commit)
       via  744e38b5c34bf89670b16644c9dd53fa8ccc109a (commit)
      from  5a94dcf22764e5bf29a9690eb9eea1a554d0d231 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=973eea484e4a7e6aad617c39f9c9c6905cc67517

commit 973eea484e4a7e6aad617c39f9c9c6905cc67517
Author: amet <[email protected]>
Date:   Wed Apr 27 11:34:17 2011 +0400

    [script.mpdc] - 1.0.3
    
    - added: per-profile option to start playing MPD right after an item was 
queued
    - fixed: MPD did not resume playing when queue was replaced
    - external python compatibility: needed to rename/move mpd.py and mopidy.py

diff --git a/script.mpdc/addon.xml b/script.mpdc/addon.xml
index 5fc0978..7540c57 100644
--- a/script.mpdc/addon.xml
+++ b/script.mpdc/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="script.mpdc"
        name="MPD Client"
-       version="1.0.2"
+       version="1.0.3"
        provider-name="lzoubek">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/script.mpdc/changelog.txt b/script.mpdc/changelog.txt
index a01d18d..9ea7063 100644
--- a/script.mpdc/changelog.txt
+++ b/script.mpdc/changelog.txt
@@ -1,3 +1,7 @@
+[B]1.0.3[/B]
+- added: per-profile option to start playing MPD right after an item was queued
+- fixed: MPD did not resume playing when queue was replaced
+- external python compatibility: needed to rename/move mpd.py and mopidy.py
 [B]1.0.2[/B]
 - added: any track, dir, artist, album can be added to any (or new) playlist
 - added: playlist details - we are displaying tracks, contained in selected 
playlist, tracks can be queued directly or removed from playlist
diff --git a/script.mpdc/default.py b/script.mpdc/default.py
index 893f454..f6e38bb 100644
--- a/script.mpdc/default.py
+++ b/script.mpdc/default.py
@@ -23,11 +23,11 @@ import xbmc,xbmcaddon,xbmcgui,xbmcplugin
 __scriptid__ = 'script.mpdc'
 __addon__ = xbmcaddon.Addon(id=__scriptid__)
 SERVER_LIST = 120
-ACTION_CLOSE = [10]
+ACTION_CLOSE = [9,10]
 STATUS = 100
 SETTINGS = 101
 sys.path.append( os.path.join ( __addon__.getAddonInfo('path'), 
'resources','lib') )
-import gui,mpd,dialog
+import gui,xbmpc,dialog
 
 STATUS_ON='on'
 STATUS_OFF='off'
@@ -67,7 +67,7 @@ class MpdProfile:
                if not self.enabled:
                        return
                try:
-                       client = mpd.MPDClient()
+                       client = xbmpc.MPDClient()
                        client.connect(self.host,int(self.port))
                        client.close()
                        client.disconnect()
@@ -112,8 +112,8 @@ class SelectMPDProfile ( xbmcgui.WindowXMLDialog ) :
                p.close()
                
        def onAction(self, action):
-               if action.getId() in ACTION_CLOSE:                              
                
-                       self.close()            
+               if action.getId() in ACTION_CLOSE:
+                       self.close()
        
        def onClick( self, controlId ):
                if controlId == SETTINGS:
diff --git a/script.mpdc/resources/language/Czech/strings.xml 
b/script.mpdc/resources/language/Czech/strings.xml
index d9cb60f..8a552f2 100644
--- a/script.mpdc/resources/language/Czech/strings.xml
+++ b/script.mpdc/resources/language/Czech/strings.xml
@@ -68,6 +68,7 @@
        <string id="30061">Vyberte prosím playlist</string>
        <string id="30062">Přidán do %s</string>
        <string id="30063"> * Nový playlist *</string>
+       <string id="30064">Začít přehrávat při přidání položky do 
fronty</string>
     <string id="200">Fronta</string>
     <string id="201">Soubory</string>
     <string id="202">Autoři</string>
diff --git a/script.mpdc/resources/language/English/strings.xml 
b/script.mpdc/resources/language/English/strings.xml
index b823bfb..8cb0fcd 100644
--- a/script.mpdc/resources/language/English/strings.xml
+++ b/script.mpdc/resources/language/English/strings.xml
@@ -67,6 +67,7 @@
        <string id="30061">Please select playlist</string>
        <string id="30062">Added to %s</string>
        <string id="30063"> * New playlist *</string>
+       <string id="30064">Start playing after item is queued</string>
     <string id="200">Queue</string>
     <string id="201">Files</string>
     <string id="202">Artists</string>
diff --git a/script.mpdc/resources/lib/gui.py b/script.mpdc/resources/lib/gui.py
index 12a3bcf..55bf2b9 100644
--- a/script.mpdc/resources/lib/gui.py
+++ b/script.mpdc/resources/lib/gui.py
@@ -20,7 +20,7 @@
 # */
 import sys,os,time,re,traceback,threading
 import xbmc,xbmcaddon,xbmcgui,xbmcplugin
-import pmpd,mpd,dialog,albumart,mopidy,playercontrols
+import pmpd,xbmpc,dialog,albumart,playercontrols
 __scriptid__ = 'script.mpdc'
 __addon__ = xbmcaddon.Addon(id=__scriptid__)
 __scriptname__ = __addon__.getAddonInfo('name')
@@ -130,7 +130,7 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                self.addon = xbmcaddon.Addon(id=__scriptid__)
                self.time_polling=False
                if 'false' == self.addon.getSetting('use-idle'):
-                       self.client = mopidy.MopidyMPDClient(poll_time = 
('true' == self.addon.getSetting('time-polling')))
+                       self.client = pmpd.MopidyMPDClient(poll_time = ('true' 
== self.addon.getSetting('time-polling')))
                else:
                        self.client = pmpd.PMPDClient(poll_time = ('true' == 
self.addon.getSetting('time-polling')))
                if 'true' == self.addon.getSetting('time-polling'):
@@ -166,6 +166,7 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                self.notification_enabled = self.addon.getSetting('notify') == 
'true'
                self.controls = playercontrols.Controls(self.skin)
                self.stop_on_exit = 
self.addon.getSetting(self.profile_id+'_stop_on_exit') == 'true'
+               self.play_on_queued= 
self.addon.getSetting(self.profile_id+'_play_on_queued') == 'true'
 
        def onFocus (self,controlId ):
                self.controlId=controlId
@@ -187,17 +188,13 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                try:
                        print 'Connecting  to  MPD ' + self.mpd_host + 
':'+self.mpd_port 
                        
self.client.connect(self.mpd_host,int(self.mpd_port),self.mpd_pass)
-               except mpd.CommandError:
-                       traceback.print_exc()
-                       formatted_lines = traceback.format_exc().splitlines()
-                       
xbmcgui.Dialog().ok(STR_NOT_CONNECTED,formatted_lines[-1])
-                       self.exit()
-                       return
                except:
-                       self._status_notify(STR_NOT_CONNECTED)
                        traceback.print_exc()
                        print 'Cannot connect'
                        p.close()
+                       formatted_lines = traceback.format_exc().splitlines()
+                       
xbmcgui.Dialog().ok(STR_NOT_CONNECTED,formatted_lines[-1])
+                       self.exit()
                        return
                print 'Connected'
                try:
@@ -606,12 +603,12 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                if state == 'play':
                        self._play_stream()     
 
-       def _queue_item(self,replace=False):
+       def _queue_item(self,replace=False,play=False):
                if replace:
                        stopped = self._stop_if_playing()
                        self.client.stop()
                        self.client.clear()
-                       self._queue_item()
+                       self._queue_item(play=stopped or play)
                if self.getFocusId() == PLAYLIST_DETAILS:
                        item = 
self.getControl(PLAYLIST_DETAILS).getSelectedItem()
                        self.client.add(item.getProperty('file'))
@@ -641,7 +638,7 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                                                self.client.add(f_item['file'])
                                        self.client.command_list_end()
                                        
self._status_notify(status,STR_WAS_QUEUED)
-               if stopped and replace:
+               if play or self.play_on_queued:
                        self.client.play()
 
        def _context_menu(self):
@@ -803,13 +800,15 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
                if ret == 0:
                        self.client.load(playlist)
                        self._status_notify('Playlist 
%s'%playlist,STR_WAS_QUEUED)
+                       if self.play_on_queued:
+                               self.client.play()
                elif ret == 1:
                        stopped = self._stop_if_playing()
                        self.client.stop()
                        self.client.clear()
                        self.client.load(playlist)
                        self._status_notify('Playlist 
%s'%playlist,STR_WAS_QUEUED)
-                       if stopped:
+                       if stopped or self.play_on_queued:
                                self.client.play()
                elif ret == 2:
                                kb = xbmc.Keyboard(playlist,STR_RENAME,False)
@@ -919,15 +918,15 @@ class GUI ( xbmcgui.WindowXMLDialog ) :
        def _exec_command(self,command):
                try:
                        exec(command)
-               except mpd.CommandError:
+               except xbmpc.CommandError:
                        traceback.print_exc()
                        formatted_lines = traceback.format_exc().splitlines()
                        xbmcgui.Dialog().ok('MPD',formatted_lines[-1])
-               except mpd.ProtocolError:
+               except xbmpc.ProtocolError:
                        traceback.print_exc()
                        self.disconnect()
                        self._status_notify(STR_NOT_CONNECTED)
-               except mpd.ConnectionError:
+               except xbmpc.ConnectionError:
                        traceback.print_exc()
                        self.disconnect()
                        self._status_notify(STR_NOT_CONNECTED)
diff --git a/script.mpdc/resources/lib/pmpd.py 
b/script.mpdc/resources/lib/pmpd.py
index 4c574c0..541bb8b 100644
--- a/script.mpdc/resources/lib/pmpd.py
+++ b/script.mpdc/resources/lib/pmpd.py
@@ -1,4 +1,4 @@
-import rmpd,select,threading,traceback,mpd,time
+import rmpd,select,threading,traceback,xbmpc,time,Queue
 
 # polling MPD Client
 class PMPDClient(object):
@@ -32,10 +32,10 @@ class PMPDClient(object):
 
        def try_command(self,command):
                if not command in self._permitted_commands:
-                       raise mpd.CommandError('No Permission for :'+command)
+                       raise xbmpc.CommandError('No Permission for :'+command)
        def __getattr__(self,attr):
                if not attr in self._permitted_commands:
-                       raise mpd.CommandError('No Permission for :'+attr)
+                       raise xbmpc.CommandError('No Permission for :'+attr)
                return self.client.__getattr__(attr)
                
        def connect(self,host,port,password=None):
@@ -142,4 +142,189 @@ class PMPDClient(object):
 #                              print "callback error"
 #                              traceback.print_exc()
                                return
+
+# polling MPD Client - combatible with mopidy
+class MopidyMPDClient(object):
+       def __init__(self,poll_time=False):
+               print self.__class__.__name__
+               self.client = rmpd.RMPDClient()
+               self.poller = rmpd.RMPDClient()
+               self.time_poller = rmpd.RMPDClient()
+               self.callback = None
+               self.thread = threading.Thread(target=self._poll)
+               self.thread.setDaemon(True)
+               self.event = threading.Event()
+               self.idle_queue= Queue.Queue()
+               self.recording = False
+               self.recored = []
+               self.time_callback = None
+               self._permitted_commands = []
+               self.time_thread = None
+               self.time_event = None
+               if poll_time:
+                       self.time_thread = 
threading.Thread(target=self._poll_time)
+                       self.time_thread.setDaemon(True)
+                       self.time_event = threading.Event()
+               feeder = threading.Thread(target=self._feed_idle)
+               feeder.setDaemon(True)
+               feeder.start()
+
+       def register_callback(self,callback):
+               self.callback = callback
+       def register_time_callback(self,callback):
+               self.time_callback=callback;
+       # need to call try_command before passing any commands to list!
+       def command_list_ok_begin(self):
+               self.recording = True
+               self.recorded_command_list = []
+               self.client.command_list_ok_begin()
+
+       def command_list_end(self):
+               self.recording = False
+               records = list(set(self.recorded_command_list))
+               for record in records:
+                       self._add_for_callback(record)
+               return self.client.command_list_end()
+
+       def try_command(self,command):
+               if not command in self._permitted_commands:
+                       raise xbmpc.CommandError('No Permission for :'+command)
+       def __getattr__(self,attr):
+               if not attr in self._permitted_commands:
+                       raise xbmpc.CommandError('No Permission for :'+attr)
+               if self.recording:
+                       self.recorded_command_list.append(attr)
+               else:
+                       self._add_for_callback(attr)
+               return self.client.__getattr__(attr)
+
+       def _add_for_callback(self,command):
+               if command in 
['play','stop','seekid','next','previous','pause']:
+                       self.idle_queue.put('player')
+               elif command in ['consume','repeat','random']:
+                       self.idle_queue.put('options')
+               elif command in ['setvol']:
+                       self.idle_queue.put('mixer')
+               elif command in ['clear','add','load','deleteid']:
+                       self.idle_queue.put('playlist')
+               elif command in ['rm','save']:
+                       self.idle_queue.put('stored_playlist')
+
+       def connect(self,host,port,password=None):
+               self.client.connect(host,port)
+               self.poller.connect(host,port)
+               if not password==None:
+                       self.client.password(password)
+                       self.poller.password(password)
+               self._permitted_commands = self.client.commands()
+               self.thread.start()
+               if not self.time_thread == None:
+                       self.time_poller.connect(host,port)
+                       self.time_thread.start()
+
+       def disconnect(self):
+               print 'disconnecting'
+               self.callback = None
+               try:
+                       self.client.close()
+               except:
+                       pass
+               try:
+                       self.client.disconnect()
+               except:
+                       pass
+               try:
+                       self.poller.close()
+               except:
+                       pass
+               try:
+                       self.poller.disconnect()
+               except:
+                       pass
+               try:
+                       print 'waiting for poller thread'
+                       if self.thread.isAlive():
+                               self.event.set()
+                               self.idle_queue.put('exit')
+                               self.thread.join(3)
+                       print 'done'
+               except:
+                       traceback.print_exc()
+
+               if not self.time_thread == None:
+                       print 'disconnecting time poller'
+                       try:
+                               self.time_poller.close()
+                       except:
+                               pass
+                       try:
+                               self.time_poller.disconnect()
+                       except:
+                               pass
+                       try:
+                               print 'waiting for time poller thread'
+                               if self.time_thread.isAlive():
+                                       self.time_event.set()
+                                       self.time_thread.join(3)
+                                       self.time_event=None
+                               print 'done'
+                       except:
+                               traceback.print_exc()
+               print 'client disconnected'
+
+       def _poll_time(self):
+               print 'Starting time poller thread'
+               while 1:
+                       try:
+                               status = self.time_poller.status()
+                               if not status['state'] == 'play':
+                                       self.time_event.wait(5)
+                               else:
+                                       
self.time_callback(self.time_poller,status)
+                                       self.time_event.wait(0.9)
+                               if self.time_event.isSet():
+#                                      print 'poller exited on event'
+                                       break;
+                       except:
+#                              print "time poller error"
+#                              traceback.print_exc()
+                               self.time_event.set()
+                               return
+       def _feed_idle(self):
+               self.event.wait(5)
+               if self.event.isSet():
+                       return
+               state = ''
+               songid = ''
+               while 1:
+                       status = self.poller.status()
+                       if not 'state' in status:
+                               status['state']=''
+                       if not 'songid' in status:
+                               status['songid'] = ''
+                       if not state == status['state']:
+                               self._add_for_callback('play')
+                               state = status['state']
+                               continue
+                       if not songid == status['songid']:
+                               self._add_for_callback('play')
+                               songid = status['songid']
+                               continue
+                       self.event.wait(5)
+                       if self.event.isSet():
+                               break
+       def _poll(self):
+               print 'Starting poller thread'
+               while 1:
+                       try:
+                               item =  self.idle_queue.get()
+                               self.event.wait(0.2)
+                               self.callback(self.poller,[item])
+                               if self.event.isSet():
+#                                      print 'poller exited on event'
+                                       break;
+                       except:
+#                              print "Poller error"
+#                              traceback.print_exc()
+                               return
                                
diff --git a/script.mpdc/resources/lib/rmpd.py 
b/script.mpdc/resources/lib/rmpd.py
index f57b90e..cea4bd6 100644
--- a/script.mpdc/resources/lib/rmpd.py
+++ b/script.mpdc/resources/lib/rmpd.py
@@ -1,8 +1,8 @@
 import socket
-import mpd
+import xbmpc
 
 # reconnecting wrapper for mpd client
-class RMPDClient(mpd.MPDClient):
+class RMPDClient(xbmpc.MPDClient):
     def __init__(self):
         self._host = None
         self._port = None
@@ -18,7 +18,7 @@ class RMPDClient(mpd.MPDClient):
     def _wrap(self, func, args):
         try:
             return func(*args)
-        except (socket.error, mpd.MPDError):
+        except (socket.error, xbmpc.MPDError):
             self._reconnect()
             return func(*args)
 
diff --git a/script.mpdc/resources/settings.xml 
b/script.mpdc/resources/settings.xml
index f77b527..b0b7a3a 100644
--- a/script.mpdc/resources/settings.xml
+++ b/script.mpdc/resources/settings.xml
@@ -17,8 +17,9 @@
                <setting label="30035" type="text" id="0_mpd_pass" 
option="hidden" default="" />
                <setting label="30048" type="folder" id="0_media_root"  
source="\"  default="" />
                <setting label="30034" type="bool" id="0_play_stream" 
default="false" />
-               <setting label="30033" type="text" id="0_stream_url" default="" 
/>
+               <setting label="30033" type="text" id="0_stream_url" default="" 
visible="eq(-1,true)" />
                <setting label="30058" type="bool" id="0_stop_on_exit" 
default="false" />
+               <setting label="30064" type="bool" id="0_play_on_queued" 
default="false" />
                <setting label="30052" type="bool" id="0_force_settings" 
default="false" />
                <setting label="30053" type="bool" id="0_force_random" 
default="false" visible="eq(-1,true)" />
                <setting label="30054" type="bool" id="0_force_repeat" 
default="false" visible="eq(-2,true)" />
@@ -33,8 +34,9 @@
                <setting label="30035" type="text" id="1_mpd_pass" 
option="hidden" default="" />
                <setting label="30048" type="folder" id="1_media_root"  
source="\"  default="" />
                <setting label="30034" type="bool" id="1_play_stream" 
default="false" />
-               <setting label="30033" type="text" id="1_stream_url" default="" 
/>
+               <setting label="30033" type="text" id="1_stream_url" default="" 
visible="eq(-1,true)" />
                <setting label="30058" type="bool" id="1_stop_on_exit" 
default="false" />
+               <setting label="30064" type="bool" id="1_play_on_queued" 
default="false" />
                <setting label="30052" type="bool" id="1_force_settings" 
default="false" />
                <setting label="30053" type="bool" id="1_force_random" 
default="false" visible="eq(-1,true)" />
                <setting label="30054" type="bool" id="1_force_repeat" 
default="false" visible="eq(-2,true)" />
@@ -49,8 +51,9 @@
                <setting label="30035" type="text" id="2_mpd_pass" 
option="hidden" default="" />
                <setting label="30048" type="folder" id="2_media_root"  
source="\"  default="" />
                <setting label="30034" type="bool" id="2_play_stream" 
default="false" />
-               <setting label="30033" type="text" id="2_stream_url" default="" 
/>
+               <setting label="30033" type="text" id="2_stream_url" default="" 
visible="eq(-1,true)" />
                <setting label="30058" type="bool" id="2_stop_on_exit" 
default="false" />
+               <setting label="30064" type="bool" id="2_play_on_queued" 
default="false" />
                <setting label="30052" type="bool" id="2_force_settings" 
default="false" />
                <setting label="30053" type="bool" id="2_force_random" 
default="false" visible="eq(-1,true)" />
                <setting label="30054" type="bool" id="2_force_repeat" 
default="false" visible="eq(-2,true)" />

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=744e38b5c34bf89670b16644c9dd53fa8ccc109a

commit 744e38b5c34bf89670b16644c9dd53fa8ccc109a
Author: amet <[email protected]>
Date:   Wed Apr 27 11:27:21 2011 +0400

    [script.mymediadb] -v 0.1.5
    
    - Fixed issues with movies without imdbIDs
    - Made the errors notification tell you what kind of error you got.

diff --git a/script.mymediadb/addon.xml b/script.mymediadb/addon.xml
index caabbb8..f27ad76 100644
--- a/script.mymediadb/addon.xml
+++ b/script.mymediadb/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon
   id="script.mymediadb"
-  version="0.1.4"
+  version="0.1.5"
   name="MyMediaDB"
   provider-name="mmdb"
   >
diff --git a/script.mymediadb/changelog.txt b/script.mymediadb/changelog.txt
index 208c6df..eb62a71 100644
--- a/script.mymediadb/changelog.txt
+++ b/script.mymediadb/changelog.txt
@@ -1,3 +1,7 @@
+[B]0.1.5[/B]
+- Fixed issues with movies without imdbIDs
+- Made the errors notification tell you what kind of error you got.
+
 [B]0.1.4[/B]
 - Added notifications, and now handles 404 exceptions. Fixed compabillity 
issues with python 2.6
 
diff --git a/script.mymediadb/default.py b/script.mymediadb/default.py
index 4ed055f..584291c 100644
--- a/script.mymediadb/default.py
+++ b/script.mymediadb/default.py
@@ -59,36 +59,40 @@ def syncWithMMDB():
     anyRemoteChanges = False
     anyLocalChanges = False
     for remoteMedia in mmdb_library:
-        localMedia = xbmcApp.getLocalMovie(remoteMedia['imdbId'])
-        if (localMedia != None):
-            debug('Media exists both locally and remotely - 
('+remoteMedia['name']+')')
-            if not remoteMedia['acquired']:
-                debug('Setting remote media status to acquired')
-                _setRemoteMovieTag(remoteMedia['imdbId'],{'acquired':True})
-                anyRemoteChanges = True
-            if(remoteMedia['experienced'] != localMedia['watched']):
-                debug('watched status is not synchronized')
-                if(addon.getSetting('dontsyncwatched') == 'false'):
-                    if(remoteMedia['experienced']):
-                        debug('setting local media to watched')
-                        xbmcApp.setLocalMovieAsWatched(localMedia['idFile'])
-                        anyLocalChanges = True
+        if(remoteMedia['imdbId']) != None:
+            localMedia = xbmcApp.getLocalMovie(remoteMedia['imdbId'])
+            if (localMedia != None): 
+                debug('Media exists both locally and remotely - 
('+remoteMedia['name']+')')
+                if not remoteMedia['acquired']:
+                    debug('Setting remote media status to acquired')
+                    _setRemoteMovieTag(remoteMedia['imdbId'],{'acquired':True})
+                    anyRemoteChanges = True
+                if(remoteMedia['experienced'] != localMedia['watched']):
+                    debug('watched status is not synchronized')
+                    if(addon.getSetting('dontsyncwatched') == 'false'):
+                        if(remoteMedia['experienced']):
+                            debug('setting local media to watched')
+                            
xbmcApp.setLocalMovieAsWatched(localMedia['idFile'])
+                            anyLocalChanges = True
+                        else:
+                            debug ('setting remote media to watched')
+                            
_setRemoteMovieTag(localMedia['imdbId'],{'experienced':localMedia['watched'] == 
1})
+                            anyRemoteChanges = True
                     else:
-                        debug ('setting remote media to watched')
-                        
_setRemoteMovieTag(localMedia['imdbId'],{'experienced':localMedia['watched'] == 
1})
+                        debug('Cancelled synchronize of watched status due to 
settings!')
+            else:
+                debug('Media ('+remoteMedia['name']+') exists only remotely')
+                if(remoteMedia['acquired'] == True):
+                    if(addon.getSetting('dontdeleteacquired') == 'false'):
+                        debug('Acquired flag was removed from mmdb')
+                        
_setRemoteMovieTag(remoteMedia['imdbId'],{'acquired':False})
                         anyRemoteChanges = True
-                else:
-                    debug('Cancelled synchronize of watched status due to 
settings!')
+                    else:
+                        debug('Acquired flag was not removed from mmdb due to 
settings!')
         else:
-            debug('Media ('+remoteMedia['name']+') exists only remotely')
-            if(remoteMedia['acquired'] == True):
-                if(addon.getSetting('dontdeleteacquired') == 'false'):
-                    debug('Acquired flag was removed from mmdb')
-                    
_setRemoteMovieTag(remoteMedia['imdbId'],{'acquired':False})
-                    anyRemoteChanges = True
-                else:
-                    debug('Acquired flag was not removed from mmdb due to 
settings!')
-            
+            #MISSING IMDBID in REMOTE MOVIE
+            debug('('+remoteMedia['name']+') was missing imdbID, please add it 
at TMDB.org')
+      
     #sync local media with remote db
     for localMedia in xbmcApp.getLocalMovieLibrary():
         if(remoteMovieExists(localMedia['imdbId'])):
@@ -196,7 +200,9 @@ try:
 except urllib2.URLError, e:
     if(e.code == 401):
         xbmc.executebuiltin('Notification(%s,%s,%s,%s)' % 
(addon.getAddonInfo('name'),e,3000,addon.getAddonInfo("icon")))
-except Exception:
-        xbmc.executebuiltin('Notification(%s,%s,%s,%s)' % 
(addon.getAddonInfo('name'),"An error occured.. check the logs! 
exiting!",3000,addon.getAddonInfo("icon")))
+except Exception, e:
+        xbmc.executebuiltin('Notification(%s,%s,%s,%s)' % 
(addon.getAddonInfo('name'),'Error: %s' %e,5000,addon.getAddonInfo("icon")))
+        #xbmc.executebuiltin('Notification(%s,%s,%s,%s)' % 
(addon.getAddonInfo('name'),"An error occured.. check the logs! 
exiting!",3000,addon.getAddonInfo("icon")))
+        debug(e)
         sleeper(5000)
         sys.exit(1)
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 script.mpdc/addon.xml                              |    2 +-
 script.mpdc/changelog.txt                          |    4 +
 script.mpdc/default.py                             |   10 +-
 script.mpdc/resources/language/Czech/strings.xml   |    1 +
 script.mpdc/resources/language/English/strings.xml |    1 +
 script.mpdc/resources/lib/gui.py                   |   31 ++--
 script.mpdc/resources/lib/mopidy.py                |  186 -------------------
 script.mpdc/resources/lib/pmpd.py                  |  191 +++++++++++++++++++-
 script.mpdc/resources/lib/rmpd.py                  |    6 +-
 script.mpdc/resources/lib/{mpd.py => xbmpc.py}     |    0
 script.mpdc/resources/settings.xml                 |    9 +-
 script.mymediadb/addon.xml                         |    2 +-
 script.mymediadb/changelog.txt                     |    4 +
 script.mymediadb/default.py                        |   64 ++++---
 14 files changed, 264 insertions(+), 247 deletions(-)
 delete mode 100644 script.mpdc/resources/lib/mopidy.py
 rename script.mpdc/resources/lib/{mpd.py => xbmpc.py} (100%)


hooks/post-receive
-- 
Scripts

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to