The branch, frodo has been updated
       via  180d89602c3f19b1d00c325e67578bcf717936c7 (commit)
      from  d4dacfeec281b1fc70a3e17e3e7b50761a5c4828 (commit)

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

commit 180d89602c3f19b1d00c325e67578bcf717936c7
Author: beenje <[email protected]>
Date:   Mon Mar 11 21:35:33 2013 +0100

    [plugin.video.gfq] updated to version 1.1.0

diff --git a/plugin.video.gfq/addon.xml b/plugin.video.gfq/addon.xml
index 5a2aff2..c4c5e0a 100644
--- a/plugin.video.gfq/addon.xml
+++ b/plugin.video.gfq/addon.xml
@@ -1,25 +1,26 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

-<addon id="plugin.video.gfq"

-       name="GFQ"

-       version="1.0.0"

-       provider-name="Bawitdaba &lt;[email protected]&gt;">

-  <requires>

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

-       <import addon="script.module.beautifulsoup" version="3.0.8"/>

-  </requires>

-  <extension point="xbmc.python.pluginsource"

-            library="default.py">

-        <provides>video</provides>

-  </extension>

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

-    <summary>GFQ</summary>

-    <description>[B]Guys From Queens[/B]

-

-Watch live shows and previously recorded podcasts from the Guys From Queens 
(GFQ) Network

-

-http://www.guysfromqueens.com

-http://www.gfqnetwork.com

-http://www.gfqlive.tv</description>

-    <platform>all</platform>

-  </extension>

+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<addon id="plugin.video.gfq"
+       name="GFQ"
+       version="1.1.0"
+       provider-name="Bawitdaba &lt;[email protected]&gt;">
+  <requires>
+    <import addon="xbmc.python" version="2.1.0"/>
+       <import addon="script.module.beautifulsoup" version="3.0.8"/>
+  </requires>
+  <extension point="xbmc.python.pluginsource"
+            library="default.py">
+        <provides>video</provides>
+  </extension>
+  <extension point="xbmc.addon.metadata">
+    <summary lang="en">GFQ</summary>
+    <description lang="en">[B]Guys From Queens[/B]
+
+Watch live shows and previously recorded podcasts from the Guys From Queens 
(GFQ) Network
+
+http://www.guysfromqueens.com
+http://www.gfqlive.tv</description>
+    <platform>all</platform>
+       <language>en</language>
+  </extension>
+  <license>GNU GENERAL PUBLIC LICENSE. Version 2, June 1991</license>
 </addon>
\ No newline at end of file
diff --git a/plugin.video.gfq/changelog.txt b/plugin.video.gfq/changelog.txt
index 17fe27a..a87e6e8 100644
--- a/plugin.video.gfq/changelog.txt
+++ b/plugin.video.gfq/changelog.txt
@@ -1,2 +1,11 @@
-[B]1.0.0[/B]

+[B]1.1.0[/B]
+- Changed show series to be listed dynamically from 
http://www.guysfromqueens.com/feeds/
+- Added Latest Episodes for a recent listing of GFQ Network shows
+- Fixed a bug where due to a feedburner formatting issue the RSS Video feeds 
(Episodes) were not getting loaded properly
+- Removed Stickam live feed from the GFQ Live menu as the streaming service no 
longer exists
+- Added Vaughn live streaming service to GFQ Live menu
+- Added live streaming audio only to the GFQ Live menu
+- Changed GFQ Live titles to match the correct bitrate of the streams
+
+[B]1.0.0[/B]
 - Initial release, derived from the TWiT addon made by divingmule and Adam B
\ No newline at end of file
diff --git a/plugin.video.gfq/default.py b/plugin.video.gfq/default.py
index 342b9b1..578762f 100644
--- a/plugin.video.gfq/default.py
+++ b/plugin.video.gfq/default.py
@@ -1,281 +1,318 @@
-#############################################################################################

-#

