The branch, frodo has been updated
       via  5e00d80fce6a5b4fe2c0187b2ce72a924c67c8c1 (commit)
       via  546255b260cfdae23e88bd3b167f5925f9aa04b5 (commit)
       via  a1e234892034c325f761c3846ac0ef3544b5abe5 (commit)
      from  064626288a5d02bb709e3087cab51053630e175c (commit)

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


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

commit 546255b260cfdae23e88bd3b167f5925f9aa04b5
Author: beenje <[email protected]>
Date:   Mon Apr 1 18:20:31 2013 +0200

    [plugin.video.couchpotato_manager] updated to version 0.0.4

diff --git a/plugin.video.couchpotato_manager/addon.py 
b/plugin.video.couchpotato_manager/addon.py
index 525b17b..b992447 100644
--- a/plugin.video.couchpotato_manager/addon.py
+++ b/plugin.video.couchpotato_manager/addon.py
@@ -443,7 +443,8 @@ def get_api():
                 use_https=plugin.get_setting('use_https', bool),
                 username=plugin.get_setting('username', unicode),
                 password=plugin.get_setting('password', unicode),
-                api_key=plugin.get_setting('api_key', str)
+                api_key=plugin.get_setting('api_key', str),
+                url_base=plugin.get_setting('url_base', str)
             )
         except AuthenticationError:
             try_again = xbmcgui.Dialog().yesno(
diff --git a/plugin.video.couchpotato_manager/addon.xml 
b/plugin.video.couchpotato_manager/addon.xml
index e43b5bf..00cdabd 100644
--- a/plugin.video.couchpotato_manager/addon.xml
+++ b/plugin.video.couchpotato_manager/addon.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.couchpotato_manager" name="CouchPotato Manager" 
version="0.0.3" provider-name="Tristan Fischer ([email protected])">
+<addon id="plugin.video.couchpotato_manager" name="CouchPotato Manager" 
version="0.0.4" provider-name="Tristan Fischer ([email protected])">
     <requires>
         <import addon="xbmc.python" version="2.1.0"/>
         <import addon="script.module.xbmcswift2" version="2.4.0"/>
diff --git a/plugin.video.couchpotato_manager/changelog.txt 
b/plugin.video.couchpotato_manager/changelog.txt
index 493ca5e..4a8441c 100644
--- a/plugin.video.couchpotato_manager/changelog.txt
+++ b/plugin.video.couchpotato_manager/changelog.txt
@@ -1,3 +1,6 @@
+0.0.4 (24.03.2013)
+- implemented "base url" setting (needed for mod_proxy)
+
 0.0.3 (18.03.2013)
 - new root menu logic
 - added "full forced search" to wanted-movies root menu context
diff --git 
a/plugin.video.couchpotato_manager/resources/language/English/strings.xml 
b/plugin.video.couchpotato_manager/resources/language/English/strings.xml
index d1cdab8..2b75e18 100644
--- a/plugin.video.couchpotato_manager/resources/language/English/strings.xml
+++ b/plugin.video.couchpotato_manager/resources/language/English/strings.xml
@@ -56,5 +56,6 @@
     <string id="30304">Port</string>
     <string id="30305">Api Key</string>
     <string id="30306">Set default profile</string>
+    <string id="30307">Url Base (for use with mod_proxy)</string>
     <string id="30310">You only need username/password OR Api Key!</string>
 </strings>
diff --git a/plugin.video.couchpotato_manager/resources/lib/api.py 
b/plugin.video.couchpotato_manager/resources/lib/api.py
index 30e07e6..9bd9358 100644
--- a/plugin.video.couchpotato_manager/resources/lib/api.py
+++ b/plugin.video.couchpotato_manager/resources/lib/api.py
@@ -42,20 +42,23 @@ class CouchPotatoApi():
         self.connected = False
         self.hostname = None
         self.port = None
+        self.url_base = None
         self.use_https = None
         self.username = None
         self.password = None
         self.api_key = None
 
     def connect(self, hostname, port, use_https=False,
-                username=None, password=None, api_key=None):
+                username=None, password=None, api_key=None, url_base=None):
         self.log(
-            'connect: hostname="%s", port="%s", '
-            'use_https="%s", username="%s", api_key="%s"'
-            % (hostname, port, use_https, username, api_key is not None)
+            'connect: hostname="%s" port="%s" use_https="%s" username="%s" '
+            'api_key="%s" url_base="%s"'
+            % (hostname, port, use_https, username,
+               api_key is not None, url_base)
         )
         self.hostname = hostname
         self.port = port
+        self.url_base = url_base
         self.use_https = use_https
         self.username = username
         self.password = password
@@ -140,7 +143,7 @@ class CouchPotatoApi():
         }
         url = '%s/getkey/?%s' % (self._api_url, urlencode(params))
         try:
-            json_data = json.load(urlopen(Request(url)))
+            json_data = json.loads(urlopen(Request(url)).read())
         except URLError:
             raise ConnectionError
         if json_data.get('success') and json_data.get('api_key'):
