The branch, dharma has been updated
       via  4b9682d284bf7b9996b11e23bd11cec6d06f50a2 (commit)
       via  0fe6f92b1e632fe76a180d322c31e9da9d422c05 (commit)
      from  c1b33d9b48453fe15647d181bd1107fa542412a6 (commit)

- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=4b9682d284bf7b9996b11e23bd11cec6d06f50a2

commit 4b9682d284bf7b9996b11e23bd11cec6d06f50a2
Author: spiff <[email protected]>
Date:   Thu May 12 18:48:46 2011 +0200

    [plugin.image.iphoto] updated to version 1.4.4

diff --git a/plugin.image.iphoto/addon.py b/plugin.image.iphoto/addon.py
index 9090b6f..444676c 100644
--- a/plugin.image.iphoto/addon.py
+++ b/plugin.image.iphoto/addon.py
@@ -11,20 +11,24 @@ import sys
 import time
 import os
 import glob
-import shutil
 
 import xbmc
 import xbmcgui as gui
 import xbmcplugin as plugin
 import xbmcaddon
 
-#try:
-#    import xbmcvfs
-#except ImportError:
-#    import shutil
-#    copyfile = shutil.copyfile
-#else:
-#    copyfile = xbmcvfs.copy
+try:
+    import xbmcvfs
+except ImportError:
+    import shutil
+    copyfile = shutil.copyfile
+else:
+    copyfile = xbmcvfs.copy
+
+try:
+    from hashlib import md5
+except ImportError:
+    import md5
 
 addon = xbmcaddon.Addon(id="plugin.image.iphoto")
 ALBUM_DATA_XML = "AlbumData.xml"
@@ -65,6 +69,16 @@ else:
     media_sort_col = "NULL"
 
 
+def md5sum(filename):
+    try:
+       m = md5()
+    except:
+       m = md5.new()
+    with open(filename, 'rb') as f:
+       for chunk in iter(lambda: f.read(128 * m.block_size), ''):
+           m.update(chunk)
+    return m.hexdigest()
+
 def render_media(media):
     global view_mode
 
@@ -479,16 +493,13 @@ if (__name__ == "__main__"):
        except:
            pass
 
-    # we used to store the file path to the XML instead of the iPhoto Library
-    # directory.
+    # we used to store the file path to the XML instead of the iPhoto Library 
directory.
     if (os.path.basename(xmlpath) == ALBUM_DATA_XML):
        xmlpath = os.path.dirname(xmlpath)
        addon.setSetting('albumdata_xml_path', xmlpath)
 
     origxml = os.path.join(xmlpath, ALBUM_DATA_XML)
     xmlfile = xbmc.translatePath(os.path.join(addon.getAddonInfo("Profile"), 
"iphoto.xml"))
-    shutil.copyfile(origxml, xmlfile)
-    shutil.copystat(origxml, xmlfile)
 
     enable_places = True
     e = addon.getSetting('places_enable')
@@ -553,15 +564,13 @@ if (__name__ == "__main__"):
            auto_update_lib = "false"
            addon.setSetting('auto_update_lib', auto_update_lib)
        if (auto_update_lib == "true"):
-           try:
-               xml_mtime = os.path.getmtime(xmlfile)
-               db_mtime = os.path.getmtime(db_file)
-           except Exception, e:
-               print to_str(e)
-               pass
+           tmpfile = xmlfile + ".new"
+           copyfile(origxml, tmpfile)
+           if (os.path.isfile(xmlfile) and md5sum(tmpfile) == md5sum(xmlfile)):
+               os.remove(tmpfile)
            else:
-               if (xml_mtime > db_mtime):
-                   import_library(xmlpath, xmlfile, enable_places)
+               os.rename(tmpfile, xmlfile)
+               import_library(xmlpath, xmlfile, enable_places)
     else:
        items = None
        if (action == "events"):
@@ -584,6 +593,7 @@ if (__name__ == "__main__"):
        elif (action == "ratings"):
            items = list_ratings(params)
        elif (action == "rescan"):
+           copyfile(origxml, xmlfile)
            import_library(xmlpath, xmlfile, enable_places)
        elif (action == "hidekeyword"):
            items = hide_keyword(params)
