The branch, eden has been updated
       via  87fc7b027d8ad999a513bd8e07fbb0ab424524d7 (commit)
      from  3dc56460a31f3f9d8bb2525a9bb1241c5c860e4a (commit)

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

commit 87fc7b027d8ad999a513bd8e07fbb0ab424524d7
Author: beenje <[email protected]>
Date:   Tue Jan 15 21:30:54 2013 +0100

    [plugin.video.nrk] updated to version 4.3.1

diff --git a/plugin.video.nrk/addon.xml b/plugin.video.nrk/addon.xml
index 81ca851..0cf19d1 100644
--- a/plugin.video.nrk/addon.xml
+++ b/plugin.video.nrk/addon.xml
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.video.nrk"
        name="NRK Nett-TV"
-       version="4.3.0"
+       version="4.3.1"
        provider-name="takoi">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
     <import addon="script.module.parsedom" version="0.9.2"/>
     <import addon="script.module.requests" version="0.13.2"/>
-    <import addon="script.module.xbmcswift" version="0.2.0"/>
+    <import addon="script.module.xbmcswift2" version="1.3.1"/>
     <import addon="script.common.plugin.cache" version="1.1.0"/>
   </requires>
   <extension point="xbmc.python.pluginsource" library="default.py">
diff --git a/plugin.video.nrk/changelog.txt b/plugin.video.nrk/changelog.txt
index cd5d279..ee316be 100644
--- a/plugin.video.nrk/changelog.txt
+++ b/plugin.video.nrk/changelog.txt
@@ -1,3 +1,7 @@
+[B]4.3.1[/B]
+- Fikset linjeskift i undertekster
+- Fikset tittel på infoside
+
 [B]4.3.0[/B]
 - Søkefunksjon
 - NRKs radiokanaler er nå tilgjengelig som direktestrømmer
diff --git a/plugin.video.nrk/default.py b/plugin.video.nrk/default.py
index f862770..450e377 100644
--- a/plugin.video.nrk/default.py
+++ b/plugin.video.nrk/default.py
@@ -13,7 +13,6 @@
     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
-
 import os
 import sys
 import time
@@ -26,11 +25,8 @@ from xbmcgui import ListItem
 import plugin
 plugin = plugin.Plugin()
 
-ADDON = xbmcaddon.Addon()
-ADDON_PATH = ADDON.getAddonInfo('path')
-BITRATE = int(ADDON.getSetting('bitrate')) + 1
-SHOW_SUBS = ADDON.getSetting('showsubtitles')
-
+BITRATE = int(plugin.get_setting('bitrate')) + 1
+SHOW_SUBS = int(plugin.get_setting('showsubtitles')) == 1
 
 @plugin.route('/')
 def view_top():
@@ -65,7 +61,7 @@ def live():
 
 def add(title, url, mimetype, thumb=""):
   if thumb:
-    img_path = os.path.join(ADDON_PATH, "resources/images")
+    img_path = os.path.join(plugin.path, "resources/images")
     thumb = os.path.join(img_path, thumb)
   li =  ListItem(title, thumbnailImage=thumb)
   li.setProperty('mimetype', mimetype)
@@ -82,7 +78,7 @@ def view(titles, urls, thumbs=repeat(''), bgs=repeat(''), 
descr=repeat(''), upda
     li.setProperty('isplayable', str(playable))
     li.setProperty('fanart_image', bg)
     if playable:
-      li.setInfo('video', {'plot':descr})
+      li.setInfo('video', {'title':title, 'plot':descr})
     addDirectoryItem(plugin.handle, plugin.make_url(url), li, not playable, 
total)
   endOfDirectory(plugin.handle, updateListing=update_listing)
 
@@ -117,13 +113,11 @@ def letters():
 
 @plugin.route('/search')
 def search():
-  keyboard = xbmc.Keyboard()
-  keyboard.setHeading('Søk')
-  keyboard.doModal()
-  if keyboard.isConfirmed():
-    query = keyboard.getText()
-    query = quote(query)
-    plugin.redirect(plugin.make_url('/search/%s/1' % query))
+  query = plugin.keyboard(heading="Søk")
+  if query:
+    plugin.redirect(plugin.make_url('/search/%s/1' % quote(query)))
+  else:
+    plugin._end_of_directory = True # hack: prevent xbmcswift from calling 
endOfDirectory
 
 @plugin.route('/search/<query>/<page>')
 def search_results(query, page):
@@ -171,5 +165,5 @@ def play(video_id, series_id=""):
     if not SHOW_SUBS:
       player.showSubtitles(False)
 
-if ( __name__ == "__main__" ):
+if  __name__ == "__main__" :
   plugin.run()
diff --git a/plugin.video.nrk/plugin.py b/plugin.video.nrk/plugin.py
index b945e6a..8e38d39 100644
--- a/plugin.video.nrk/plugin.py
+++ b/plugin.video.nrk/plugin.py
@@ -12,19 +12,19 @@
     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
-
-""" some xbmcswift boilerplate """
-
 import xbmcaddon
-import xbmcswift
+import xbmcswift2 as xbmcswift
 
 class Plugin(xbmcswift.Plugin):
   def __init__(self):
-    addon = xbmcaddon.Addon()
-    xbmcswift.Plugin.__init__(self, addon.getAddonInfo('name'), 
addon.getAddonInfo('id'), '')
-
+    xbmcswift.Plugin.__init__(self)
+  
+  @property
+  def path(self):
+    return self.addon.getAddonInfo('path')
+  
   def make_url(self, url):
-    return 'plugin://%s%s' % (self._plugin_id, url)
+    return 'plugin://%s%s' % (self.id, url)
 
   def route_for(self, path):
     for rule in self._routes:
diff --git a/plugin.video.nrk/subs.py b/plugin.video.nrk/subs.py
index 860019b..020d6a9 100644
--- a/plugin.video.nrk/subs.py
+++ b/plugin.video.nrk/subs.py
@@ -36,7 +36,7 @@ def get_subtitles(video_id):
       f.write(str(i))
       f.write('\n%s' % _timeToString(begin))
       f.write(' --> %s\n' % _timeToString(end))
-      f.write(re.sub('<br></br>\s*','\n',' '.join(contents.replace('<span 
style="italic">','<i>').replace('</span>','</i>').split())).encode('utf-8'))
+      f.write(re.sub('<br />\s*','\n',' '.join(contents.replace('<span 
style="italic">','<i>').replace('</span>','</i>').split())).encode('utf-8'))
       f.write('\n\n')
   return filename
 

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

Summary of changes:
 plugin.video.nrk/addon.xml     |    4 ++--
 plugin.video.nrk/changelog.txt |    4 ++++
 plugin.video.nrk/default.py    |   26 ++++++++++----------------
 plugin.video.nrk/plugin.py     |   16 ++++++++--------
 plugin.video.nrk/subs.py       |    2 +-
 5 files changed, 25 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to