@@ -158,7 +161,7 @@ class CouchPotatoApi():
         # self.log('_api_call using url: %s' % url)
         try:
             response = urlopen(Request(url))
-            json_data = json.load(response)
+            json_data = json.loads(urlopen(Request(url)).read())
         except HTTPError, error:
             self.log('__urlopen HTTPError: %s' % error)
             if error.fp.read() == 'Wrong API key used':
@@ -174,7 +177,8 @@ class CouchPotatoApi():
     @property
     def _api_url(self):
         proto = 'https' if self.use_https else 'http'
-        return '%s://%s:%s' % (proto, self.hostname, self.port)
+        url_base = '/%s' % self.url_base if self.url_base else ''
+        return '%s://%s:%s%s' % (proto, self.hostname, self.port, url_base)
 
     def log(self, text):
         print u'[%s]: %s' % (self.__class__.__name__, repr(text))
diff --git a/plugin.video.couchpotato_manager/resources/settings.xml 
b/plugin.video.couchpotato_manager/resources/settings.xml
index 4854987..ea9e549 100644
--- a/plugin.video.couchpotato_manager/resources/settings.xml
+++ b/plugin.video.couchpotato_manager/resources/settings.xml
@@ -6,5 +6,6 @@
     <setting id="use_https" type="bool" label="30302" default="false" />
     <setting id="hostname" type="text" label="30303" default="localhost" />
     <setting id="port" type="number" label="30304" default="5050" />
+    <setting id="url_base" type="text" label="30307" default="" />
     <setting id="default_profile" type="action" label="30306" 
action="RunPlugin(plugin://plugin.video.couchpotato_manager/settings/default_profile)"/>
 </settings>

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

commit a1e234892034c325f761c3846ac0ef3544b5abe5
Author: beenje <[email protected]>
Date:   Mon Apr 1 14:02:43 2013 +0200

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

diff --git a/plugin.video.eyetv.parser/addon.py 
b/plugin.video.eyetv.parser/addon.py
index f7db8a1..87828a3 100755
--- a/plugin.video.eyetv.parser/addon.py
+++ b/plugin.video.eyetv.parser/addon.py
@@ -56,8 +56,9 @@ def show_homepage():
         items = [
             # Live TV
             {'label': plugin.get_string(30020), 'url': 
plugin.url_for('live_tv')},
-            # Recordings
+            # Recordings & Playlists
             {'label': plugin.get_string(30021), 'url': 
plugin.url_for('show_recordings')},
+            {'label': plugin.get_string(30022), 'url': 
plugin.url_for('show_playlists')},
         ]
         return plugin.add_items(items)
 
@@ -110,5 +111,42 @@ def show_recordings():
         return plugin.add_items(items)
 
 
[email protected]('/playlists/')
+def show_playlists():
+    """Shows all playlists from archive path"""
+    archivePath = plugin.get_setting('archivePath')
+    sortMethod = int(plugin.get_setting('sortMethod'))
+    try:
+        eyetv = Eyetv(archivePath, sortMethod)
+    except IOError:
+        xbmcgui.Dialog().ok(plugin.get_string(30100), plugin.get_string(30101))
+    else:
+        items = [{
+            'label': name + " (" + str(icount) + " Episodes) ",
+            'url': plugin.url_for('display_playlist', playlistid=plid),
+        } for (name, icount, plid) in eyetv.playlistsInfo()]
+        return plugin.add_items(items)
+
+
[email protected]('/showplaylist/<playlistid>/')
+def display_playlist(playlistid):
+    """Shows all recordings from playlist """
+    archivePath = plugin.get_setting('archivePath')
+    sortMethod = int(plugin.get_setting('sortMethod'))
+    try:
+        eyetv = Eyetv(archivePath, sortMethod)
+    except IOError:
+        xbmcgui.Dialog().ok(plugin.get_string(30100), plugin.get_string(30101))
+    else:
+        items = [{
+            'label': info['title'],
+            'url': url,
+            'info': info,
+            'is_folder': False,
+            'is_playable': True,
+        } for (url, icon, thumbnail, info)  in 
eyetv.RecordingsInPlaylist(playlistid)]
+        return plugin.add_items(items)
+
+
 if __name__ == '__main__':
     plugin.run()
diff --git a/plugin.video.eyetv.parser/addon.xml 
b/plugin.video.eyetv.parser/addon.xml
index 71df6f9..46171c4 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="2.2.1"
+       version="2.2.2"
        provider-name="beenje">
   <requires>
     <import addon="xbmc.python" version="2.1.0"/>
diff --git a/plugin.video.eyetv.parser/changelog.txt 
b/plugin.video.eyetv.parser/changelog.txt
index bb257cb..7e8bd38 100644
--- a/plugin.video.eyetv.parser/changelog.txt
+++ b/plugin.video.eyetv.parser/changelog.txt
@@ -1,3 +1,6 @@
+[B]Version 2.2.2[/B]
+- added playlist functionality (thanks to Gareth!)
+
 [B]Version 2.2.1[/B]
 
 - Exit gracefully in case of error
