2013-10-15, 02:20
unfortunately, it doesn't work that way with the linux builds...
there's no true "monthly builds"... you get what's in the ppa's.
there's no true "monthly builds"... you get what's in the ppa's.
(2013-10-15, 16:33)locomot1f Wrote: http://forum.xbmc.org/showthread.php?tid...pid1527263Thank you! Just let me time to handle it.
--- xbmclibrary.py.orig 2013-10-17 11:40:37.915328039 -0500
+++ xbmclibrary.py 2013-10-17 11:17:21.208402149 -0500
@@ -95,6 +95,10 @@
if not os.path.exists(dir_path):
os.makedirs(dir_path)
+ def cleandirectoryname(self, name):
+ valid_chars = "-_() %s%s" % (string.ascii_letters, string.digits)
+ return ''.join(c for c in name if c in valid_chars)
+
def cleanfilename(self, name):
valid_chars = "-_.() %s%s" % (string.ascii_letters, string.digits)
return ''.join(c for c in name if c in valid_chars)
@@ -180,22 +184,43 @@
def ExportShow(self, show):
data = show.find('data')
+ items_url = show.findtext('items_url')
#show_name = data.findtext('name')
#directory = os.path.join(TV_SHOWS_PATH,self.cleanfilename(show_name))
#self.CreateDirectory(directory)
show_id = data.findtext('show_id')
url = 'http://m.hulu.com/menu/11674?show_id='+show_id+'&dp_id=hulu&limit=2000&package_id='+package_id
+ print "Getting " + data.findtext('name')
xml=common.getFEED(url)
tree = ElementTree.XML(xml)
episodes = tree.findall('item')
del tree
- for episode in episodes:
- self.ExportVideo(episode)
+ if episodes:
+ for episode in episodes:
+ self.ExportVideo(episode)
+ else:
+ print "Getting " + data.findtext('name')+ "-Alternate Method"
+ url = 'http://m.hulu.com'+items_url+'&dp_id=hulu&limit=2000&package_id='+package_id
+ xml = common.getFEED(url)
+ tree = ElementTree.XML(xml)
+ items = tree.findall('item')
+ del tree
+ for item in items:
+ if item.findtext('display').strip() == "Episodes":
+ real_items_url = item.findtext('items_url')
+ url = 'http://m.hulu.com'+real_items_url+'&dp_id=hulu&limit=2000&package_id='+package_id
+ xml = common.getFEED(url)
+ tree = ElementTree.XML(xml)
+ episodes = tree.findall('item')
+ for episode in episodes:
+ self.ExportVideo(episode)
+
#self.Notification('Added Subscription',show_name)
def ExportVideo(self, episode):
data = episode.find('data')
if data:
+ print "Adding Episode: " + data.findtext('title').encode('utf-8')
content_id = data.findtext('content_id')
video_id = data.findtext('video_id')
eid = data.findtext('eid')
@@ -210,7 +235,7 @@
episode = data.findtext('episode_number').encode('utf-8')
show_name = data.findtext('show_name').encode('utf-8').strip()
filename = self.cleanfilename('S%sE%s - %s' % (season,episode,title))
- directory = os.path.join(TV_SHOWS_PATH,self.cleanfilename(show_name))
+ directory = os.path.join(TV_SHOWS_PATH,self.cleandirectoryname(show_name))
self.CreateDirectory(directory)
self.SaveFile( filename+'.strm', strm, directory)
if common.settings['episodenfo'] == 'true':
(2013-02-16, 22:52)rflores2323 Wrote:(2013-02-15, 19:00)tknorris Wrote:(2013-02-15, 18:50)rflores2323 Wrote: any help?
I suspect that the problem is the hulu plugin stores the Hulu authentication token in the addon directory rather than the profile directory. That means all instances of the plugin would share the same token, and thus the same login. If I'm correct, it would require a code change to fix it.
The code in question would be below in common.py under <plugin dir>/resouces/lib.
Code:COOKIEFILE = os.path.join(pluginpath,'resources','cache','hulu-cookies.lwp')
QUEUETOKEN = os.path.join(pluginpath,'resources','cache','token.xml')
Notice the Hulu cookie and the authentication token are both stored in the <addon directory>/resouces/cache itself rather than in a profile directory. That means they are shared across all profiles. So, once you logon to Hulu, all profiles will be logged on w/ the same id. Unfortunately, I don't know enough about XBMC addon programming to fix it.
Thank you for the response. Ill check with bluecop to see if he can fix or another developer. Appreciate the help
(2013-10-18, 18:07)locomot1f Wrote: @moneymaker,
would you like for us to post bugs if we find them?
__plugin_handle__ = int(sys.argv[1])
if __has_addons__:
__addon__ = xbmcaddon.Addon('plugin.video.hulu')
__plugin_handle__ = int(sys.argv[1])
if __has_addons__:
__addon__ = xbmcaddon.Addon('plugin.video.hulu-beta')
12:25:45 T:139972345751296 NOTICE: -->Python Interpreter Initialized<--
12:25:45 T:139972345751296 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: No module named crypto.cipher.cbc
Traceback (most recent call last):
File "/home/xbmc/.xbmc/addons/plugin.video.hulu-beta/default.py", line 12, in <module>
import resources.lib.common as common
File "/home/xbmc/.xbmc/addons/plugin.video.hulu-beta/resources/lib/common.py", line 16, in <module>
from crypto.cipher.cbc import CBC
ImportError: No module named crypto.cipher.cbc
-->End of Python script error report<--
12:25:45 T:139974207313792 ERROR: GetDirectory - Error getting plugin://plugin.video.hulu-beta/
12:25:45 T:139974207313792 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.hulu-beta/) failed