-# Name: plugin.video.gfq

-# Author: Bawitdaba

-# Description: Guys From Queens Network live video streams and podcast episodes

-# Type: Video Addon

-# Comments: Original release derived from the TWiT addon made by divingmule 
and Adam B

-#

-#############################################################################################

-

-import urllib,urllib2,re,os

-import xbmcplugin,xbmcgui,xbmcaddon

-from BeautifulSoup import BeautifulSoup

-

-__settings__ = xbmcaddon.Addon(id='plugin.video.gfq')

-__language__ = __settings__.getLocalizedString

-videoq = __settings__.getSetting('video_quality')

-home = __settings__.getAddonInfo('path')

-fanart = xbmc.translatePath( os.path.join( home, 'fanart.jpg' ) )

-

-

-def categories():

-        addDir(__language__(30000),'addLiveLinks',3,xbmc.translatePath( 
os.path.join( home, 'resources/live.png' ) ))

-        
addDir(__language__(30101),'http://feeds.feedburner.com/BehindTheCountervideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/btc-video600x600.jpg')

-        
addDir(__language__(30102),'http://feeds.feedburner.com/BigBrotherRewindvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/powerpress/bbr2011-600x600-971.jpg')

-        
addDir(__language__(30103),'http://feeds.feedburner.com/ImJustSayingvideo?format=xml',1,'http://img185.imageshack.us/img185/3955/imjustsayingitunesbanne.jpg')

-        
addDir(__language__(30104),'http://feeds.feedburner.com/SpencerKobrensTheBaldTruthvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/tbt-video600x600.jpg')

-        
addDir(__language__(30105),'http://feeds.feedburner.com/TechNewsWeeklyvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/tnw-video600x600.jpg')

-        
addDir(__language__(30106),'http://feeds.feedburner.com/TheAndrewZarianShowvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/azshow-video-600x600.jpg')

-        
addDir(__language__(30107),'http://blip.tv/Chauncehaydenshow/rss',1,'http://a.images.blip.tv/Steppinout-300x300_show_image550.jpg')

-        
addDir(__language__(30108),'http://feeds.feedburner.com/TheFreeForAllvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/ffa-video600x600.jpg')

-        
addDir(__language__(30109),'http://feeds.feedburner.com/TheNewsWithJessicavideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/news-video600x600.jpg')

-        
addDir(__language__(30110),'http://feeds.feedburner.com/WhatTheTechvideo?format=xml',1,'http://www.guysfromqueens.com/wp-content/uploads/2011/11/wtt600x600-video.jpg')

-

-def addLiveLinks():