diff --git a/plugin.video.eyetv.parser/resources/language/English/strings.xml 
b/plugin.video.eyetv.parser/resources/language/English/strings.xml
index 8d37ab5..c2fcf07 100644
--- a/plugin.video.eyetv.parser/resources/language/English/strings.xml
+++ b/plugin.video.eyetv.parser/resources/language/English/strings.xml
@@ -21,6 +21,7 @@
     <!--Category-->
     <string id="30020">Live TV</string>
     <string id="30021">Recordings</string>
+    <string id="30022">Playlists</string>
 
     <!--Errors-->
     <string id="30100">Could not parse 'EyeTV Archive.xml'</string>
diff --git a/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py 
b/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
index de83689..faf6d4b 100644
--- a/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
+++ b/plugin.video.eyetv.parser/resources/lib/eyetv_parser.py
@@ -99,8 +99,10 @@ class Eyetv:
         plist = Plist().load(localXml)
         # Remove temporary file
         os.remove(localXml)
+        self.playlists = plist["Playlists"]
         # Get all recordings from the plist
         self.recordings = plist["Recordings"].values()
+        self.recordingdict = plist["Recordings"]
         # Sort the list of recordings
         self.recordings.sort(key=lambda recording: 
recording[SORTKEYS[sortMethod]])
         if sortMethod == 1:
@@ -127,6 +129,29 @@ class Eyetv:
             infoLabels = {'title': recording['Display Title'], 'plot': 
recording['Description']}
             yield (url, icon, thumbnail, infoLabels)
 
+    def playlistsInfo(self):
+        """Generator that returns all recordings as a tuple (name, count, 
plid)"""
+        for playlist in self.playlists:
+            name = playlist["Name"]
+            plid = str(playlist["Playlist ID"])
+            icount = len(playlist["Playlist Items"])
+            yield (name, icount, plid)
+
+    def RecordingsInPlaylist(self, playid):
+        """Generator that returns all recordings as a tuple (url, icon, 
thumbnail, infoLabels)"""
+        for playlist in self.playlists:
+            plid = playlist["Playlist ID"]
+            if str(plid) == playid:
+                for precording in playlist["Playlist Items"]:
+                    precordingID = precording["Recording ID"]
+                    recording = self.recordingdict[str(precordingID)]
+                    filename = self._recordingPath(recording)
+                    url = filename + u'.mpg'
+                    icon = filename + u'.tiff'
+                    thumbnail = filename + u'.thumbnail.tiff'
+                    infoLabels = {'title': recording['Display Title'], 'plot': 
recording['Description']}
+                    yield (url, icon, thumbnail, infoLabels)
+
     def nbRecordings(self):
         """Return the number of recordings available"""
         return len(self.recordings)

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

Summary of changes:
 plugin.video.couchpotato_manager/addon.py          |    3 +-
 plugin.video.couchpotato_manager/addon.xml         |    2 +-
 plugin.video.couchpotato_manager/changelog.txt     |    3 +
 .../resources/language/English/strings.xml         |    1 +
 .../resources/lib/api.py                           |   18 +-
 .../resources/settings.xml                         |    1 +
 plugin.video.eyetv.parser/addon.py                 |   40 ++++-
 plugin.video.eyetv.parser/addon.xml                |    2 +-
 plugin.video.eyetv.parser/changelog.txt            |    3 +
 .../resources/language/English/strings.xml         |    1 +
 .../resources/lib/eyetv_parser.py                  |   25 +++
 .../LICENSE.txt                                    |    0
 plugin.video.itunes_trailers/addon.py              |  228 ++++++++++++++++++++
 .../addon.xml                                      |    7 +-
 plugin.video.itunes_trailers/changelog.txt         |   14 ++
 plugin.video.itunes_trailers/icon.png              |  Bin 0 -> 134196 bytes
 .../resources}/__init__.py                         |    0
 .../resources/language/English/strings.xml         |   31 +++
 .../resources/lib}/__init__.py                     |    0
 .../resources/lib/scraper.py                       |  145 +++++++++++++
 .../resources/settings.xml                         |    9 +
 21 files changed, 519 insertions(+), 14 deletions(-)
 copy {plugin.image.500px => plugin.video.itunes_trailers}/LICENSE.txt (100%)
 create mode 100644 plugin.video.itunes_trailers/addon.py
 copy {plugin.video.metacafe => plugin.video.itunes_trailers}/addon.xml (50%)
 create mode 100644 plugin.video.itunes_trailers/changelog.txt
 create mode 100644 plugin.video.itunes_trailers/icon.png
 copy {plugin.audio.qobuz/resources/lib/qobuz/gui => 
plugin.video.itunes_trailers/resources}/__init__.py (100%)
 create mode 100644 
plugin.video.itunes_trailers/resources/language/English/strings.xml
 copy {plugin.audio.qobuz/resources/lib/qobuz/gui => 
plugin.video.itunes_trailers/resources/lib}/__init__.py (100%)
 create mode 100644 plugin.video.itunes_trailers/resources/lib/scraper.py
 create mode 100644 plugin.video.itunes_trailers/resources/settings.xml


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to