The branch, dharma-pre has been updated
       via  c6c23e1e686fa36094926a7442163531ee09a905 (commit)
      from  ced5a550553de0c0c60bcb3f61a338b848b2732f (commit)

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

commit c6c23e1e686fa36094926a7442163531ee09a905
Author: spiff <[email protected]>
Date:   Sat Nov 27 12:08:44 2010 +0100

    [plugin.video.videomonkey] updated to version 1.4.2

diff --git a/plugin.video.videomonkey/addon.xml 
b/plugin.video.videomonkey/addon.xml
index e3c6326..f3a630e 100644
--- a/plugin.video.videomonkey/addon.xml
+++ b/plugin.video.videomonkey/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <addon
   id="plugin.video.videomonkey"
-  version="1.4.1"
+  version="1.4.2"
   name="VideoMonkey"
   provider-name="sfaxman / bootsy">
   <requires>
@@ -14,7 +14,7 @@
   </extension>
   <extension point="xbmc.addon.metadata">
     <summary>Stream videos from different sites</summary>
-    <description>Stream videos from YouTube, Clipfish, Kino.de, 
Computerclub², ARD / ZDF Mediathek, 3sat, Schweizer Fernsehen etc. Also live 
channels from different regions (DE, EN, FR, NL, SE, SP, THA, VN) and 
categories (kids, sports, music) are supported.</description>
+    <description>Stream videos from YouTube, Clipfish, Kino.de, 
Computerclub², ARD &amp; ZDF Mediathek, 3sat, Schweizer Fernsehen etc. Also 
live channels from different regions (DE, EN, FR, NL, SE, SP, THA, VN) and 
categories (kids, sports, music) are supported.</description>
     <platform>all</platform>
   </extension>
 </addon>
\ No newline at end of file
diff --git a/plugin.video.videomonkey/changelog.txt 
b/plugin.video.videomonkey/changelog.txt
index db8db3f..79f6481 100644
--- a/plugin.video.videomonkey/changelog.txt
+++ b/plugin.video.videomonkey/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 1.4.2[/B]
+
+- Updated: videomonkey.py to check if settings folder exists
+
+
 [B]Version 1.4.1[/B]
 
 - Changed: plugin to work with the new add-on system
\ No newline at end of file
diff --git a/plugin.video.videomonkey/default.py 
b/plugin.video.videomonkey/default.py
index 6432668..229a7b6 100644
--- a/plugin.video.videomonkey/default.py
+++ b/plugin.video.videomonkey/default.py
@@ -6,7 +6,7 @@ __plugin__ = 'VideoMonkey'
 __author__ = 'sfaxman'

 __svn_url__ = 
'http://xbmc-addons.googlecode.com/svn/addons/plugin.video.VideoMonkey/'

 __credits__ = 'bootsy'

-__version__ = '1.4.1'

+__version__ = '1.4.2'

 

 addon = xbmcaddon.Addon(id='plugin.video.videomonkey')

 rootDir = addon.getAddonInfo('path')

diff --git a/plugin.video.videomonkey/videomonkey.py 
b/plugin.video.videomonkey/videomonkey.py
index 5f3a2d9..7ec988e 100644
--- a/plugin.video.videomonkey/videomonkey.py
+++ b/plugin.video.videomonkey/videomonkey.py
@@ -14,8 +14,9 @@ rootDir = addon.getAddonInfo('path')
 if rootDir[-1] == ';':

     rootDir = rootDir[0:-1]

 rootDir = xbmc.translatePath(rootDir)

-cacheDir = os.path.join(addon.getAddonInfo('profile'), 'cache')

-cacheDir = xbmc.translatePath(cacheDir)

+settingsDir = addon.getAddonInfo('profile')

+settingsDir = xbmc.translatePath(settingsDir)

+cacheDir = os.path.join(settingsDir, 'cache')

 resDir = os.path.join(rootDir, 'resources')

 imgDir = os.path.join(resDir, 'images')

 #socket.setdefaulttimeout(20)

@@ -36,8 +37,8 @@ class MyHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
         return infourl

 

 if cj != None:

-    if os.path.isfile(os.path.join(resDir, 'cookies.lwp')):

-        cj.load(os.path.join(resDir, 'cookies.lwp'))

+    if os.path.isfile(os.path.join(settingsDir, 'cookies.lwp')):

+        cj.load(os.path.join(settingsDir, 'cookies.lwp'))

     if proxy_handler:

         opener = urllib2.build_opener(MyHTTPRedirectHandler, 
urllib2.HTTPCookieProcessor(cj), proxy_handler)

     else:

@@ -600,7 +601,7 @@ class CCurrentList:
         return

 

     def saveList(self):

-        f = open(str(os.path.join(resDir, 'entry.list')), 'w')

