XBMC Community Forum
script.module.urlresolver development - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: script.module.urlresolver development (/showthread.php?tid=105707)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


- k_zeon - 2011-10-04 14:12

t0mm0 Wrote:i've already discussed in eldorados thread that this will be fixed. i'm afraid i'm really busy at the moment and might not get to do much for a couple of weeks (see the post above yours)

thanks,

t0mm0

many thanks


- Eldorado - 2011-10-04 15:07

k_zeon Wrote:Hi t0mm0

just been playing around with eldorados new metautils and he said that at present i cannot add infolabels to directories but only on addvideoitem

just wondered if this is something that will be implemented and if poss a timescale.

many thanks for all your hard work

Look back one page in this thread where I brought it up Smile

You can probably make a quick mod on your own copy to get it to work for now


- Eldorado - 2011-10-20 15:52

k_zeon - the quick fix in t0mm0's common library to get the infolabels to work:

Open up addon.py and make the following change:

Code:
def unescape(self, text):
        '''
        Decodes HTML entities in a string.
        
        You can add more entities to the ``rep`` dictionary.
        
        Args:
            text (str): String to be cleaned.
            
        Returns:
            Cleaned string.
        '''
        try:
            text = self.decode(text)
            rep = {'&lt;': '<',
                   '&gt;': '>',
                   '&quot': '"',
                   '&rsquo;': '\'',
                   '&acute;': '\'',
                   }
            for s, r in rep.items():
                text = text.replace(s, r)
            # this has to be last:
            text = text.replace("&amp;", "&")
[b]        except TypeError:
            pass[/b]
        return text

Currently it only allows strings to be passed, this will catch and let pass any non-strings


- k_zeon - 2011-10-20 20:48

Hey Eldorado

Just added the fix to t0mm0's common module and then run ProjectfreeTV and it appears to run and scrape info.
Then when i scoll through the movies , the pics change and also the background but then all of a sudden the picture does not change and then scrolling back the pics that did show do not change. It stays the same.

No errors appear so do not know reason why....

Running my addon seems fine..

Edit:
Just took out the Fanart part ( fanart=meta['backdrop_url'] ) for the menu adding function and then it works fine.

Would be good to have an option to turn fanart downloading off.


- Eldorado - 2011-10-20 21:37

k_zeon Wrote:Hey Eldorado

Just added the fix to t0mm0's common module and then run ProjectfreeTV and it appears to run and scrape info.
Then when i scoll through the movies , the pics change and also the background but then all of a sudden the picture does not change and then scrolling back the pics that did show do not change. It stays the same.

No errors appear so do not know reason why....

Running my addon seems fine..

Edit:
Just took out the Fanart part ( fanart=meta['backdrop_url'] ) for the menu adding function and then it works fine.

Would be good to have an option to turn fanart downloading off.

She's just a testing branch..Smile

It works fine in Windows, but I assumed ATV would have a tough time.. once I finish metahandlers I'll probably update Project Free TV


- k_zeon - 2011-10-20 21:46

I wonder wether the fanart on some are way too big and slow/break the menu's.
As i said it started fine, thumbnails and fanart worked, go down 8 or 9 movies items then the thumbnail does not change and neither does the fanart.
Go back up the list and nothing changes.


- Eldorado - 2011-10-20 22:45

They aren't very big really, maybe 100k-200k

There could be just a big lag in the time xbmc is taking to download and cache them, ATV might not be able to keep up


- t0mm0 - 2011-10-27 15:48

sorry for my lack of work recently, my excuse is a combination of busy-ness (work and non-work) not feeling well and my phone deciding not to alert me of new emails to my dev account Sad

anyway, i'll get back to work again now honest Nod and try and get a urlresolver release done ASAP Wink

t0mm0


- k_zeon - 2011-10-27 20:04

glad your back and feeling better


- Eldorado - 2011-10-27 21:15

t0mm0 Wrote:sorry for my lack of work recently, my excuse is a combination of busy-ness (work and non-work) not feeling well and my phone deciding not to alert me of new emails to my dev account Sad

anyway, i'll get back to work again now honest Nod and try and get a urlresolver release done ASAP Wink

t0mm0

I have feature requests for your common library Smile


- t0mm0 - 2011-10-30 11:13

Eldorado Wrote:I have feature requests for your common library Smile

cool - request away!

i know already requested is to make adding directories and items take the same arguments....

t0mm0


- t0mm0 - 2011-10-30 16:26

hi everyone,

done a fair amount of work on this so far today.

updated all the docs in videoid branch including plugin tutorial. (please shout if you spot errors or think it could be written better)

changed around the add_directory() stuff in t0mm0.common.addon to be closer to add_item() so that you can add infolabels to directories. this will break existing addons as the title argument has changed to an infolabels dict as per add_item() (you need to change the directory titles to {'title': 'mytitle'} and any other infolabels you want in there too). i may have done something really silly here so your comments are welcome!

i have (at last!) merged videoid branch back into master so development is now back on the master branch.

i have rebuilt and updated the online docs.

next job is to start working through the various pull requests i have ignored for too long.

t0mm0.


- Eldorado - 2011-10-30 17:34

t0mm0 Wrote:cool - request away!

i know already requested is to make adding directories and items take the same arguments....

t0mm0

Context menu item support is my next one, I saw the chat between you and Dragonwin on it but wasn't sure if any code was done to handle it.. ?


- t0mm0 - 2011-10-30 17:39

Eldorado Wrote:Context menu item support is my next one, I saw the chat between you and Dragonwin on it but wasn't sure if any code was done to handle it.. ?

Dragonwin's code is here

i haven't looked at it much yet (just getting through the pull requests at the moment) - let me know if that code does what you need. (maybe you could specify what you want it to do so i don't break it if i change that code?)

also is the add_directory() stuff okay for you now?

thanks,

t0mm0


- Eldorado - 2011-10-30 18:39

t0mm0 Wrote:Dragonwin's code is here

i haven't looked at it much yet (just getting through the pull requests at the moment) - let me know if that code does what you need. (maybe you could specify what you want it to do so i don't break it if i change that code?)

also is the add_directory() stuff okay for you now?

thanks,

t0mm0

k_zeon might be able to comment best on the add_directory with infolabels, will take me a couple days to get there again Smile

Did you also add the except TypeError in your one method which was throwing an error if an infolabel was not a string? (can't remember the exact method right now)

I think I did basically the same as Dragonwin did there minus the extra helper function to create the contextmenu list, I'll give it a try and see how it goes for me