• 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 11
script.module.metautils dev
#91
slyi Wrote:I was just using json for simplity for my own testing, sql is definatly the best option. I was playing with t0mmo test sample to enable metahandler async. I needed to add a couple of helper queries to metahandlers but otherwise it works well and loads unscraped content faster.

http://dl.dropbox.com/u/6589941/asyncmet...ult.py.txt
http://dl.dropbox.com/u/6589941/asyncmet...ers.py.txt

There is a still some bugs in it that i need to figure out and add back in updating the UI as each thead completes.

Threads run in the background even if the users exit the app and the will still save the requested data to the DB for next load.

Very cool stuff

Would you be interested in helping apply asynchronous calls to the next major version of Icefilms? Since you are already playing with Icefilms code... Smile
Reply
#92
Just pushed a quick update that adds 'year' to the movie meta table, this is the year that is passed in by the user

I want to enhance this slightly to take the year from the 'premiered' date and use in in 'year' if the user does not pass in a year, as I missed this one when looking at infolabels.. 'year' is an infolabel and most skins make use of it

Does anyone know of a skin that displays 'premiered' ?

Also tested and slightly fixed up the watched status, it works well.. I've updated the first post with instructions on how to use, it's pretty simple.. but will need some practical testing in case it needs enhancements

Otherwise I'm pretty happy with how it scrapes, stores, retrieves the data.. next up is some enhancements:

- method to insert metadata packs into database so that each addon can supply it's own pack
- individual item update, I believe I just need to return a list of matches from TMDB based on movie name.. should be easy to do
Reply
#93
Hey Eldorado

Just been trying to make t0mm0's common module can add your infolabes but am having a hard time trying to get it to work.

Any tips to why the error

http://pastebin.com/sUYWTrid

Code:
def add_Metadirectory(self, queries, infolabels, img='',fanart='',total_items=0,isFolder=True):
    
        infolabels= self.unescape_dict(infolabels)
        url = self.build_plugin_url(queries)
        listitem = xbmcgui.ListItem(infolabels['title'], iconImage=img,thumbnailImage=img)
        listitem.setInfo('video', infolabels)
        
        xbmcplugin.addDirectoryItem(self.handle, url, listitem,isFolder=is_folder, totalItems=total_items)
Reply
#94
k_zeon Wrote:Hey Eldorado

Just been trying to make t0mm0's common module can add your infolabes but am having a hard time trying to get it to work.

Any tips to why the error

http://pastebin.com/sUYWTrid

Code:
def add_Metadirectory(self, queries, infolabels, img='',fanart='',total_items=0,isFolder=True):
    
        infolabels= self.unescape_dict(infolabels)
        url = self.build_plugin_url(queries)
        listitem = xbmcgui.ListItem(infolabels['title'], iconImage=img,thumbnailImage=img)
        listitem.setInfo('video', infolabels)
        
        xbmcplugin.addDirectoryItem(self.handle, url, listitem,isFolder=is_folder, totalItems=total_items)

It's because currently his library doesn't allow adding meta data to directories, only to video items... it should be an easy fix if it can be done the way I think it can, just haven't tried it yet..
Reply
#95
Eldorado Wrote:It's because currently his library doesn't allow adding meta data to directories, only to video items... it should be an easy fix if it can be done the way I think it can, just haven't tried it yet..


Yes that was what i am trying to do. this bit of code goes in t0mm0's common module, but i cannot get it to work.
Unless i need to add more code that i am not aware of.

As soon as i get this working i can get on with finishing my addon.
Reply
#96
k_zeon Wrote:Yes that was what i am trying to do. this bit of code goes in t0mm0's common module, but i cannot get it to work.
Unless i need to add more code that i am not aware of.

As soon as i get this working i can get on with finishing my addon.

Ah.. quickly scanned what you had there

Error must be in the meta data you are passing in, whatever it is wants an integer vs string, kind of hard to tell which one it is.. can you try systematically adding them one by one until the error hits?

Just finished up a quick method to return a list of possible matches to use where the user would like to refresh meta data for an individual movie, I'll send it up soon and update first post with instructions
Reply
#97
I just used and tweaked the AddDir that is already in t0mm0's common module.

If it works for Add_videoitem then it should work here.

Strange
Reply
#98
k_zeon Wrote:I just used and tweaked the AddDir that is already in t0mm0's common module.

If it works for Add_videoitem then it should work here.

Strange

I was thinking that add_video_item should be the one to get modified, just add a parm to it to specify if it's a folder.. if you add a isfolder=True it will do what you want
Reply
#99
Eldorado Wrote:Very cool stuff

Would you be interested in helping apply asynchronous calls to the next major version of Icefilms? Since you are already playing with Icefilms code... Smile

Yes I be happy to help, do you have a github for icefilms using t0mmo lib yet or is too early, I updated the two files above for some updates which seen to fix most remaining issues apart from a dup "Seven days" issue on "s".
Reply
hey Eldorado

found that when adding the Plot, i get through approx 157 then it errors

self.log_debug(u'adding movie: %s - %s' % (infolabels['title'], infolabels['plot']))

listitem.setInfo('video', {'Title': infolabels['title'], 'Genre': infolabels['genre'], 'Plot': infolabels['plot']})

Looked through the Log http://pastebin.com/W6SMz97B
and found a the Plot being returned as None.
This is not a str or int