-        addLink(__language__(30001)+' ','URL',__language__(30001)+' 
','',7,xbmc.translatePath( os.path.join( home, 'resources/live-stickam.png' ) ))

-        addLink(__language__(30002)+' 
','http://cgw.ustream.tv/Viewer/getStream/1/3068635.amf',__language__(30002)+' 
','',5,xbmc.translatePath( os.path.join( home, 'resources/live-ustream.png' ) ))

-        addLink(__language__(30003)+' ','URL',__language__(30003)+' 
','',6,xbmc.translatePath( os.path.join( home, 'resources/live-justintv.png' ) 
))

-

-def index(url,iconimage):

-        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0'}

-        req = urllib2.Request(url,None,headers)

-        response = urllib2.urlopen(req)

-        link=response.read()

-        response.close()

-

-       link=link.replace('&amp;','&')

-       link=link.replace('&quot;','"')

-       link=link.replace('&apos;',"'")

-       link=link.replace('&lt;','<')

-       link=link.replace('&gt;','>')

-       link=link.replace('&nbsp;',' ')

-       link=link.replace('&shy;','-')

-

-        soup = BeautifulSoup(link)

-

-        info = soup.findAll('enclosure')

-       #print 'debug:::: info: '+str(info)

-

-       vidurls=re.compile('<enclosure.*url="(.+?)".*').findall(str(info))

-

-        title = soup.findAll('title')

-        del title[0];del title[0]

-        name=re.compile('<title>(.+?)</title>').findall(str(title))

-

-       description=''

-        desc = soup.findAll('itunes:subtitle')

-       if len(desc) != 0:

-            del desc[0]

-            
description=re.compile('<itunes:subtitle>(.+?)</itunes:subtitle>').findall(str(desc))

-

-        pubdate = soup.findAll('pubdate')

-        del pubdate[0]

-        date=re.compile('<pubdate>(.+?)</pubdate>').findall(str(pubdate))

-

-       if len(name) != len(date):

-            pubdate = soup.findAll('pubdate')

-            date=re.compile('<pubdate>(.+?)</pubdate>').findall(str(pubdate))

-

-

-       #print 'debug:::: Name Length: '+str(len(name))

-       #print 'debug:::: URL Length: '+str(len(vidurls))

-       #print 'debug:::: Description Length: '+str(len(description))

-       #print 'debug:::: Date Length: '+str(len(date))

-

-        for index in range (len(name)):

-            if len(name)==len(description):

-                
addLink(name[index],vidurls[index],description[index],date[index],4,iconimage)

-            else:

-                addLink(name[index],vidurls[index],'',date[index],4,iconimage)

-

-

-def getSwf(inURL):

-        req = urllib2.Request(inURL)

-        response = urllib2.urlopen(req)

-        swfUrl = response.geturl()

-        return swfUrl

-

-

-def getUstream(url):

-        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0',

-                   'Referer' : 'http://www.ustream.tv/gfqlive'}

-        data = None

-        req = urllib2.Request(url,data,headers)

-        response = urllib2.urlopen(req)

-        link=response.read()

-        response.close()

-

-        match = re.compile('(rtmp://.+?)\x00').findall(link)

-        rtmp = match[0]

-

-        sName = re.compile('streamName\W\W\W(.+?)[/]*\x00').findall(link)

-        playpath = ' playpath='+sName[0]+' app=ustreamVideo/3068635'

-        swf = ' swfUrl='+getSwf('http://www.ustream.tv/flash/viewer.swf')

-        pageUrl = ' pageUrl=http://www.ustream.tv/gfqlive'

-        url = rtmp + playpath + swf + pageUrl + ' swfVfy=1 live=true'

-

-        item = xbmcgui.ListItem(path=url)

-        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)

-

-

-def getStickam():

-       UserID = '175141254'

-

-        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0',

-                   'Referer' : 'http://www.stickam.com/guysfromqueens'}

-        req = 
urllib2.Request('http://player.stickam.com/servlet/flash/getChannel?type=join&performerID='
 + UserID,None,headers)

-        response = urllib2.urlopen(req)

-        link=response.read()

-        response.close()

-        soup = BeautifulSoup(link)

-

-        match = 
re.compile('freeServerIP=(.+?),.*channelID=(.+?)&.*').findall(str(link))

-       match = match[0]

-       rtmpIP = match[0]

-       HostID = match[1]

-

-       app = 'app=video_chat2_stickam_peep/'+HostID

-       swfUrl = 
'swfUrl='+getSwf('http://player.stickam.com/flash/stickam/stickam_simple_video_player.swf')

-       tcUrl = 'rtmp://' + rtmpIP + '/video_chat2_stickam_peep/' + HostID + 
'/public/mainHostFeed'

-       pageUrl = 'pageUrl=http://www.stickam.com/guysfromqueens'

-       connamf = 'conn=O:1 conn=NS:channel:' + UserID + ' conn=O:1'

-       live = 'live=true'

-

-       url = tcUrl + ' ' + swfUrl + ' ' + app + ' ' + pageUrl + ' ' + connamf 
+ ' ' + live

-

-        item = xbmcgui.ListItem(path=url)

-        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)

-

-

