The branch, dharma has been updated
       via  4cfa744c458a9a18ae84c77a48d0e419260c0b47 (commit)
      from  c05ab682e68c17fd6d0138f43d2d278c7eead4b3 (commit)

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

commit 4cfa744c458a9a18ae84c77a48d0e419260c0b47
Author: beenje <[email protected]>
Date:   Sat Feb 26 19:47:40 2011 +0100

    [plugin.video.eyetv.parser] updated to version 1.0.1

diff --git a/plugin.video.eyetv.parser/addon.xml 
b/plugin.video.eyetv.parser/addon.xml
index 21a026c..cc05a0b 100644
--- a/plugin.video.eyetv.parser/addon.xml
+++ b/plugin.video.eyetv.parser/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.eyetv.parser"
        name="EyeTV parser"
-       version="1.0.0"
+       version="1.0.1"
        provider-name="beenje">
   <requires>
     <import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.eyetv.parser/changelog.txt 
b/plugin.video.eyetv.parser/changelog.txt
index 16dbb6f..a4f59a3 100644
--- a/plugin.video.eyetv.parser/changelog.txt
+++ b/plugin.video.eyetv.parser/changelog.txt
@@ -1,3 +1,7 @@
+[B]Version 1.0.1[/B]
+
+- Support for xbmcvfs (allow to parse EyeTV archive on network share with 
external python)
+
 [B]Version 1.0.0[/B]
 
 - Initial release
diff --git a/plugin.video.eyetv.parser/default.py 
b/plugin.video.eyetv.parser/default.py
index be630cb..c8b5645 100644
--- a/plugin.video.eyetv.parser/default.py
+++ b/plugin.video.eyetv.parser/default.py
@@ -15,6 +15,13 @@ from elementtree import ElementTree as ET
 import xbmcplugin
 import xbmcgui
 import xbmcaddon
+try:
+    import xbmcvfs
+except ImportError:
+    import shutil
+    copyfile =  shutil.copyfile
+else:
+    copyfile = xbmcvfs.copy
 
 
 # constants
@@ -74,9 +81,14 @@ class Eyetv:
         # Get settings
         self.archivePath = __addon__.getSetting('archivePath')
         sortMethod = int(__addon__.getSetting('sortMethod'))
-        # Parse the 'EyeTV Archive.xml' plist
+        # Parse the 'EyeTV Archive.xml' plist - copy it locally first
+        # (needed for external python when the file is on a smb share for 
example)
         archiveXml = os.path.join(self.archivePath, u'EyeTV Archive.xml')
-        plist = Plist().load(archiveXml)
+        localXml = xbmc.translatePath('special://temp/EyeTVArchive.xml')
+        copyfile(archiveXml, localXml)
+        plist = Plist().load(localXml)
+        # Remove temporary file
+        os.remove(localXml)
         # Get all recordings from the plist
         self.recordings = plist["Recordings"].values()
         # Sort the list of recordings

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

Summary of changes:
 plugin.video.eyetv.parser/addon.xml     |    2 +-
 plugin.video.eyetv.parser/changelog.txt |    4 ++++
 plugin.video.eyetv.parser/default.py    |   16 ++++++++++++++--
 3 files changed, 19 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to