+        f = open(str(os.path.join(settingsDir, 'entry.list')), 'w')

         
f.write(smart_unicode('########################################################\n').encode('utf-8'))

         f.write(smart_unicode('#             Added sites and live streams      
       #\n').encode('utf-8'))

         
f.write(smart_unicode('########################################################\n').encode('utf-8'))

@@ -736,38 +737,65 @@ class CCurrentList:
         if enable_debug:

             xbmc.output(str(filename))

         try:

-            f = open(str(os.path.join(resDir, filename)), 'r')

-            data = smart_unicode(f.read())

-            data = data.replace('\r\n', '\n')

-            data = data.split('\n')

-            f.close()

+           if filename == 'entry.list':

+                f = open(str(os.path.join(settingsDir, filename)), 'r')

+           else:

+               f = open(str(os.path.join(resDir, filename)), 'r')

+           data = smart_unicode(f.read())

+           data = data.replace('\r\n', '\n')

+           data = data.split('\n')

+           f.close()

             if enable_debug:

-                xbmc.output('Local file ' + str(os.path.join(resDir, 
filename)) + ' opened')

+               if filename == 'entry.list':

+                   xbmc.output('Local file ' + str(os.path.join(settingsDir, 
filename)) + ' opened')

+               else:

+                    xbmc.output('Local file ' + str(os.path.join(resDir, 
filename)) + ' opened')

         except:

             if enable_debug:

-                xbmc.output('File: ' + str(os.path.join(resDir, filename)) + ' 
not found')

+               if filename == 'entry.list':

+                   xbmc.output('File: ' + str(os.path.join(settingsDir, 
filename)) + ' opened')

+               else:

+                    xbmc.output('File: ' + str(os.path.join(resDir, filename)) 
+ ' not found')

             try:

-                f = open(str(os.path.join(cacheDir, filename)), 'r')

+               if filename == 'entry.list':

+                    f = open(str(os.path.join(settingsDir, filename)), 'r')

+               else:

+                    f = open(str(os.path.join(cacheDir, filename)), 'r')

                 data = smart_unicode(f.read())

                 data = data.replace('\r\n', '\n')

                 data = data.split('\n')

                 f.close()

                 if enable_debug:

-                    xbmc.output('Local file ' + str(os.path.join(cacheDir, 
filename)) + ' opened')

+                   if filename == 'entry.list':

+                       xbmc.output('Local file ' + 
str(os.path.join(settingsDir, filename)) + ' opened')

+                   else:

+                        xbmc.output('Local file ' + str(os.path.join(cacheDir, 
filename)) + ' opened')

             except:

                 if enable_debug:

-                    xbmc.output('File: ' + str(os.path.join(cacheDir, 
filename)) + ' not found')

+                   if filename == 'entry.list':

+                       xbmc.output('File: ' + str(os.path.join(settingsDir, 
filename)) + ' opened')

+                   else:

+                        xbmc.output('File: ' + str(os.path.join(cacheDir, 
filename)) + ' not found')

                 try:

-                    f = open(str(filename), 'r')

+                   if filename == 'entry.list':

+                        f = open(str(os.path.join(settingsDir, filename)), 'r')

+                   else:

+                        f = open(str(filename), 'r')

                     data = smart_unicode(f.read())

                     data = data.replace('\r\n', '\n')

                     data = data.split('\n')

                     f.close()

                     if enable_debug:

-                        xbmc.output('Local file ' + str(filename) + ' opened')

+                       if filename == 'entry.list':

+                           xbmc.output('Local file ' + 
str(os.path.join(settingsDir, filename)) + ' opened')

+                       else:

+                            xbmc.output('Local file ' + str(filename) + ' 
opened')

                 except:

                     if enable_debug:

-                        xbmc.output('File: ' + str(filename) + ' not found')

+                       if filename == 'entry.list':

+                           xbmc.output('File: ' + 
str(os.path.join(settingsDir, filename)) + ' opened')

+                       else:

+                            xbmc.output('File: ' + str(filename) + ' not 
found')

                         traceback.print_exc(file = sys.stdout)

                     return -1

 

@@ -972,7 +1000,7 @@ class CCurrentList:
                 return

             data = handle.read()

             #cj.save(os.path.join(resDir, 'cookies.lwp'), ignore_discard=True)

-            cj.save(os.path.join(resDir, 'cookies.lwp'))

+            cj.save(os.path.join(settingsDir, 'cookies.lwp'))

             if enable_debug:

                 f.write(data)

                 f.close()

@@ -1623,12 +1651,14 @@ class Main:
             paramstring = sys.argv[2]

             if len(paramstring) <= 2:

                 if enable_debug:

+                    xbmc.output('Settings directory: ' + str(settingsDir))

                     xbmc.output('Cache directory: ' + str(cacheDir))

                     xbmc.output('Resource directory: ' + str(resDir))

                     xbmc.output('Image directory: ' + str(imgDir))

                 if not os.path.exists(cacheDir):

                     if enable_debug:

                         xbmc.output('Creating cache directory ' + 
str(cacheDir))

+                    os.mkdir(settingsDir)

                     os.mkdir(cacheDir)

                     if enable_debug:

                         xbmc.output('Cache directory created')


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

Summary of changes:
 plugin.video.videomonkey/addon.xml      |    4 +-
 plugin.video.videomonkey/changelog.txt  |    5 ++
 plugin.video.videomonkey/default.py     |    2 +-
 plugin.video.videomonkey/videomonkey.py |   68 ++++++++++++++++++++++---------
 4 files changed, 57 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to