-def getJtv():

-        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0',

-                   'Referer' : 'http://www.justin.tv/guysfromqueens'}

-        req = 
urllib2.Request('http://usher.justin.tv/find/guysfromqueens.xml?type=live',None,headers)

-        response = urllib2.urlopen(req)

-        link=response.read()

-        response.close()

-        soup = BeautifulSoup(link)

-        token = ' jtv='+soup.token.string.replace('\\','\\5c').replace(' 
','\\20').replace('"','\\22')

-        rtmp = soup.connect.string+'/'+soup.play.string

-        Pageurl = ' Pageurl=http://www.justin.tv/guysfromqueens'

-        swf = ' 
swfUrl=http://www.justin.tv/widgets/live_embed_player.swf?channel=guysfromqueens'

-        url = rtmp+token+swf+Pageurl

-        item = xbmcgui.ListItem(path=url)

-        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)

-

-

-def playLive(url):

-        item = xbmcgui.ListItem(path=url)

-        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)

-

-

-def get_params():

-        param=[]

-        paramstring=sys.argv[2]

-        if len(paramstring)>=2:

-            params=sys.argv[2]

-            cleanedparams=params.replace('?','')

-            if (params[len(params)-1]=='/'):

-                params=params[0:len(params)-2]

-            pairsofparams=cleanedparams.split('&')

-            param={}

-            for i in range(len(pairsofparams)):

-                splitparams={}

-                splitparams=pairsofparams[i].split('=')

-                if (len(splitparams))==2:

-                    param[splitparams[0]]=splitparams[1]

-        return param

-

-

-def addLink(name,url,description,date,mode,iconimage):

-        ok=True

-

-        try:

-           if date != '':

-               description = description + "\n \n Published: " + date

-        except:

-           if date != '':

-               description = "Published: " + date

-

-        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)

-

-        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)

-       liz.setInfo(type="Video", 
infoLabels={"Title":name,"Plot":description,"Date": date})

-        liz.setProperty( "Fanart_Image", fanart )

-        liz.setProperty('IsPlayable', 'true')

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz)

-

-        return ok

-

-

-def addDir(name,url,mode,iconimage):

-        ok=True

-        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)

-        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)

-        liz.setInfo( type="Video", infoLabels={ "Title": name } )

-        liz.setProperty( "Fanart_Image", fanart )

-        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)

-

-        return ok

-

-

-params=get_params()

-url=None

-name=None

-mode=None

-

-try:

-    url=urllib.unquote_plus(params["url"])

-except:

-    pass

-try:

-    name=urllib.unquote_plus(params["name"])

-except:

-    pass

-try:

-    iconimage=urllib.unquote_plus(params["iconimage"])

-except:

-    pass

-try:

-    mode=int(params["mode"])

-except:

-    pass

-

-#print "Mode: "+str(mode)

-#print "URL: "+str(url)

-#print "Name: "+str(name)

-

-if mode==None or url==None or len(url)<1:

-    print ""

-    categories()

-

-elif mode==1:

-    print ""

-    index(url,iconimage)

-

-elif mode==2:

-    print ""

-    getVideo(url)

-

-elif mode==3:

-    print ""

-    addLiveLinks()

-

-elif mode==4:

-    print ""

-    playLive(url)

-

-elif mode==5:

-    print ""

-    getUstream(url)

-

-elif mode==6:

-    print ""

-    getJtv()

-

-elif mode==7:

-    print ""

-    getStickam()

-

