The branch, eden has been updated
       via  fd4dee43c1b04a96f18e38c1fb6659aca1d43a4a (commit)
       via  57a39019357c5d99a9508b6f377046271d658d42 (commit)
       via  cb2262327b7dc64bfb5ac26cfd3b0a17f5c258fa (commit)
       via  af92c19c26b8ac6121f93c2771071d2bf9b8caf0 (commit)
      from  3385acad5f4d08294ac95890bd4fe701a0e48c57 (commit)

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

commit fd4dee43c1b04a96f18e38c1fb6659aca1d43a4a
Author: spiff <[email protected]>
Date:   Fri Sep 21 12:38:42 2012 +0200

    [plugin.video.pakee] updated to version 1.0.22

diff --git a/plugin.video.pakee/addon.xml b/plugin.video.pakee/addon.xml
index 0681567..0de89b7 100644
--- a/plugin.video.pakee/addon.xml
+++ b/plugin.video.pakee/addon.xml
@@ -1,23 +1,24 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.video.pakee"

        name="Pakee"

-       version="1.0.21"

+       version="1.0.22"

        provider-name="pakee">

   <requires>

     <import addon="xbmc.python" version="2.0"/>

+    <import addon="script.module.urlresolver" version="0.0.1"/>

   </requires>

   <extension point="xbmc.python.pluginsource"

             library="default.py">

         <provides>video</provides>

   </extension>

   <extension point="xbmc.addon.metadata">

-    <summary lang='en'>Platform to browse Pakistani media across 
devices</summary>

+    <summary lang='en'>Platform to browse media from the subcontinent across 
devices</summary>

     <description lang='en'>

--Browse TV channels, TV shows, movies, actors, fashion, photography, sports, 
YouTube channels from Pakistan 

+-Browse TV channels, TV shows, movies, actors, fashion, photography, sports, 
YouTube channels from Subcontinent 

 -Browse musicians' albums, songs, Facebook albums, news and YouTube channels 

 -Allows users to play video, music or image content in "play all" mode 

 -Allows users to pull any YouTube users playlists, uploaded/favorite videos 
and play in "play all" mode

--More info available at http://code.google.com/p/pakee

+-More info available at http://sastatv.com

 </description>

   <disclaimer lang='en'>No media content is hosted or streamed by the makers 
of this addon. Some parts of this addon may not be legal in your country of 
residence - please check with your local laws before installing.</disclaimer>

     <platform>all</platform>

diff --git a/plugin.video.pakee/changelog.txt b/plugin.video.pakee/changelog.txt
index 9e01c1d..831b240 100644
--- a/plugin.video.pakee/changelog.txt
+++ b/plugin.video.pakee/changelog.txt
@@ -1,3 +1,8 @@
+[B]Version 1.0.22[/B]

+-Added support to search dailymotion videos and user playlists

+-Added support for hostingbulk and nowvideo.eu videos

+-Added support for alternate date format representation in RSS format

+

 [B]Version 1.0.21[/B]

 -Added support for dailymotion, nova, sastatv video

 

diff --git a/plugin.video.pakee/default.py b/plugin.video.pakee/default.py
index c0f7aee..1547fd6 100644
--- a/plugin.video.pakee/default.py
+++ b/plugin.video.pakee/default.py
@@ -9,7 +9,7 @@ __plugin__ = 'Pakee'
 __author__ = '[email protected]'

 __url__ = 'http://code.google.com/p/pakee/'

 __date__ = '01-04-2011'

-__version__ = '1.0.21'

+__version__ = '1.0.22'

 __settings__ = xbmcaddon.Addon(id='plugin.video.pakee')

 __profilepath__    = xbmc.translatePath( __settings__.getAddonInfo('profile') )

 __baseurl__ = 'http://sastatv.com'

@@ -29,6 +29,9 @@ PLUGIN_MODE_PLAY_SLIDESHOW = 90
 PLUGIN_MODE_OPEN_SETTINGS = 100

 PLUGIN_MODE_PLAY_STREAM = 110

 PLUGIN_MODE_PLAY_4SHARED = 120

+PLUGIN_MODE_QUERY_DM = 130

+PLUGIN_MODE_BUILD_DM_USER = 140

+PLUGIN_MODE_GET_USERINFO = 150

 

 

 #view modes

@@ -117,7 +120,7 @@ def play_picture_slideshow(origurl, name):
 

 #Create and play a playlist from the video/audio files contained in the passed 
