The branch, dharma-pre has been updated
via 43a3fb768a038d471d738b8dae93855146f3effb (commit)
from 86e2c10721eba4891dd81faab1cb8ff6f938405e (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=43a3fb768a038d471d738b8dae93855146f3effb
commit 43a3fb768a038d471d738b8dae93855146f3effb
Author: spiff <[email protected]>
Date: Mon Oct 25 14:04:53 2010 +0200
[plugin.video.previewnetworks] updated to version 2.0.1
diff --git a/plugin.video.previewnetworks/addon.py
b/plugin.video.previewnetworks/addon.py
index f8b2c55..304ad65 100644
--- a/plugin.video.previewnetworks/addon.py
+++ b/plugin.video.previewnetworks/addon.py
@@ -16,20 +16,20 @@ import socket
import xbmcaddon
# plugin constants
-__plugin__ = "Preview networks"
+__plugin__ = "plugin.video.previewnetworks"
__author__ = "nmazz64"
__url__ = "http://code.google.com/p/previewnetworks-xbmc-plugin"
-__svn_url__ = "http://previewnetworks-xbmc-plugin.googlecode.com/files"
+__svn_url__ =
"http://previewnetworks-xbmc-plugin.googlecode.com/svn/trunk/plugin.video.previewnetworks/"
__useragent__ = "QuickTime/7.6.5 (qtver=7.6.5;os=Windows NT 5.1Service Pack 3)"
-__version__ = "2.0.0"
-__svn_revision__ = "$Revision: 1$"
+__version__ = "2.0.1"
+__svn_revision__ = "$Revision: 3$"
__XBMC_Revision__ = "31632"
url_source=None
def check_compatible():
try:
- xbmc.log( "[PLUGIN] '%s: Version - %s-r%s' initialized!" % (
__plugin__, __version__, __svn_revision__.replace( "$", "" ).replace(
"Revision", "" ).replace( ":", "" ).strip() ), xbmc.LOGNOTICE )
+ # xbmc.log( "[PLUGIN] '%s: Version - %s-r%s' initialized!" % (
__plugin__, __version__, __svn_revision__.replace( "$", "" ).replace(
"Revision", "" ).replace( ":", "" ).strip() ), xbmc.LOGNOTICE )
# get xbmc revision
xbmc_rev = int( xbmc.getInfoLabel( "System.BuildVersion" ).split( " r"
)[ -1 ] )
# compatible?
@@ -39,9 +39,6 @@ def check_compatible():
xbmc_rev = 0
ok = 2
# spam revision info
-# xbmc.log( " ** Required XBMC Revision: r%s **" % ( __XBMC_Revision__,
), xbmc.LOGNOTICE )
-# xbmc.log( " ** Found XBMC Revision: r%d [%s] **" % ( xbmc_rev, ( "Not
Compatible", "Compatible", "Unknown", )[ ok ], ), xbmc.LOGNOTICE )
- # if not compatible, inform user
if ( not ok ):
import xbmcgui
xbmcgui.Dialog().ok( "%s - %s: %s" % ( __plugin__,
xbmc.getLocalizedString( 30700 ), __version__, ), xbmc.getLocalizedString(
30701 ) % ( __plugin__, ), xbmc.getLocalizedString( 30702 ) % (
__XBMC_Revision__, ), xbmc.getLocalizedString( 30703 ) )
@@ -49,12 +46,12 @@ def check_compatible():
return ok
def categories(root):
- icona = os.path.join(os.getcwd(),'resources','images','list.png')
- new_icon = os.path.join(os.getcwd(), 'resources','images', 'new.png')
- now_icon = os.path.join(os.getcwd(), 'resources','images', 'now.png')
- next_icon = os.path.join(os.getcwd(), 'resources','images', 'next.png')
- genre_icon = os.path.join(os.getcwd(), 'resources','images', 'genre.png')
- search_icon = os.path.join(os.getcwd(), 'resources','images', 'search.png')
+ icona =
os.path.join(Addon.getAddonInfo('path'),'resources','images','list.png')
+ new_icon = os.path.join(Addon.getAddonInfo('path'), 'resources','images',
'new.png')
+ now_icon = os.path.join(Addon.getAddonInfo('path'), 'resources','images',
'now.png')
+ next_icon = os.path.join(Addon.getAddonInfo('path'), 'resources','images',
'next.png')
+ genre_icon = os.path.join(Addon.getAddonInfo('path'),
'resources','images', 'genre.png')
+ search_icon = os.path.join(Addon.getAddonInfo('path'),
'resources','images', 'search.png')
#baseurl="http://%s.feed.previewnetworks.com/v3.1/%s/"
baseurl="http://%s.hdplus.previewnetworks.com/v3.1/%s/"
@@ -113,7 +110,7 @@ url_source=None
name=None
item=None
-Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
+Addon = xbmcaddon.Addon( id=__plugin__)
BASE_CURRENT_SOURCE_PATH = xbmc.translatePath( Addon.getAddonInfo( "Profile" )
)
if sys.argv[ 2 ] == "":
@@ -138,11 +135,12 @@ elif ( __name__ == "__main__" ):
del plugin
elif ( sys.argv[ 2 ].startswith( "?Fetch_Showtimes" ) ):
import resources.lib.showtimes as showtimes
- s = showtimes.GUI( "plugin-AMTII-showtimes.xml", os.getcwd(),
"default" )
+ s = showtimes.GUI( "plugin-AMTII-showtimes.xml",
Addon.getAddonInfo('path') , "default" )
del s
elif ( sys.argv[ 2 ].startswith( "?Download_Trailer" ) ):
import resources.lib.download as download
download.Main()
elif ( sys.argv[ 2 ].startswith( "?OpenSettings" ) ):
- xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) ).openSettings()
+ #xbmcaddon.Addon( id=os.path.basename( Addon.getAddonInfo('path') )
).openSettings()
+ xbmcaddon.Addon( id=__plugin__).openSettings()
xbmc.executebuiltin( "Container.Refresh" )
diff --git a/plugin.video.previewnetworks/addon.xml
b/plugin.video.previewnetworks/addon.xml
index d1d7541..1aa9974 100644
--- a/plugin.video.previewnetworks/addon.xml
+++ b/plugin.video.previewnetworks/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.previewnetworks" name="PreviewNetworks Video Trailers"
version="2.0.0" provider-name="nmazz64">
+<addon id="plugin.video.previewnetworks" name="PreviewNetworks Video Trailers"
version="2.0.1" provider-name="nmazz64">
<requires>
<import addon="xbmc.python" version="1.0"/>
</requires>
diff --git a/plugin.video.previewnetworks/resources/lib/download.py
b/plugin.video.previewnetworks/resources/lib/download.py
index c1b0fa5..1e6fed4 100644
--- a/plugin.video.previewnetworks/resources/lib/download.py
+++ b/plugin.video.previewnetworks/resources/lib/download.py
@@ -7,6 +7,8 @@ import xbmc
import xbmcaddon
import os
+__plugin__ = "plugin.video.previewnetworks"
+
# set our title
g_title = unicode( xbmc.getInfoLabel( "ListItem.Title" ), "utf-8" )
# set our studio (only works if the user is using the video library)
@@ -54,8 +56,9 @@ class _Info:
class Main:
- Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
-
+ #Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
+ Addon = xbmcaddon.Addon( id=__plugin__)
+
def __init__( self ):
# parse argv
self._parse_argv()
diff --git a/plugin.video.previewnetworks/resources/lib/trailers.py
b/plugin.video.previewnetworks/resources/lib/trailers.py
index e798a1b..c4f0301 100644
--- a/plugin.video.previewnetworks/resources/lib/trailers.py
+++ b/plugin.video.previewnetworks/resources/lib/trailers.py
@@ -19,6 +19,8 @@ from xml.sax.saxutils import unescape
from util import get_filesystem, get_legal_filepath, test_quality
from MediaWindow import MediaWindow, DirectoryItem
+
+__plugin__ = "plugin.video.previewnetworks"
class _urlopener( urllib.FancyURLopener ):
version = sys.modules[ "__main__" ].__useragent__
@@ -27,11 +29,8 @@ class _urlopener( urllib.FancyURLopener ):
urllib._urlopener = _urlopener()
class _Parser:
- Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
- """
- Parses an xml document for videos
- """
+ Addon = xbmcaddon.Addon( id=__plugin__)
def __init__( self, xmlSource, settings, MediaWindow ):
self.success = True
@@ -231,7 +230,8 @@ class _Parser:
dirItem.totalItems = total
# set the default icon
#icon = "DefaultVideo.png"
- icon = os.path.join(os.getcwd(),'resource','images','list.png')
+ #icon = os.path.join(os.getcwd(),'resource','images','list.png')
+ icon =
os.path.join(self.Addon.getAddonInfo('path'),'resource','images','list.png')
overlay = ( xbmcgui.ICON_OVERLAY_NONE, xbmcgui.ICON_OVERLAY_HD, )[
video["quality"] == "HD 480p" or video["quality"] == "HD 720p" or
video["quality"] == "HD 1080p"]
## if video["quality"] == "HD 480p":
@@ -289,15 +289,12 @@ class _Parser:
class Main:
- Addon = xbmcaddon.Addon( id=os.path.basename( os.getcwd() ) )
-
+ Addon = xbmcaddon.Addon( id=__plugin__)
# base paths
BASE_CURRENT_URL = ""
ITEM_CURRENT_URL = ""
- BASE_DATA_PATH = os.path.join( xbmc.translatePath( "special://profile/" ),
"plugin_data", "video", os.path.basename( os.getcwd() ) )
- BASE_CURRENT_SOURCE_PATH = os.path.join( xbmc.translatePath(
"special://profile/" ), "plugin_data", "video", os.path.basename( os.getcwd()
), "trailer_%s.xml" )
-## BASE_CURRENT_SOURCE_PATH = xbmc.translatePath( Addon.getAddonInfo(
"Profile" ) )
-
+ BASE_DATA_PATH = os.path.join( xbmc.translatePath( "special://profile/" ),
"addon_data", os.path.basename( Addon.getAddonInfo('path') ), "cache" )
+ BASE_CURRENT_SOURCE_PATH = os.path.join( xbmc.translatePath(
"special://profile/" ), "addon_data", os.path.basename(
Addon.getAddonInfo('path')), "cache" , "trailer_%s.xml" )
title_option = ""
type_filter = ""
quality_filter = ""
-----------------------------------------------------------------------
Summary of changes:
plugin.video.previewnetworks/addon.py | 32 +++++++++----------
plugin.video.previewnetworks/addon.xml | 2 +-
.../resources/lib/download.py | 7 +++-
.../resources/lib/trailers.py | 19 +++++-------
4 files changed, 29 insertions(+), 31 deletions(-)
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons