The branch, dharma has been updated
via 6e9b46b146f155e78f401b4b101f7251daa7e303 (commit)
from 4cfa744c458a9a18ae84c77a48d0e419260c0b47 (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/plugins;a=commit;h=6e9b46b146f155e78f401b4b101f7251daa7e303
commit 6e9b46b146f155e78f401b4b101f7251daa7e303
Author: spiff <[email protected]>
Date: Mon Feb 28 11:43:51 2011 +0100
[plugin.video.youtube] updated to version 2.0.2
diff --git a/plugin.video.youtube/YouTubeCore.py
b/plugin.video.youtube/YouTubeCore.py
index e382421..acfccc1 100755
--- a/plugin.video.youtube/YouTubeCore.py
+++ b/plugin.video.youtube/YouTubeCore.py
@@ -1,6 +1,6 @@
'''
YouTube plugin for XBMC
- Copyright (C) 2010 Tobias Ussing Senior And Henrik Mosgaard Jensen The
Third
+ Copyright (C) 2010-2011 Tobias Ussing And Henrik Mosgaard Jensen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
-import sys, urllib, urllib2, re, os, cookielib, string, socket
+import sys, urllib, urllib2, re, os, cookielib, string
from xml.dom.minidom import parseString
# ERRORCODES:
@@ -90,13 +90,13 @@ class YouTubeCore(object):
url =
urllib2.Request("https://www.google.com/youtube/accounts/ClientLogin")
url.add_header('Content-Type',
'application/x-www-form-urlencoded')
- url.add_header('GData-Version', 2)
+ url.add_header('GData-Version', '2')
data = urllib.urlencode({'Email': uname, 'Passwd': passwd,
'service': 'youtube', 'source': 'YouTube plugin'})
try:
con = urllib2.urlopen(url, data);
-
+
value = con.read()
con.close()
@@ -110,8 +110,6 @@ class YouTubeCore(object):
if self.__dbg__:
print self.__plugin__ + " login done: "
+ nick
return ( self.__language__(30030), 200 )
-
- print self.__plugin__ + " ABCD"
return ( self.__language__(30609), 303 )
@@ -344,7 +342,7 @@ class YouTubeCore(object):
playobjects = [];
for node in entries:
video = {};
- video['Title'] =
str(node.getElementsByTagName("title").item(0).firstChild.nodeValue.replace('Activity
of : ', '').replace('Videos published by : ', '')).encode( "utf-8" );
+ video['Title'] =
node.getElementsByTagName("title").item(0).firstChild.nodeValue.replace('Activity
of : ', '').replace('Videos published by : ', '').encode( "utf-8" );
video['published'] = self._getNodeValue(node,
"published", "2008-07-05T19:56:35.000-07:00")
video['summary'] = self._getNodeValue(node, 'summary',
'Unknown')
@@ -419,7 +417,7 @@ class YouTubeCore(object):
print self.__plugin__ + " construct_video_url
failed because of missing video from _get_details"
return ( "", 500 )
- if ( 'apierror' in video):
+ if ( 'apierror' in video ):
if self.__dbg__:
print self.__plugin__ + " construct_video_url,
got apierror: " + video['apierror']
return (video['apierror'], 303)
@@ -631,7 +629,6 @@ class YouTubeCore(object):
con = urllib2.urlopen(request)
result = con.read()
- print self.__plugin__ + "_ JSON " + repr(result);
(temp, status) = self._getVideoInfoBatch(result)
ytobjects += temp
@@ -655,7 +652,7 @@ class YouTubeCore(object):
request = urllib2.Request(link)
if api:
- request.add_header('GData-Version', 2)
+ request.add_header('GData-Version', '2')
else:
request.add_header('User-Agent', self.USERAGENT)
@@ -788,7 +785,6 @@ class YouTubeCore(object):
if self.__dbg__:
print self.__plugin__ + " extractVariables : " +
repr(videoid)
- # Should hl=en_US be there?
( htmlSource, status ) =
self._fetchPage('http://www.youtube.com/watch?v=' +videoid +
"&safeSearch=none&hl=en_us")
if status != 200:
@@ -852,7 +848,7 @@ class YouTubeCore(object):
request.add_header('X-GData-Key', 'key=%s' %
self.APIKEY)
request.add_header('Content-Type',
'application/atom+xml')
request.add_header('Content-Length',
str(len(add_request)))
- request.add_header('GData-Version', 2)
+ request.add_header('GData-Version', '2')
usock = urllib2.urlopen(request)
except urllib2.HTTPError, e:
error = str(e)
@@ -959,7 +955,7 @@ class YouTubeCore(object):
def _getVideoInfoBatch(self, value):
if self.__dbg__:
print self.__plugin__ + " _getvideoinfo: " +
str(len(value))
- print "xml: " + value
+
dom = parseString(value);
links = dom.getElementsByTagName("atom:link");
entries = dom.getElementsByTagName("atom:entry");
diff --git a/plugin.video.youtube/YouTubeNavigation.py
b/plugin.video.youtube/YouTubeNavigation.py
index a75cdc5..917fb93 100644
--- a/plugin.video.youtube/YouTubeNavigation.py
+++ b/plugin.video.youtube/YouTubeNavigation.py
@@ -1,6 +1,6 @@
'''
YouTube plugin for XBMC
- Copyright (C) 2010 Tobias Ussing Senior And Henrik Mosgaard Jensen The Third
+ Copyright (C) 2010-2011 Tobias Ussing And Henrik Mosgaard Jensen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
import sys
import os
import xbmc
-import xbmcaddon
import xbmcgui
import xbmcplugin
import urllib
@@ -1006,7 +1005,7 @@ class YouTubeNavigation:
cm.append( ( self.__language__( 30514 ),
"XBMC.Container.Update(%s?path=%s&action=search&search=%s)" % ( sys.argv[0],
get("path"), url_title ) ) )
cm.append( ( self.__language__( 30529 ),
"XBMC.Container.Update(%s?path=%s&action=list_related&videoid=%s)" % (
sys.argv[0], get("path"), item("videoid") ) ) )
- cm.append( ( self.__language__( 30527 ),
"XBMC.ActivateWindow(MusicPlaylist)"))
+ cm.append( ( self.__language__( 30527 ),
"XBMC.ActivateWindow(VideoPlaylist)"))
cm.append( ( self.__language__( 30504 ),
"XBMC.Action(Queue)", ) )
cm.append( ( self.__language__( 30502 ),
"XBMC.Action(Info)", ) )
elif (item("next","false") == "false"):
diff --git a/plugin.video.youtube/YouTubeScraperCore.py
b/plugin.video.youtube/YouTubeScraperCore.py
index 32f41bc..eed90a2 100644
--- a/plugin.video.youtube/YouTubeScraperCore.py
+++ b/plugin.video.youtube/YouTubeScraperCore.py
@@ -1,3 +1,21 @@
+'''
+ YouTube plugin for XBMC
+ Copyright (C) 2010-2011 Tobias Ussing And Henrik Mosgaard Jensen
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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 sys, urllib, urllib2, re
from BeautifulSoup import BeautifulSoup, SoupStrainer
import YouTubeCore
@@ -442,7 +460,7 @@ class YouTubeScraperCore:
yobjects.append(item)
- show = show.findNextSibling(name="div", attrs =
{ 'class':"show-cell *vl yt-uix-hovercard" })
+ show = show.findNextSibling(name="div", attrs =
{ 'class':re.compile("show-cell .") })
if (not yobjects):
return (self.__language__(30601), 303)
@@ -466,11 +484,15 @@ class YouTubeScraperCore:
get = params.get
scraper_per_page = 0
result = []
-
- if (get("scraper") != "shows" and get("scraper") != "show" and
get("scraper") != "categories" and (get("scraper") != "movies" or
(get("scraper") == "movies" and get("category"))) and get("scraper") in
self.urls):
- scraper_per_page = 40
- elif ( (get("scraper") == "shows" or get("scraper") ==
"categories" or get("scraper") == "shows") and get("category")):
+
+ if ( get("scraper") == "categories" and get("category")):
scraper_per_page = 23
+ elif ( get("scraper") == "shows" and get("category")):
+ scraper_per_page = 44
+ elif ( get("scraper") == "movies" and get("category")):
+ scraper_per_page = 60
+ elif (get("scraper") != "shows" and get("scraper") != "show"
and get("scraper") != "categories" and get("scraper") != "movies" and
get("scraper") in self.urls):
+ scraper_per_page = 40
if (self.__dbg__):
print self.__plugin__ + " scraper per page " +
str(scraper_per_page)
@@ -535,7 +557,11 @@ class YouTubeScraperCore:
print "Scraper
pagination failed, requested more than 10 pages which should never happen."
return False
+ if (next == "false" and len(result) > per_page):
+ next = "true"
+
result = result[:per_page]
+
result[len(result) - 1]["next"] = next
params["page"] = request_page
return (result, status)
diff --git a/plugin.video.youtube/addon.xml b/plugin.video.youtube/addon.xml
index de793f3..06e9d51 100644
--- a/plugin.video.youtube/addon.xml
+++ b/plugin.video.youtube/addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.youtube"
name="YouTube"
- version="2.0.0"
+ version="2.0.2"
provider-name="TheCollective">
<requires>
<import addon="xbmc.python" version="1.0"/>
diff --git a/plugin.video.youtube/changelog.txt
b/plugin.video.youtube/changelog.txt
index 0d05f46..697600a 100644
--- a/plugin.video.youtube/changelog.txt
+++ b/plugin.video.youtube/changelog.txt
@@ -6,6 +6,19 @@
- [YOUTUBE] Can't delete favorites (YouTube gives video id, not favorite id).
- Download of rtmpe streams not supported.
+[B]Version 2.0.2[/B]
+- Fixed problem with "Now Playing" context menu item showing the Music
Playlist and not the Video Playlist
+- Fixed Issue preventing the plugin running on XBMC builds using external
python (ie. v2.7)
+- Fixed Issue where the Trailers scraper wouldn't allow you to see the last
videos on the last page.
+- Fixed issue where Show and movie Scrapers would fail due to assumptions
about the number of videos on a page
+- Fixed issue where Show Scraper would miss the 1st video in every row after
the first row
+- Fixed Unicode problems reported by vikjon0
+- Added Spanish translations courtesy of Jurrabi
+- Updated Licensing information
+
+[B]Version 2.0.1[/B]
+- Removed some unnecessary print's statements that were sadly included in
production code, slowing the plugin down
+
[B]Version 2.0.0[/B]
- Version bump to Final Release
- Updated Changelog
diff --git a/plugin.video.youtube/default.py b/plugin.video.youtube/default.py
index e6019dc..cd823dc 100644
--- a/plugin.video.youtube/default.py
+++ b/plugin.video.youtube/default.py
@@ -1,6 +1,6 @@
'''
YouTube plugin for XBMC
- Copyright (C) 2010 Tobias Ussing Senior And Henrik Mosgaard Jensen The
Third
+ Copyright (C) 2010 Tobias Ussing And Henrik Mosgaard Jensen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
import sys, xbmc, xbmcaddon
# plugin constants
-__version__ = "2.0.0"
+__version__ = "2.0.2"
__plugin__ = "YouTube-" + __version__
__author__ = "TheCollective"
__url__ = "www.xbmc.com"
-----------------------------------------------------------------------
Summary of changes:
plugin.video.youtube/YouTubeCore.py | 22 +--
plugin.video.youtube/YouTubeNavigation.py | 5 +-
plugin.video.youtube/YouTubeScraperCore.py | 36 ++++-
plugin.video.youtube/addon.xml | 2 +-
plugin.video.youtube/changelog.txt | 13 ++
plugin.video.youtube/default.py | 4 +-
.../resources/language/Spanish/strings.xml | 184 ++++++++++++++++++++
7 files changed, 242 insertions(+), 24 deletions(-)
create mode 100644 plugin.video.youtube/resources/language/Spanish/strings.xml
hooks/post-receive
--
Plugins
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons