2013-06-01, 23:21
It worked for me, you have to download the zip project from github, un-zip the project and inside, there is the zip you need to add to xbmc
(2013-01-28, 01:13)HyFrmn Wrote: I had some spare time to try this out. Here is my attempt at a tumblr plugin using v2 of the api. I hope to add more settings and make them a little more user friendly in the near future."Next page" not working - missed slash in plugin address: For example when I tried to load "Next page" of automotivated:
14:28:11 T:3006879552 DEBUG: OnKey: return (f00d) pressed, action is Select
14:28:11 T:3006879552 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.image.xbmctumblrslideshowautomotivated/?start=20)
14:28:11 T:3006879552 DEBUG: ParentPath = [plugin://plugin.image.xbmctumblrslideshow/automotivated]
14:28:11 T:2922695488 NOTICE: Thread Jobworker start, auto delete: true
14:28:11 T:2922695488 ERROR: Unable to find plugin plugin.image.xbmctumblrslideshowautomotivated
14:28:11 T:3006879552 ERROR: GetDirectory - Error getting plugin://plugin.image.xbmctumblrslideshowautomotivated/?start=20
14:28:11 T:3006879552 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.xbmctumblrslideshowautomotivated/?start=20) failed
14:28:11 T:3006879552 DEBUG: CGUIMediaWindow::GetDirectory (plugin://plugin.image.xbmctumblrslideshow/automotivated)
14:28:11 T:3006879552 DEBUG: ParentPath = [plugin://plugin.image.xbmctumblrslideshow/]
14:28:11 T:3006879552 DEBUG: Loading fileitems [plugin://plugin.image.xbmctumblrslideshow/automotivated/]
14:28:11 T:3006879552 DEBUG: -- items: 21, directory: plugin://plugin.image.xbmctumblrslideshow/automotivated sort method: 0, ascending: false
(2013-05-09, 16:38)john3981 Wrote: HyFrmn, thanks for creating this, I am having an issue thought going to the next page of slide shows, for some reasons none of the 5 I have access show Page 2
Can you check?
#!/usr/bin/env python
import sys
import urllib2
import json
import xbmcgui
import xbmcplugin
import xbmcaddon
__settings__ = xbmcaddon.Addon(id='script.image.lastfm.slideshow')
__language__ = __settings__.getLocalizedString
lib = os.path.join(__settings__.getAddonInfo('path'), 'Resources', 'lib')
sys.path.append(lib)
print sys.path
from xbmcapi import XBMCSourcePlugin
API_KEY = 'x1XhpKkt9qCtqyXdDEGHp5TCDQ1TOWm2VTLiWUm0FHpdkHI5Rj'
def getText(nodelist):
rc = []
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc.append(node.data)
return ''.join(rc)
plugin = XBMCSourcePlugin()
def catagories():
cats = [c.strip() for c in plugin.getSetting('tumblrs').split()]
for cat in cats:
thumbnail = 'http://api.tumblr.com/v2/blog/%s.tumblr.com/avatar/256' % cat
listitem = xbmcgui.ListItem(cat, iconImage=thumbnail)
ok = plugin.addDirectoryItem(url='%s/%s' % (plugin.root, cat), listitem=listitem, isFolder=True)
plugin.endOfDirectory()
urls = []
def listimages(tumblr):
print tumblr
start = int(plugin.query.get('start',0))
url = 'http://api.tumblr.com/v2/blog/%s.tumblr.com/posts/photo?api_key=%s&offset=%d' % (tumblr, API_KEY, start)
print 'URL:', url
fd = urllib2.urlopen(url)
dom = json.load(fd)
fd.close()
posts = dom['response']['posts']
if len(posts) >= 20:
thumbnail = 'http://api.tumblr.com/v2/blog/%s.tumblr.com/avatar/256' % tumblr
listitem = xbmcgui.ListItem('Next Page (%d - %d)' % (start + 20, start + 40), iconImage=thumbnail)
url = 'plugin://plugin.image.xbmctumblrslideshow/' + plugin.path + '?start=' + str(start + 20)
plugin.addDirectoryItem(url=url,listitem=listitem,isFolder=True)
post_index = start
for post in posts:
index = 1
children = [photo['alt_sizes'][0] for photo in post['photos']]
for tag in children:
if len(children) > 1:
label = 'Post %d - %d' % (post_index, index)
else:
label = 'Post %d' % (post_index)
listitem = xbmcgui.ListItem(label)
url = tag['url']
if (url in urls):
continue
print 'URL:', url
plugin.addDirectoryItem(url=url, listitem=listitem)
index += 1
post_index += 1
plugin.endOfDirectory()
if plugin.path:
tumblr = plugin.path.split('/')[0]
listimages(tumblr)
else:
catagories()
(2015-05-10, 14:59)Rockafella83 Wrote:I found this plugin working on Windows but not working on Linux (Ubuntu). It's very strange.(2015-03-01, 11:36)MATPOC Wrote: Unfortunately this plugin is not working on Kodi 14.x releases.Nope, it worked fine for me on Kodi 14.2. I've add the modification to the python file default.py and it work also behond page 1 (more than 20 images)..