[REQUEST] Tumblr Image Plugin (Tumblr.com Picture Plugin) Addon?

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Rockafella83 Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #16
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
(This post was last modified: 2013-06-13 03:21 by Rockafella83.)
find quote
brendon2424 Offline
Junior Member
Posts: 25
Joined: May 2010
Reputation: 0
Post: #17
(2013-06-01 23:21)Rockafella83 Wrote:  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

After a little more trying I got it working. Thanks
find quote
99thin Offline
Junior Member
Posts: 1
Joined: Jun 2013
Reputation: 0
Post: #18
very useful information. thanks a lot for this.

thanks
99th
find quote
MATPOC Offline
Junior Member
Posts: 26
Joined: Nov 2009
Reputation: 0
Location: Russia
Post: #19
(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:

Code:
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
find quote
vamapaull Offline
Junior Member
Posts: 11
Joined: Nov 2012
Reputation: 0
Post: #20
Than you HyFrmn for this add-on!

An add-on that will display the dashboard content would be awesome!
(This post was last modified: 2013-11-23 11:00 by vamapaull.)
find quote
smallclone Offline
Senior Member
Posts: 266
Joined: Jun 2013
Reputation: 0
Location: Wales
Post: #21
(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?

I have this problem too. I only get the first 20 photos.

Intel NUC Celeron 847, Openelec 5

find quote
lovecraft23 Offline
Junior Member
Posts: 2
Joined: Jul 2013
Reputation: 0
Post: #22
I spent a little time in Python today to resolve this issue. This revised code for the default.py file in .xbmc/addons/plugin.image.xbmctumblrslideshow will allow you to view all results from a tumblr, not just the first 20. This new revision also includes photosets. Replace that file's code with this code and you're GOOD TO GO! I have also sent notice to HyFrmn as well so he can update his git repo.

Code:
#!/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()
(This post was last modified: 2014-05-17 05:03 by lovecraft23.)
find quote
smallclone Offline
Senior Member
Posts: 266
Joined: Jun 2013
Reputation: 0
Location: Wales
Post: #23
I seem to have lost all my account details after updating to Helix. Is there a way of getting them back? I have no configure option.

thanks

Intel NUC Celeron 847, Openelec 5

find quote
MATPOC Offline
Junior Member
Posts: 26
Joined: Nov 2009
Reputation: 0
Location: Russia
Post: #24
Unfortunately this plugin is not working on Kodi 14.x releases.
find quote
Rockafella83 Offline
Junior Member
Posts: 8
Joined: Apr 2012
Reputation: 0
Post: #25
(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)..
find quote
MATPOC Offline
Junior Member
Posts: 26
Joined: Nov 2009
Reputation: 0
Location: Russia
Post: #26
(2015-05-10 14:59)Rockafella83 Wrote:  
(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)..
I found this plugin working on Windows but not working on Linux (Ubuntu). It's very strange.
find quote
Post Reply