@@ -597,3 +607,5 @@ if (__name__ == "__main__"):
            if view_mode > 0:
                xbmc.sleep(300)
                xbmc.executebuiltin("Container.SetViewMode(%d)" % (view_mode + 
509))
+
+# vim: tabstop=8 softtabstop=4 shiftwidth=4 noexpandtab:
diff --git a/plugin.image.iphoto/addon.xml b/plugin.image.iphoto/addon.xml
index 384b888..15fe3b5 100644
--- a/plugin.image.iphoto/addon.xml
+++ b/plugin.image.iphoto/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.image.iphoto" name="iPhoto" version="1.4.3" 
provider-name="jingai">
+<addon id="plugin.image.iphoto" name="iPhoto" version="1.4.4" 
provider-name="jingai">
     <requires>
        <import addon="xbmc.python" version="1.0"/>
        <import addon="script.module.pysqlite" version="2.5.6"/>
@@ -10,7 +10,6 @@
     </extension>
     <extension point="xbmc.addon.metadata">
        <platform>all</platform>
-       <minversion>32324</minversion>
        <summary lang="en">Imports iPhoto library into XBMC.</summary>
        <summary lang="hu">iPhoto könyvtár importálása az XBMC-be</summary>
        <summary lang="pt">Importa bibliotecas iPhoto para o XBMC.</summary>
diff --git a/plugin.image.iphoto/changelog.txt 
b/plugin.image.iphoto/changelog.txt
index e68b851..d1268e6 100644
--- a/plugin.image.iphoto/changelog.txt
+++ b/plugin.image.iphoto/changelog.txt
@@ -1,3 +1,6 @@
+1.4.4 - 20110511
+- Use xbmcvfs to access iPhoto XML.
+
 1.4.3 - 20110331
 - Faces: Use same thumbnails as iPhoto.
 - Add Spanish strings (thanks Oriol Gamero).
diff --git a/plugin.image.iphoto/resources/lib/geo.py 
b/plugin.image.iphoto/resources/lib/geo.py
index ba41dfb..eb0ca93 100644
--- a/plugin.image.iphoto/resources/lib/geo.py
+++ b/plugin.image.iphoto/resources/lib/geo.py
@@ -257,3 +257,5 @@ if (__name__ == "__main__"):
        print map.fetch("map_", "")
     except:
        print_exc()
+
+# vim: tabstop=8 softtabstop=4 shiftwidth=4 noexpandtab:
diff --git a/plugin.image.iphoto/resources/lib/iphoto_parser.py 
b/plugin.image.iphoto/resources/lib/iphoto_parser.py
index d0196bd..22dd9c4 100644
--- a/plugin.image.iphoto/resources/lib/iphoto_parser.py
+++ b/plugin.image.iphoto/resources/lib/iphoto_parser.py
@@ -1158,3 +1158,5 @@ def main():
 if __name__=="__main__":
     #main()
     profile_main()
+
+# vim: tabstop=8 softtabstop=4 shiftwidth=4 noexpandtab:

http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=0fe6f92b1e632fe76a180d322c31e9da9d422c05

commit 0fe6f92b1e632fe76a180d322c31e9da9d422c05
Author: spiff <[email protected]>
Date:   Thu May 12 18:45:53 2011 +0200

    [plugin.video.diy] updated to version 0.0.2

diff --git a/plugin.video.diy/addon.xml b/plugin.video.diy/addon.xml
index c5a6a12..e203da6 100644
--- a/plugin.video.diy/addon.xml
+++ b/plugin.video.diy/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.video.diy"

        name="DIY Network"

-       version="0.0.1"

+       version="0.0.2"

        provider-name="divingmule">

   <requires>

     <import addon="xbmc.python" version="1.0"/>

diff --git a/plugin.video.diy/icon.png b/plugin.video.diy/icon.png
index 08b7c99..60d7aa0 100644
Binary files a/plugin.video.diy/icon.png and b/plugin.video.diy/icon.png differ

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

Summary of changes:
 plugin.image.iphoto/addon.py                       |   52 ++++++++++++--------
 plugin.image.iphoto/addon.xml                      |    3 +-
 plugin.image.iphoto/changelog.txt                  |    3 +
 plugin.image.iphoto/resources/lib/geo.py           |    2 +
 plugin.image.iphoto/resources/lib/iphoto_parser.py |    2 +
 plugin.video.diy/addon.xml                         |    2 +-
 plugin.video.diy/changelog.txt                     |    5 ++
 plugin.video.diy/icon.png                          |  Bin 59874 -> 80621 bytes
 8 files changed, 46 insertions(+), 23 deletions(-)
 create mode 100644 plugin.video.diy/changelog.txt


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to