should it not return 'None' as a string or just ' '

Edit:

In my new Def i have added a check that if infolabels['plot'] = None then make infolabels['plot'] ='' (ie a string)
maybe i will come accross more of these when adding each infolabel.
I did:
Code:
if infolabels['plot'] is None:
            infolabels['plot']=''
         if infolabels['rating'] is None:
            infolabels['rating']=float(0)
         if infolabels['genre'] is None:
            infolabels['genre']=''
         if infolabels['duration'] is None:
            infolabels['duration']=int(0)  
         if infolabels['mpaa'] is None:
            infolabels['mpaa']=''
         if infolabels['trailer_url'] is None:
            infolabels['trailer_url']=''
         if infolabels['cast'] is None:
            infolabels['cast']=''

Maybe you should change the return from None to ''

Edit:
Also found that Trailer Urls load but when trying to play they dont. Is there a way to get the Youtube trailer to play using the Youtube addon.
Reply
these are wrong. does anyone know what should be passed if nothing is found

if infolabels['rating'] is None:
infolabels['rating']=float(0) <<< wrong

if infolabels['duration'] is None:
infolabels['duration']=int(0) wrong
Reply
For the add directory i use
PHP Code:
def add_directory(selfqueriestitleinfoLabels={}, img=''fanart=''
                      
total_items=0is_folder=True):
        
'''
        Add a directory to the list of items to be displayed by XBMC.
        
        When selected by the user, directory will call the addon with the 
        query values contained in `queries`.
        
        Args:
            queries (dict): A set of keys/values to be sent to the addon when 
            the user selects this item.
            
            title (str): The name to be displayed for this entry.
        
        Kwargs:
            img (str): A URL to an image file to be used as an icon for this
            entry.
            
            fanart (str): A URL to a fanart image for this entry.
            
            total_items (int): Total number of items to be added in this list.
            If supplied it enables XBMC to show a progress bar as the list of
            items is being built.

            is_folder (bool): if ``True`` (default), when the user selects this 
            item XBMC will expect the plugin to add another set of items to 
            display. If ``False``, the '
Loading Directory' message will not be
            displayed by XBMC (useful if you want a directory item to do 
            something like pop up a dialog).
        
        '''
        
title self.unescape(title)
        
url self.build_plugin_url(queries)
        
self.log_debug(u'adding dir: %s - %s' % (titleurl))
        
listitem xbmcgui.ListItem(titleiconImage=img
                                    
thumbnailImage=img)
        if  
len(infoLabels)>0:
            
listitem.setInfo(type="Video"infoLabels=infoLabels)
        
listitem.setProperty('fanart_image'fanart)
        
xbmcplugin.addDirectoryItem(self.handleurllistitem
                                    
isFolder=is_foldertotalItems=total_items
Reply
slyi Wrote:Yes I be happy to help, do you have a github for icefilms using t0mmo lib yet or is too early, I updated the two files above for some updates which seen to fix most remaining issues apart from a dup "Seven days" issue on "s".

Check the icefilms dev thread in this forum, one of the last posts I gave a link to a forked version where I merged the master branch with stable, master is the unfinished branch with many new features

Not sure about merging with t0mm0's lib, there's a lot of cleanup that would need to be done in the icefilms code to get to that point
Reply
k_zeon Wrote:hey Eldorado

found that when adding the Plot, i get through approx 157 then it errors

self.log_debug(u'adding movie: %s - %s' % (infolabels['title'], infolabels['plot']))

listitem.setInfo('video', {'Title': infolabels['title'], 'Genre': infolabels['genre'], 'Plot': infolabels['plot']})

Looked through the Log http://pastebin.com/W6SMz97B
and found a the Plot being returned as None.
This is not a str or int

should it not return 'None' as a string or just ' '

Edit:

In my new Def i have added a check that if infolabels['plot'] = None then make infolabels['plot'] ='' (ie a string)
maybe i will come accross more of these when adding each infolabel.
I did:
Code:
if infolabels['plot'] is None:
            infolabels['plot']=''
         if infolabels['rating'] is None:
            infolabels['rating']=float(0)
         if infolabels['genre'] is None:
            infolabels['genre']=''
         if infolabels['duration'] is None:
            infolabels['duration']=int(0)  
         if infolabels['mpaa'] is None:
            infolabels['mpaa']=''
         if infolabels['trailer_url'] is None:
            infolabels['trailer_url']=''
         if infolabels['cast'] is None:
            infolabels['cast']=''

Maybe you should change the return from None to ''

Edit:
Also found that Trailer Urls load but when trying to play they dont. Is there a way to get the Youtube trailer to play using the Youtube addon.

Thanks for the log, first one I've seen where that has happened.. I'll have to do a little debugging to see how that None is falling thru, it should be getting picked up..
Reply
k_zeon Wrote:these are wrong. does anyone know what should be passed if nothing is found

if infolabels['rating'] is None:
infolabels['rating']=float(0) <<< wrong

if infolabels['duration'] is None:
infolabels['duration']=int(0) wrong

What happens when you pass in those values? Do you see 0's in xbmc?

I would hope it would just not display them.. sort of like a i' value > 0' then display type of check
Reply
  • 1
  • 5
  • 6
  • 7(current)
  • 8
  • 9
  • 11

Logout Mark Read Team Forum Stats Members Help
script.module.metautils dev2