in RSS url

 def play_playlist(origurl, index):

-       print "Starting play_playlist(): url: " + str(origurl + " index: " + 
str(index))

+       #print "Starting play_playlist(): url: " + str(origurl + " index: " + 
str(index))

        xbmc.executebuiltin("XBMC.Notification("+ __plugin__ +",Starting 
playlist from selection,60)")

 

        items = getItemsFromUrl(origurl)

@@ -177,6 +180,16 @@ def play_playlist(origurl, index):
                                xbmc.log('Found nova url..needs resolving: ' + 
url)

                                playlisturl = resolve_novamov(url,guid)

 

+               #for nowvideo.eu video

+               elif url.startswith('http://embed.nowvideo.eu/embed.php') and 
guid is not None and guid != '':

+                       xbmc.log('Found nowvideo.eu url..needs resolving: ' + 
url)

+                       playlisturl = resolve_nowvideo(url,guid)

+

+               #for hostingbulk.com video

+               elif url.startswith('http://hostingbulk.com/') and guid is not 
None and guid != '':

+                       xbmc.log('Found hosting bulk url..needs resolving: ' + 
url)

+                       playlisturl = resolve_hostingbulk(url,guid)

+

 

 

                #anything else

@@ -256,30 +269,32 @@ def play_fourshared(url, name):
 #saw embed (long url) received in form of http://xxxxxxxxx&streamer=xxxxx

 def find_stream(url, name):

        xbmc.log("Starting find_stream with url: " + str(url))

-       pageUrl = url.split("&streamer=")[0]

-       streamer = url.split("&streamer=")[1]

-       print ('Opening ' + pageUrl)

-       res = open_url(pageUrl)

-       #print (res)

-       playpath = ''

-       swfUrl = ''

-

-       for line in res.split("\n"):

-               #print ("line:" + line)

-               matches = re.search(r'file.*\'(.+)\'', line)

-               if matches:

-                       playpath = matches.group(1)

-                       print ("Found playpath:" + playpath)

-

-               matches = re.search(r'(http.+\.swf)', line)

-               if matches:

-                       swfUrl = matches.group(1)

-                       print ("Found swfUrl:" + swfUrl)

-

-       streamurl = "%s playpath=%s swfUrl=%s pageurl=%s swfVfy=true live=true" 
% (streamer, playpath, swfUrl, pageUrl)

-       xbmc.log ("streamurl: " + streamurl)

-       return (streamurl)

+       try:

+               pageUrl = url.split("&streamer=")[0]

+               streamer = url.split("&streamer=")[1]

+               print ('Opening ' + pageUrl)

+               res = open_url(pageUrl)

+               #print (res)

+               playpath = ''

+               swfUrl = ''

+       

+               for line in res.split("\n"):

+                       #print ("line:" + line)

+                       matches = re.search(r'file.*\'(.+)\'', line)

+                       if matches:

+                               playpath = matches.group(1)

+                               print ("Found playpath:" + playpath)

+       

+                       matches = re.search(r'(http.+\.swf)', line)

+                       if matches:

+                               swfUrl = matches.group(1)

+                               print ("Found swfUrl:" + swfUrl)

 

+               streamurl = "%s playpath=%s swfUrl=%s pageurl=%s swfVfy=true 
live=true" % (streamer, playpath, swfUrl, pageUrl)

+               xbmc.log ("streamurl: " + streamurl)

+               return (streamurl)

+       except:

+               return (" ")

 

 #saw embed (short url) received in form of http://xxxxxxxxx&streamer=xxxxx

 def find_sawlive_url(url, name):

@@ -305,7 +320,7 @@ def find_sawlive_url(url, name):
        xbmc.log ("url: " + url)

        return (find_stream(url, name))

 

-#dailymotion url received in form of 
'http://embed.novamov.com/embed.php?v=xxxxx'