+#############################################################################################
+#
+# Name: plugin.video.gfq
+# Author: Bawitdaba
+# Description: Guys From Queens Network live video streams and podcast episodes
+# Type: Video Addon
+# Comments: Original release derived from the TWiT addon made by divingmule 
and Adam B
+#
+#############################################################################################
+
+import urllib,urllib2,re,os
+import xbmcplugin,xbmcgui,xbmcaddon
+from BeautifulSoup import BeautifulSoup
+
+__settings__ = xbmcaddon.Addon(id='plugin.video.gfq')
+__language__ = __settings__.getLocalizedString
+home = __settings__.getAddonInfo('path')
+fanart = xbmc.translatePath( os.path.join( home, 'fanart.jpg' ) )
+
+
+def categories():
+        addDir(__language__(30000),'addLiveLinks',3,xbmc.translatePath( 
os.path.join( home, 'resources/live.png' ) ))
+        
addDir(__language__(30100),'http://blip.tv/gfqnetwork/rss',1,xbmc.translatePath(
 os.path.join( home, 'resources/live.png' ) ))
+
+       headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0'}
+       req = 
urllib2.Request('http://www.guysfromqueens.com/feeds',None,headers)
+       response = urllib2.urlopen(req)
+       showHTML=response.read()
+       response.close()
+
+       showHTML=showHTML.replace('&amp;','&')
+       showHTML=showHTML.replace('&quot;','"')
+       showHTML=showHTML.replace('&apos;',"'")
+       showHTML=showHTML.replace('&#039;',"'")
+       showHTML=showHTML.replace('&lt;','<')
+       showHTML=showHTML.replace('&gt;','>')
+       showHTML=showHTML.replace('&nbsp;',' ')
+       showHTML=showHTML.replace('&shy;','-')
+
+       # Cut HTML off before inactive shows are listed
+       showHTML=showHTML.split('id="searchform"')[0]
+
+        soup = BeautifulSoup(showHTML, 
convertEntities=BeautifulSoup.HTML_ENTITIES)
+
+        items_left = soup.findAll('div', attrs={'style' : "float: left; width: 
300px; margin: 0 30px 20px 0;"})
+        items_right = soup.findAll('div', attrs={'style' : "float: left; 
width: 300px;"})
+        items = items_left + items_right
+        ShowTitles = []
+        CoverLinks = []
+        ShowLinks = []
+
+       for index in range (len(items)):
+               sub_items = BeautifulSoup(str(items[index]))
+
+               title_items = sub_items.findAll('h2')
+               
ShowTitles=ShowTitles+re.compile('<h2>(.*)</h2>').findall(str(title_items))
+
+               cover_items = sub_items.findAll('img')
+               CoverLinks=CoverLinks+re.compile('<img width="150" height="150" 
.* src="(.*)" title=".*').findall(str(cover_items))
+
+               link_items = sub_items.findAll('a')
+               ShowLinks=ShowLinks+re.compile('.*<a href="(.*)" 
target="_blank">RSS .*video.*</a>.*').findall(str(link_items))
+
+               #print 'debug:::: ShowTitles: '+str(len(ShowTitles))
+               #print 'debug:::: CoverLinks: '+str(len(CoverLinks))
+               #print 'debug:::: ShowLinks: '+str(len(ShowLinks))
+
+       Sorted_ShowTitles = sorted(ShowTitles)
+
+       for sort_index in range (len(Sorted_ShowTitles)):
+               for index in range (len(ShowTitles)):
+                       if Sorted_ShowTitles[sort_index] == ShowTitles[index]:
+                               CoverLink=str(CoverLinks[index])
+                               CoverLink=CoverLink.replace('-150x150','')
+                               print 'debug:::: CoverLink: '+str(CoverLink)
+                               
addDir(ShowTitles[index],ShowLinks[index],1,CoverLink)
+                               
+
+def addLiveLinks():
+        addLink(__language__(30001)+' ','URL',__language__(30001)+' 
','',7,xbmc.translatePath( os.path.join( home, 'resources/vaughn.png' ) ))
+        addLink(__language__(30002)+' 
','http://cgw.ustream.tv/Viewer/getStream/1/3068635.amf',__language__(30002)+' 
','',5,xbmc.translatePath( os.path.join( home, 'resources/ustream.png' ) ))
+        addLink(__language__(30003)+' ','URL',__language__(30003)+' 
','',6,xbmc.translatePath( os.path.join( home, 'resources/justintv.png' ) ))
+        addLink(__language__(30004)+' 
','http://s25.streamerportal.com:8235/live',__language__(30004)+' 
','',4,xbmc.translatePath( os.path.join( home, 'resources', 
'resources/live.png' ) ))
+
+def index(url,iconimage):
+        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0'}
+        req = urllib2.Request(url,None,headers)
+        response = urllib2.urlopen(req)
+        link=response.read()
+        response.close()
+
+       link=link.replace('&amp;','&')
+       link=link.replace('&quot;','"')
+       link=link.replace('&apos;',"'")
+       link=link.replace('&lt;','<')
+       link=link.replace('&gt;','>')
+       link=link.replace('&nbsp;',' ')
+       link=link.replace('&shy;','-')
+
+        soup = BeautifulSoup(link)
+
+        info = soup.findAll('enclosure')
+
+        title = soup.findAll('title')
+        del title[0];del title[0]
+        name=re.compile('<title>(.+?)</title>').findall(str(title))
+
+       description=''
+        desc = soup.findAll('itunes:subtitle')
+       if len(desc) != 0:
+            del desc[0]
+            
description=re.compile('<itunes:subtitle>(.+?)</itunes:subtitle>').findall(str(desc))
+
+        pubdate = soup.findAll('pubdate')
+        del pubdate[0]
+        date=re.compile('<pubdate>(.+?)</pubdate>').findall(str(pubdate))
+
+       if len(name) != len(date):
+            pubdate = soup.findAll('pubdate')
+            date=re.compile('<pubdate>(.+?)</pubdate>').findall(str(pubdate))
+
+        link = link.replace('>','>\r\n')
+
+        soup = BeautifulSoup(link)
+        info = soup.findAll('enclosure')
+
+       vidurls=re.compile('.*<enclosure.*url="(.+?)".*').findall(str(info))
+
+       #print 'debug:::: Name Length: '+str(len(name))
+       #print 'debug:::: URL Length: '+str(len(vidurls))
+       #print 'debug:::: URL test: '+str(vidurls[0])
+       #print 'debug:::: Description Length: '+str(len(description))
+       #print 'debug:::: Date Length: '+str(len(date))
+
+        for index in range (len(name)):
+            if len(name)==len(description):
+                
addLink(name[index],vidurls[index],description[index],date[index],4,iconimage)
+            else:
+                addLink(name[index],vidurls[index],'',date[index],4,iconimage)
+
+
+def getSwf(inURL):
+        req = urllib2.Request(inURL)
+        response = urllib2.urlopen(req)
+        swfUrl = response.geturl()
+        return swfUrl
+
+def getUstream(url):
+        def getSwf():
+                url = 'http://www.ustream.tv/flash/viewer.swf'
+                req = urllib2.Request(url)
+                response = urllib2.urlopen(req)
+                swfUrl = response.geturl()
+                return swfUrl
+
+
+
+        headers = {'User-agent' : 'Mozilla/5.0 (Windows; U; Windows NT 5.1; 
en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13'}
+        data = None
+        req = urllib2.Request(url,data,headers)
+        response = urllib2.urlopen(req)
+        link=response.read()
+        response.close()
+        match = re.compile('.*(rtmp://.+?)\x00.*').findall(link)
+        rtmp = match[0]
+        sName = re.compile('.*streamName\W\W\W(.+?)[/]*\x00.*').findall(link)
+        playpath = ' playpath='+sName[0]
+        swf = ' swfUrl='+getSwf()
+        pageUrl = ' pageUrl=http://www.ustream.tv/gfqlive'
+        url = rtmp + playpath + swf + pageUrl + ' swfVfy=1 live=true'
+        playLive(url)
+
+def getVaughn():
+        rtmpIP = 'live.vaughnlive.tv:443/live'
+        #rtmpIP = 'video-viewing-slc-02.vaughnsoft.com:443/live'
+       app = 'app=live'
+        swfUrl = 
'swfUrl=http://vaughnlive.tv/swf/live_vaughnlive_player_v3.swf?channel=gfqnetwork'
+        tcUrl = 'rtmp://' + rtmpIP
+        pageUrl = 'pageUrl=http://vaughnlive.tv/gfqnetwork'
+        Playpath = 'Playpath=live_gfqnetwork'
+        live = 'live=true'
+
+        url = tcUrl + ' ' + swfUrl + ' ' + app + ' ' + Playpath + ' ' + 
pageUrl + ' ' + live
+
+        item = xbmcgui.ListItem(path=url)
+        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
+
+def getJtv():
+        headers = {'User-agent' : 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) 
Gecko/20100101 Firefox/6.0',
+                   'Referer' : 'http://www.justin.tv/guysfromqueens'}
+        req = 
urllib2.Request('http://usher.justin.tv/find/guysfromqueens.xml?type=live',None,headers)
+        response = urllib2.urlopen(req)
+        link=response.read()
+        response.close()
+        soup = BeautifulSoup(link)
+        token = ' jtv='+soup.token.string.replace('\\','\\5c').replace(' 
','\\20').replace('"','\\22')
+        rtmp = soup.connect.string+'/'+soup.play.string
+        Pageurl = ' Pageurl=http://www.justin.tv/guysfromqueens'
+        swf = ' 
swfUrl=http://www.justin.tv/widgets/live_embed_player.swf?channel=guysfromqueens'
+        url = rtmp+token+swf+Pageurl
+        item = xbmcgui.ListItem(path=url)
+        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
+
+
+def playLive(url):
+        item = xbmcgui.ListItem(path=url)
+        xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
+
+
+def get_params():
+        param=[]
+        paramstring=sys.argv[2]
+        if len(paramstring)>=2:
+            params=sys.argv[2]
+            cleanedparams=params.replace('?','')
+            if (params[len(params)-1]=='/'):
+                params=params[0:len(params)-2]
+            pairsofparams=cleanedparams.split('&')
+            param={}
+            for i in range(len(pairsofparams)):
+                splitparams={}
+                splitparams=pairsofparams[i].split('=')
+                if (len(splitparams))==2:
+                    param[splitparams[0]]=splitparams[1]
+        return param
+
+
+def addLink(name,url,description,date,mode,iconimage):
+        ok=True
+
+        try:
+           if date != '':
+               description = description + "\n \n Published: " + date
+        except:
+           if date != '':
+               description = "Published: " + date
+
+        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)
+
+        liz=xbmcgui.ListItem(name, iconImage="DefaultVideo.png", 
thumbnailImage=iconimage)
+       liz.setInfo(type="Video", 
infoLabels={"Title":name,"Plot":description,"Date": date})
+        liz.setProperty( "Fanart_Image", fanart )
+        liz.setProperty('IsPlayable', 'true')
+        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz)
+
+        return ok
+
+
+def addDir(name,url,mode,iconimage):
+        ok=True
+        
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)
+        liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", 
thumbnailImage=iconimage)
+        liz.setInfo( type="Video", infoLabels={ "Title": name } )
+        liz.setProperty( "Fanart_Image", fanart )
+        
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=True)
+
+        return ok
+
+
+params=get_params()
+url=None
+name=None
+mode=None
+
+try:
+    url=urllib.unquote_plus(params["url"])
+except:
+    pass
+try:
+    name=urllib.unquote_plus(params["name"])
+except:
+    pass
+try:
+    iconimage=urllib.unquote_plus(params["iconimage"])
+except:
+    pass
+try:
+    mode=int(params["mode"])
+except:
+    pass
+
+#print "Mode: "+str(mode)
+#print "URL: "+str(url)
+#print "Name: "+str(name)
+
+if mode==None or url==None or len(url)<1:
+    print ""
+    categories()
+
+elif mode==1:
+    print ""
+    index(url,iconimage)
+
+elif mode==2:
+    print ""
+    getVideo(url)
+
+elif mode==3:
+    print ""
+    addLiveLinks()
+
+elif mode==4:
+    print ""
+    playLive(url)
+
+elif mode==5:
+    print ""
+    getUstream(url)
+
+elif mode==6:
+    print ""
+    getJtv()
+
+elif mode==7:
+    print ""
+    getVaughn()
+
 xbmcplugin.endOfDirectory(int(sys.argv[1]))
\ No newline at end of file
diff --git a/plugin.video.gfq/resources/language/English/strings.xml 
b/plugin.video.gfq/resources/language/English/strings.xml
index 9b17b95..b593675 100644
--- a/plugin.video.gfq/resources/language/English/strings.xml
+++ b/plugin.video.gfq/resources/language/English/strings.xml
@@ -1,17 +1,9 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>

-<strings>

-  <string id='30000'>GFQ Live Streams</string>

-  <string id='30001'>Stickam 1 Mbps</string>

-  <string id='30002'>Ustream 500 Kbps</string>

-  <string id='30003'>Justin.TV 650 Kbps</string>

-  <string id='30101'>Behind The Counter Comics</string>

-  <string id='30102'>Big Brother Rewind</string>

-  <string id='30103'>Im Just Saying</string>

-  <string id='30104'>Spencer Kobren's The Bald Truth</string>

-  <string id='30105'>Tech News Weekly</string>

-  <string id='30106'>The Andrew Zarian Show</string>

-  <string id='30107'>The Chaunce Hayden Show</string>

-  <string id='30108'>The Free For All</string>

-  <string id='30109'>The News With Jessica</string>

-  <string id='30110'>What The Tech</string>

+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<strings>
+  <string id='30000'>GFQ Live Streams</string>
+  <string id='30001'>GFQ Live - Vaughn (1.2 MB/s)</string>
+  <string id='30002'>GFQ Live - UStream (980 KB/s)</string>
+  <string id='30003'>GFQ Live - Justin.TV (1.2 MB/s)</string>
+  <string id='30004'>GFQ Live - Audio Only (64 KB/s)</string>
+  <string id='30100'>Latest Episodes</string>
 </strings>
\ No newline at end of file

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

Summary of changes:
 plugin.video.gfq/addon.xml                         |   49 +-
 plugin.video.gfq/changelog.txt                     |   11 +-
 plugin.video.gfq/default.py                        |  597 +++++++++++---------
 plugin.video.gfq/resources/justintv.png            |  Bin 0 -> 8145 bytes
 .../resources/language/English/strings.xml         |   24 +-
 plugin.video.gfq/resources/live-justintv.png       |  Bin 24497 -> 0 bytes
 plugin.video.gfq/resources/live-stickam.png        |  Bin 38378 -> 0 bytes
 plugin.video.gfq/resources/live-ustream.png        |  Bin 23019 -> 0 bytes
 plugin.video.gfq/resources/ustream.png             |  Bin 0 -> 7844 bytes
 plugin.video.gfq/resources/vaughn.png              |  Bin 0 -> 15381 bytes
 10 files changed, 360 insertions(+), 321 deletions(-)
 create mode 100644 plugin.video.gfq/resources/justintv.png
 delete mode 100644 plugin.video.gfq/resources/live-justintv.png
 delete mode 100644 plugin.video.gfq/resources/live-stickam.png
 delete mode 100644 plugin.video.gfq/resources/live-ustream.png
 create mode 100644 plugin.video.gfq/resources/ustream.png
 create mode 100644 plugin.video.gfq/resources/vaughn.png


hooks/post-receive
-- 
Plugins

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons

Reply via email to