+#novamov url received in form of 'http://embed.novamov.com/embed.php?v=xxxxx'

 def resolve_novamov(url, guid):

        xbmc.log("Starting resolve_novamov with url: " + str(url) + " and guid: 
" + str(guid))

        req = urllib2.Request(url)

@@ -341,6 +356,55 @@ def resolve_novamov(url, guid):
        print ('auth url is ' + str(link))

        return link

 

+def cache_page(url):

+       req = urllib2.Request(url)

+       req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')

+       response = urllib2.urlopen(req)

+       data=response.read()

+       response.close()

+       return data

+

+def get_match(data, regex) :

+    match = "";

+    m = re.search(regex, data)

+    if m != None :

+        match = m.group(1)

+    return match

+

+#nowvideo.eu url received in form of 'embed.nowvideo.eu/embed.php?v=xxxxxxx'

+def resolve_nowvideo(url, guid):

+       xbmc.log("Starting resolve_nowvideo with url: " + str(url) + " and 
guid: " + str(guid))

+

+       data = cache_page(url)

+

+       file = get_match(data,'flashvars.file="([^"]+)"')

+       key = get_match(data,'flashvars.filekey="([^"]+)"')

+       codes = get_match(data,'flashvars.cid="([^"]+)"')

+       url = 
"http://www.nowvideo.eu/api/player.api.php?file="+file+"&user=undefined&codes="+codes+"&pass=undefined&key="+key.replace(".","%2E").replace("-","%2D")

+       data = cache_page(url)

+

+       location = get_match(data,'url=([^\&]+)&')

+       location = location + "?client=FLASH"

+

+       if not location:

+               location = 'CONTENTREMOVED'

+       print ('auth url is ' + str(location))

+       return location

+

+#nowvideo.eu url received in form of 'embed.nowvideo.eu/embed.php?v=xxxxxxx'

+def resolve_hostingbulk(url, guid):

+       xbmc.log("Starting resolve_hostingbulk with url: " + str(url) + " and 
guid: " + str(guid))

+

+       data = cache_page(url)

+

+       location = get_match(data,'(http.+?mp4)')

+       location = location + "?start=0"

+

+       if not location:

+               location = 'CONTENTREMOVED'

+       print ('auth url is ' + str(location))

+       return location

+

 

 #dailymotion url received in form of 
'http://www.dailymotion.com/embed/video/xxxxx'

 def resolve_dailymotion(url, guid):

@@ -355,24 +419,12 @@ def resolve_dailymotion(url, guid):
        
match=re.compile('\/([a-zA-Z0-9-_]+?)\.mp4\?auth=(.+?)","stream').findall(link)

        for guid, url in match:

            match = 
'http://www.dailymotion.com/cdn/H264-512x384/video/'+guid+'.mp4?auth='+url 

-           #match = 
'http://www.dailymotion.com/cdn/H264-512x384/video/'+guid+'.mp4?auth='+url+'&redirect=0'
 

 

        if not match:

                match = 'CONTENTREMOVED'

        print ('auth url is ' + str(match))

        return match

 

-       #try:

-       #       req = urllib2.Request(match)

-       #       req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows 
NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')

-       #       response = urllib2.urlopen(req)

-       #       link=response.read()

-       #       response.close()

-       #       print ('dailmotion link is ' + str(link))

-       #       return link

-       #except:

-       #       return 'VIDEOREMOVED'

-

 def build_show_directory(origurl):

 

        if origurl:

@@ -508,7 +560,7 @@ def build_show_directory(origurl):
                                if setting_playmode == 0:

                                        mode = PLUGIN_MODE_PLAY_STREAM

                                        url = resolve_dailymotion(url,guid)

-                                       if url == 'CONTENTREMOVED':

+                                       if not url or url == 'CONTENTREMOVED':

                                                label = 'Content Removed'

 

 

@@ -517,6 +569,29 @@ def build_show_directory(origurl):
                                        mode = PLUGIN_MODE_PLAY_PLAYLIST

                                        url = origurl

 

+                       if url.startswith('http://hostingbulk.com/'):

+

+                               xbmc.log('Found hosting bulk url..needs 
resolving: ' + url)

+                               if itemCount == 0:

+                                       resolvedlabel = '<' + 
str(__settings__.getLocalizedString(30050)) + '>'

+                                       playAll = xbmcgui.ListItem( label = 
resolvedlabel, iconImage = sastatv_thumb, thumbnailImage = sastatv_thumb )

+                                       xbmcplugin.addDirectoryItem( handle = 
int( sys.argv[1] ), url = sys.argv[0] + 
"?mode="+str(PLUGIN_MODE_PLAY_PLAYLIST)+"&index=0&name=Playlist&url=" + 
urllib.quote_plus(origurl), listitem = playAll, isFolder = True )

+

+

+                               #play single video

+                               if setting_playmode == 0:

+                                       mode = PLUGIN_MODE_PLAY_STREAM

+                                       url = resolve_hostingbulk(url, guid) 

+

+                                       if url == 'CONTENTREMOVED':

+                                               label = 'Content Removed'

+

+                               #play video playlist

+                               else:

+                                       mode = PLUGIN_MODE_PLAY_PLAYLIST

+                                       url = origurl

+

+

                        if url.startswith('http://embed.novamov.com'):

                                xbmc.log('Found novamov url..needs resolving: ' 
+ url)

                                if itemCount == 0:

@@ -538,11 +613,32 @@ def build_show_directory(origurl):
                                        mode = PLUGIN_MODE_PLAY_PLAYLIST

                                        url = origurl

 

+                       if url.startswith('http://embed.nowvideo.eu/embed.php'):

+                               xbmc.log('Found nowvideo.eu url..needs 
resolving: ' + url)

+                               if itemCount == 0:

+                                       resolvedlabel = '<' + 
str(__settings__.getLocalizedString(30050)) + '>'

+                                       playAll = xbmcgui.ListItem( label = 
resolvedlabel, iconImage = sastatv_thumb, thumbnailImage = sastatv_thumb )

+                                       xbmcplugin.addDirectoryItem( handle = 
int( sys.argv[1] ), url = sys.argv[0] + 
"?mode="+str(PLUGIN_MODE_PLAY_PLAYLIST)+"&index=0&name=Playlist&url=" + 
urllib.quote_plus(origurl), listitem = playAll, isFolder = True )

+

+

+                               #play single video

+                               if setting_playmode == 0:

+                                       mode = PLUGIN_MODE_PLAY_STREAM

+                                       url = resolve_nowvideo(url,guid)

+

+                                       if url == 'CONTENTREMOVED':

+                                               label = 'Content Removed'

+

+                               #play video playlist

+                               else:

+                                       mode = PLUGIN_MODE_PLAY_PLAYLIST

+                                       url = origurl

 

 

                        #video stream found

-                       if 'fetchLiveFeeds.php' not in url and 
(url.startswith('rtmpe://') or url.startswith('rtmp://') or 
url.startswith('mms://') or url.startswith('rtsp://') or '.avi' in url or 
'.wmv' in url or '.m3u8' in url or '.flv' in url or '.wsx' in url or 
'desistreams.xml' in origurl or 'LiveTV.xml' in origurl):

+                       if 'fetchLiveFeeds.php' not in url and 
(isVideoFile(url) or isStreamUrl(url) or 'fetchLiveFeeds.php' in origurl):

                                isFolder = False

+                               print "playing video file: " + str(name)

 

                                #for rtmp/rtmpe streams if no timeout is 
specified, pick the timeout specifed by user

                                if 'timeout=' not in url and 
(url.startswith('rtmpe://') or url.startswith('rtmp://')):                      
   

@@ -618,6 +714,14 @@ def build_show_directory(origurl):
                searchYT = xbmcgui.ListItem( label = 'YouTube user 
favorites...', iconImage = thumb, thumbnailImage = thumb )

                xbmcplugin.addDirectoryItem( handle = int( sys.argv[1] ), url = 
sys.argv[0] + "?mode="+str(PLUGIN_MODE_BUILD_YT_FAV)+"&name=YouTube user 
favorites", listitem = searchYT, isFolder = True )

 

+               searchYT = xbmcgui.ListItem( label = 'Search DailyMotion...', 
iconImage = thumb, thumbnailImage = thumb )

+               xbmcplugin.addDirectoryItem( handle = int( sys.argv[1] ), url = 
sys.argv[0] + "?mode="+str(PLUGIN_MODE_QUERY_DM)+"&name=Search DailyMotion...", 
listitem = searchYT, isFolder = True )

+

+               searchYT = xbmcgui.ListItem( label = 'Dailymotion user 
uploads/playlists...', iconImage = thumb, thumbnailImage = thumb )

+               xbmcplugin.addDirectoryItem( handle = int( sys.argv[1] ), url = 
sys.argv[0] + "?mode="+str(PLUGIN_MODE_BUILD_DM_USER)+"&name=Dailymotion user 
uploads and playlists", listitem = searchYT, isFolder = True )

+

+               settings = xbmcgui.ListItem( label = 'Account Details', 
iconImage = thumb, thumbnailImage = thumb )

+               xbmcplugin.addDirectoryItem( handle = int( sys.argv[1] ), url = 
sys.argv[0] + "?mode="+str(PLUGIN_MODE_GET_USERINFO)+"&name=Settings", listitem 
= settings, isFolder = True )

 

                settings = xbmcgui.ListItem( label = 'Settings', iconImage = 
thumb, thumbnailImage = thumb )

                xbmcplugin.addDirectoryItem( handle = int( sys.argv[1] ), url = 
sys.argv[0] + "?mode="+str(PLUGIN_MODE_OPEN_SETTINGS)+"&name=Settings", 
listitem = settings, isFolder = True )

@@ -645,13 +749,32 @@ def build_show_directory(origurl):
 

        xbmcplugin.endOfDirectory( int( sys.argv[1] ) )

 

+def isStreamUrl(url):

+

+       if 'dailymotion.com' in url:

+               return False

+

+       if url.startswith('rtmpe://') or url.startswith('rtmp://') or 
url.startswith('mms://') or url.startswith('rtsp://') or '.wsx' in url or 
'.m3u8' in url or 'facebook.com/rsrc.php' in url:

+               return True

+       else:

+               return False

+

+

+def isVideoFile(url):

+

+       if 'dailymotion.com' in url:

+               return True

+       if '.mp4' in url or '.wmv' in url or '.m4v' in url or '.avi' in url or 
'.webm' in url or '.flv' in url or '.m3u' in url:

+               return True

+       else:

+               return False

 

 

 def isMusicFile(url):

 

        if 'dailymotion.com' in url:

                return False

-       if '.mp3' in url or '.wma' in url or '.m4a' in url or 'http://bit.ly' 
in url or '/getSharedFile/' in url or '.mp4' in url or 'kiwi6.com' in url:

+       if '.mp3' in url or '.wma' in url or '.m4a' in url or 'http://bit.ly' 
in url or '/getSharedFile/' in url or 'kiwi6.com' in url:

                return True

        else:

                return False

@@ -694,18 +817,20 @@ def getItemsFromUrl(url):
                        
xbmcgui.Dialog().ok(__settings__.getLocalizedString(30500),__settings__.getLocalizedString(30502).replace('\\n','\n'))

                        open_settings()

 

-               #url not found at start (root url not found). server down ask 
user to check later

-               elif url == __rooturl__:

-                       print __settings__.getLocalizedString(30504)

-                       print errorMsg

-                       
xbmcgui.Dialog().ok(__settings__.getLocalizedString(30500),__settings__.getLocalizedString(30504).replace('\\n','\n'))

-

                #url not found during navigation within addon, ask user to try 
another link

                else:

                        print __settings__.getLocalizedString(30503)

                        print errorMsg

                        
xbmcgui.Dialog().ok(__settings__.getLocalizedString(30500),__settings__.getLocalizedString(30503).replace('\\n','\n'))

                return

+       except:

+               print ("Error while loading url")

+               #url not found at start (root url not found). server down ask 
user to check later

+               if url == __rooturl__:

+                       print __settings__.getLocalizedString(30504)

+                       
xbmcgui.Dialog().ok(__settings__.getLocalizedString(30500),__settings__.getLocalizedString(30504).replace('\\n','\n'))

+               return

+

 

        dom =  xml.dom.minidom.parseString(data)

        items = dom.getElementsByTagName('item')

@@ -721,6 +846,8 @@ def getItemFields(item):
        guid = ''

        description = ''

        pubDate = '01.01.1960'

+       t = (2009, 2, 17, 17, 3, 38, 1, 48, 0)

+       tpubDate = time.gmtime(time.mktime(t))

        rating = 0.0

        duration = 0

        viewcount = '0'

@@ -729,12 +856,14 @@ def getItemFields(item):
                label = 
clean(getText(item.getElementsByTagName("title")[0].childNodes))

        else:

                label = 'No title'

+

        if item.getElementsByTagName("enclosure"):

                url = 
item.getElementsByTagName("enclosure")[0].getAttribute('url')

                print ('Found enclosure link: ' + url)

        elif item.getElementsByTagName("link"):

                url = getText(item.getElementsByTagName("link")[0].childNodes)

-

+       elif 
item.getElementsByTagNameNS("http://search.yahoo.com/mrss/","content";):

+               url = 
item.getElementsByTagNameNS("http://search.yahoo.com/mrss/","content";)[0].getAttribute('url')

        else:

                url = ''

 

@@ -781,22 +910,27 @@ def getItemFields(item):
        viewcount = string.atoi(viewcount)

 

 

-       if item.getElementsByTagName("pubDate"):

-               pubDate = 
getText(item.getElementsByTagName("pubDate")[0].childNodes)

-               if pubDate == '':

-                       pubDate = '01.01.1960'

-               elif '+' in pubDate:

-                       tpubDate = time.strptime(pubDate, '%a, %d %b %Y 
%H:%M:%S +0000')

-                       pubDate = time.strftime("%d.%m.%Y", tpubDate)

-               else:

-                       try:

+       try:

+               if item.getElementsByTagName("pubDate"):

+                       pubDate = 
getText(item.getElementsByTagName("pubDate")[0].childNodes)

+                       if pubDate == '':

+                               pubDate = '01.01.1960'

+                       elif '+' in pubDate:

+                               tpubDate = time.strptime(pubDate, '%a, %d %b %Y 
%H:%M:%S +0000')

+       

+                       elif '/' in pubDate:

+                               tpubDate = time.strptime(pubDate, '%Y/%m/%d')

+       

+                       elif '-' in pubDate:

                                tpubDate = time.strptime(pubDate, '%Y-%m-%d')

-                       except:

+       

+                       else:

                                tpubDate = time.strptime(pubDate, '%a, %d %b %Y 
%H:%M:%S GMT')

-

-

+       

                        pubDate = time.strftime("%d.%m.%Y", tpubDate)

-       else:

+               else:

+                       pubDate = '01.01.1960'

+       except:

                pubDate = '01.01.1960'

 

        if item.getElementsByTagName("guid"):

@@ -817,7 +951,9 @@ def getText(nodelist):
        

 def build_search_directory(paramName):

        if paramName == 'querydb':

-               title = 'Search DB'

+               title = 'Search Sastatv'

+       elif paramName == 'querydm':

+               title = 'Search DailyMotion'

        else:

                title = 'Search YouTube'

 

@@ -832,8 +968,12 @@ def build_search_directory(paramName):
        
build_show_directory('http://sastatv.com/secure/php/getYoutubePlaylistQuick.php?'
 + paramName + '=' + search_string)

 

 

-def build_ytuser_directory():

-       keyboard = xbmc.Keyboard( '', 'Enter YouTube userid' )

+def build_user_directory(paramName):

+       if paramName == 'id':

+               title = 'Enter YouTube userid'

+       else:

+               title = 'Enter Dailymotion userid'

+       keyboard = xbmc.Keyboard( '', title )

        keyboard.doModal()

        if ( keyboard.isConfirmed() == False ):

                return

@@ -841,7 +981,7 @@ def build_ytuser_directory():
        if len( search_string ) == 0:

                return

 

-       
build_show_directory('http://sastatv.com/secure/php/getYoutubePlaylistQuick.php?id='
 + search_string)

+       
build_show_directory('http://sastatv.com/secure/php/getYoutubePlaylistQuick.php?'
 + paramName + '=' + search_string)

 

 def build_ytuser_favs_directory():

        keyboard = xbmc.Keyboard( '', 'Enter YouTube userid' )

@@ -919,8 +1059,12 @@ elif mode == PLUGIN_MODE_QUERY_DB:
        build_search_directory('querydb')

 elif mode == PLUGIN_MODE_QUERY_YT:

        build_search_directory('queryyt')

+elif mode == PLUGIN_MODE_QUERY_DM:

+       build_search_directory('querydm')

 elif mode == PLUGIN_MODE_BUILD_YT_USER:

-       build_ytuser_directory()

+       build_user_directory('id')

+elif mode == PLUGIN_MODE_BUILD_DM_USER:

+       build_user_directory('dmid')

 elif mode == PLUGIN_MODE_BUILD_YT_FAV:

        build_ytuser_favs_directory()

 elif mode == PLUGIN_MODE_PLAY_PLAYLIST:

@@ -933,5 +1077,7 @@ elif mode == PLUGIN_MODE_OPEN_SETTINGS:
        open_settings()

 elif mode == PLUGIN_MODE_PLAY_4SHARED:

        play_fourshared(url,name)

+elif mode == PLUGIN_MODE_GET_USERINFO:

+       
build_show_directory('http://sastatv.com/secure/php/getUserInfo.php?id=' + 
__settings__.getSetting('username') + '&addon=' + __plugin__ + '&version=' + 
__version__)

 

 


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

commit 57a39019357c5d99a9508b6f377046271d658d42
Author: spiff <[email protected]>
Date:   Fri Sep 21 12:37:32 2012 +0200

    [plugin.video.glwiz] updated to version 0.0.8

diff --git a/plugin.video.glwiz/addon.xml b/plugin.video.glwiz/addon.xml
index 6e8555b..a368b73 100644
--- a/plugin.video.glwiz/addon.xml
+++ b/plugin.video.glwiz/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

 <addon id="plugin.video.glwiz"

        name="GLWiZ"

-       version="0.0.7"

+       version="0.0.8"

        provider-name="babak">

   <requires>

     <import addon="xbmc.python" version="2.0"/>

diff --git a/plugin.video.glwiz/default.py b/plugin.video.glwiz/default.py
index 778e61c..4529934 100644
--- a/plugin.video.glwiz/default.py
+++ b/plugin.video.glwiz/default.py
@@ -81,7 +81,7 @@ class FetchJob(workerpool.Job):
                                 thumbnail = self.span.contents[0]['src']
                         name = self.span.contents[len(self.span) - 1].strip()
                         
-                       myheaders = {'Cookie' : self.cookies, 'Referer' : 
'http://www.glwiz.com/homepage.aspx'}
+                       myheaders = {'Cookie' : self.cookies, 'User-Agent' : 
'XBMC', 'Referer' : 'http://www.glwiz.com/homepage.aspx'}
                         r = self.http.request('GET', itemurl, 
headers=myheaders)
                         link = r.data
 

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

commit cb2262327b7dc64bfb5ac26cfd3b0a17f5c258fa
Author: spiff <[email protected]>
Date:   Fri Sep 21 12:36:44 2012 +0200

    [plugin.audio.icecast] updated to version 11.0.2

diff --git a/plugin.audio.icecast/addon.xml b/plugin.audio.icecast/addon.xml
index 259c0e8..6ace64a 100644
--- a/plugin.audio.icecast/addon.xml
+++ b/plugin.audio.icecast/addon.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.audio.icecast"
        name="Icecast"
-       version="11.0.1"
+       version="11.0.2"
        provider-name="Assen Totin">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
diff --git a/plugin.audio.icecast/icecast_common.py 
b/plugin.audio.icecast/icecast_common.py
index b64b609..3f03a21 100755
--- a/plugin.audio.icecast/icecast_common.py
+++ b/plugin.audio.icecast/icecast_common.py
@@ -26,10 +26,15 @@ __settings__   = xbmcaddon.Addon(id='plugin.audio.icecast')
 __language__   = __settings__.getLocalizedString
 __addonname__  = "Icecast"
 
-TIMESTAMP_THRESHOLD = 86400
+TIMESTAMP_THRESHOLD = 604800
 BASE_URL = 'http://dir.xiph.org/yp.xml'
 CHUNK_SIZE = 65536
 
+# Define new class to implement HEAD HTTP method
+class HeadRequest(urllib2.Request):
+  def get_method(self):
+    return "HEAD"
+
 # Parse XML to DOM
 def parseXML(xml):
   dom = minidom.parseString(xml)
@@ -58,16 +63,27 @@ def readRemoteXML():
   dialog.create(__language__(30093), __language__(30094))
   dialog.update(1)
 
+  # Fetch the uncompressed file size
+  response_size = urllib2.urlopen(HeadRequest(BASE_URL))
+  total_size = response_size.info().getheader('Content-Length')
+  total_size = int(total_size)
+
+  # Request gzip'ed download.
   # Download in chunks of CHUNK_SIZE, update the dialog
   # URL progress bar code taken from triptych 
(http://stackoverflow.com/users/43089/triptych):
   # See original code 
http://stackoverflow.com/questions/2028517/python-urllib2-progress-hook
-  response = urllib2.urlopen(BASE_URL);
-  total_size = response.info().getheader('Content-Length').strip()
-  total_size = int(total_size)
+  request = urllib2.Request(BASE_URL)
+  request.add_header('Accept-encoding', 'gzip')
+  response = urllib2.urlopen(request);
+
   bytes_so_far = 0
   str_list = []
   xml = ''
 
+  # Because apache gzip's on-the-fly, it will not set Content-Length; instead, 
divide real size by 10.
+  if response.info().get('Content-Encoding') == 'gzip':
+    total_size = int(total_size/10)
+
   while 1:
     chunk = response.read(CHUNK_SIZE)
     bytes_so_far += len(chunk)
@@ -84,12 +100,23 @@ def readRemoteXML():
 
     percent = float(bytes_so_far) / total_size
     val = int(percent * 100)
+    if (val > 99):
+      val = 100
     dialog.update(val)
 
   response.close()
+  response_data = ''.join(str_list)
 
   if dialog_was_canceled == 0:
-    xml = ''.join(str_list)
+    # Check if the response was gzip'ed (as we requested)
+    if response.info().get('Content-Encoding') == 'gzip':
+      import StringIO, gzip
+      compressed_stream = StringIO.StringIO(response_data)
+      gzipper = gzip.GzipFile(fileobj=compressed_stream)
+      xml = gzipper.read()
+    else:
+      xml = response_data
+
     dialog.update(100)
     time.sleep(1)
 

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

commit af92c19c26b8ac6121f93c2771071d2bf9b8caf0
Author: spiff <[email protected]>
Date:   Fri Sep 21 11:17:25 2012 +0200

    [plugin.program.mceremote] updated to version 2.0.4

diff --git a/plugin.program.mceremote/addon.xml 
b/plugin.program.mceremote/addon.xml
index dc4d9a6..9e56477 100644
--- a/plugin.program.mceremote/addon.xml
+++ b/plugin.program.mceremote/addon.xml
@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <addon id="plugin.program.mceremote"
        name="MCERemote"
-       version="2.0.1"
+       version="2.0.4"
        provider-name="John Rennie">
   <requires>
     <import addon="xbmc.python" version="2.0"/>
-    <import addon="xbmc.gui" version="2.11"/>
   </requires>
   <extension point="xbmc.python.pluginsource" library="default.py">
     <provides>executable</provides>
   </extension>
   <extension point="xbmc.addon.metadata">
     <platform>windx</platform>
+    <language></language>
     <summary>MCE Remote configuration</summary>
     <description>This addon allows you to configure a Microsoft MCE remote, or 
any compatible remote using the eHome driver. The addon appears under the 
Programs heading on the Home page as "MCERemote".</description>
   </extension>
diff --git a/plugin.program.mceremote/changelog.txt 
b/plugin.program.mceremote/changelog.txt
index ce1c99d..5c93933 100644
--- a/plugin.program.mceremote/changelog.txt
+++ b/plugin.program.mceremote/changelog.txt
@@ -1,3 +1,12 @@
+[B]Version 2.0.4 20th Sep 2012[/B]
+- Remove dependance on xbmc.gui from addon.xml
+
+[B]Version 2.0.3 20th Sep 2012[/B]
+- Use xbmc.gui 3.0
+
+[B]Version 2.0.2 18th Sep 2012[/B]
+- Add new language tag
+
 [B]Version 2.0.1 20th Nov 2011[/B]
 - Cosmetic change to the add-on description
 
diff --git a/plugin.program.mceremote/default.py 
b/plugin.program.mceremote/default.py
index 7d2130d..0ef587e 100644
--- a/plugin.program.mceremote/default.py
+++ b/plugin.program.mceremote/default.py
@@ -2,7 +2,7 @@
 ************************************************************************
 MCERemote Addon
 Author: John Rennie
-v2.0.1 20th Nov 2011
+v2.0.4 20th Sep 2012
 
 This addon allows you to configure a Microsoft MCE remote, or any
 compatible remote using the eHome driver.

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

Summary of changes:
 plugin.audio.icecast/addon.xml         |    2 +-
 plugin.audio.icecast/icecast_common.py |   37 ++++-
 plugin.program.mceremote/addon.xml     |    4 +-
 plugin.program.mceremote/changelog.txt |    9 +
 plugin.program.mceremote/default.py    |    2 +-
 plugin.video.glwiz/.gitattributes      |   28 ----
 plugin.video.glwiz/addon.xml           |    2 +-
 plugin.video.glwiz/default.py          |    2 +-
 plugin.video.pakee/addon.xml           |    9 +-
 plugin.video.pakee/changelog.txt       |    5 +
 plugin.video.pakee/default.py          |  278 ++++++++++++++++++++++++--------
 11 files changed, 269 insertions(+), 109 deletions(-)
 delete mode 100644 plugin.video.glwiz/.gitattributes


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to