Kodi Community Forum

Full Version: script.module.urlresolver development
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Sorry for being absent, but some one at the company decided that "sure we can build a fully redundant 2-factor authentication solution with fail-over between Europe, US, and Asia, and we can do it within a month. Unfortunately the software that was decided upon did not support "virtualization" and no one had taken into account the added security that must be in place for such a service, so I have been working between 50 and 70 hours a week since I disappeared, and I don't see much (if any) time to work on the resolver this year or Q1 next year.



Eldorado Wrote:Well I took a look in Dragonwin's context menu stuff, and I have questions.. hopefully he shows up again!

I'm probably not going to be able to explain this properly.. but I'll give it a go Smile

In his helper function used to create a contextmenu list object, what is done limits what kind of menu items you can create, I'm also confused on the purpose of 'newlist'

If newlist=True then you are creating a menu item with a function of 'XBMC.Container.Update' ... I'm not sure what this does or the use, I assumed it refreshed your current list (?)

If newlist=False then you create one with a xbmc.RunPlugin which so far for me is the most common type I've been using... eg. calling mine or another addon with a set of query strings (see my test meta addon how I do meta refresh and watched status)

Going in I would have assumed that newlist meant that the menu items will replace the standard menu items xbmc gives... but doesn't seem to be the case and I don't see a way in his code to turn that option on - very good chance that I'm missing something Smile


Favorite branch:
This was originally thought of as being an easy way to add favorites / delete favorites etc, and not a full manipulation of the contextmenu. In hind sight it might have been better to have made it more flexible.

newlist definition:
This should properly have been called some thing different, now that you mention it, I can see how confusing the naming is. It's not the contextmenu list it refers to, but the items currently being shown on the xbmc screen (such as movies / songs).

True = Execute code and update the list of movies / songs shown on the screen
False = Execute code but do not update of the list shown on the page

Eldorado Wrote:To replace the context menu you do this:
Code:
listitem.addContextMenuItems(contextmenuobj, replaceItems=True)

But.. what if I want to do a different function that is not XBMC.RunPluggin or xbmc.Container.Update? Doesn't look like I can..

eg. In Icefilms to add an item to display the Info screen:
Code:
contextMenuItems.append(('Show Information', 'XBMC.Action(Info)'))

You are right, it's not possible in the current code to call other XBMC.functions than the Container.Update and XBMC.RunPlugin. For the favorites the Container.Update is used when a favorite is deleted, and RunPlugin is used when they are being added.

Eldorado Wrote:So.. it would be nice if Dragonwin could come back to help out on this, if not then I think it might be best to drop the helper function and just let a list item get passed into add_directory() and add_video_item() along with a boolean for replaceitems

Contextmenu support should be on any directory or video/music item

eg.

Code:
def add_directory(self, queries, title, img='', fanart='',
                      total_items=0, is_folder=True, contextmenuobj='', contextreplace=False):
...
...
        if contextmenuobj:
            listitem.addContextMenuItems(contextmenuobj, replaceItems=contextreplace)

Yes you are right it should be added to any directory or video/music item.

I hope this have given you some of the answers you were looking for. Again as I mentioned before this is the first time I actually have coded any thing in python, so I'm fairly sure the code can be optimized / simplified.
Ah.. I understand it now

I'm thinking for starters we should just add in the support for context menu's how I mentioned - allow them to be passed in

I'm not sure how helpful a 'helper' function could be to create the objects? Might be tough to create one that is very flexible
DragonWin Wrote:I hope this have given you some of the answers you were looking for. Again as I mentioned before this is the first time I actually have coded any thing in python, so I'm fairly sure the code can be optimized / simplified.

thanks for the explanation dragonwin - (and i hope you had fun with your authentication project Wink) sorry you are too busy to play with this stuff but i know the feeling Sad

i'll take a look this weekend and see if i can simplify and make it a bit more flexible (probably the kind of thing eldorado suggested to start with). i think then we will be close to a release!

thanks,

t0mm0
Any updates, t0mm0?

I have begun to rework my xstream plugin some weeks ago because the release of urlresolver seemed to be near. Now that it takes so long to finish urlresolver, my users lost patience and started to convert the urlresolver plugins back to xstream plugins Big Grin I love urlresolver but that's definitely a negative side effect for me.
MaxMustermann Wrote:Any updates, t0mm0?

I have begun to rework my xstream plugin some weeks ago because the release of urlresolver seemed to be near. Now that it takes so long to finish urlresolver, my users lost patience and started to convert the urlresolver plugins back to xstream plugins Big Grin I love urlresolver but that's definitely a negative side effect for me.

hi max,

sorry for the lack of progress - there is always something else to get in the way Sad

the last change that needs to be made is the context menu stuff, which should be a quick fix (and actually doesn't affect urlresolver itself anyway, just the common modules), then it is a matter of getting it in the official repo.

i should get the context menu changes done by the this weekend (unless someone sends a patch sooner Wink) after that it is a matter of whether anything needs to be done to make it ready for the official repo.

thanks,

t0mm0
Checking to see if there has been any progress made, thanks for all your work?
t0mm0 - Just sent you a pull request with the contextmenu suport
someone can help me with videobb.com
the decoded link is always empty for me..
here my short script:

import re, urllib
url = "http://videobb.com/watch_video.php?v=8FvAG6AQpHi8"
data = urllib.urlopen(url).read()
id = re.findall('"u":"(.*?)"', data)
if id:
for each in id:
print each.decode('base-64')
@dirtylion
your search result is already empty.
you should call this url:
Code:
http://videobb.com/player_control/settings.php?v=8FvAG6AQpHi8
and base64 won't be enought to get a working video link from videobb
Lynx187 Wrote:@dirtylion
your search result is already empty.
you should call this url:
Code:
http://videobb.com/player_control/settings.php?v=8FvAG6AQpHi8
and base64 won't be enought to get a working video link from videobb

thank you for your feedback.

sorry url = "http://videobb.com/watch_video.php?v=8FvAG6AQpHi8" was a typo.

i get now this as output (240p and 480p):
but this links still empty Sad

http://s287.videobb.com:80/s?v=8FvAG6AQp...550&u=&r=1
http://s287.videobb.com:80/s?v=8FvAG6AQp...550&u=&r=2

any idea why ?
Yes, this is only the first part of the link. If you use e.g. Wireshark you will see that the videolink is much longer.
A solution written in python is here: https://github.com/Lynx187/xbmc-urlresol...videobb.py
How to decrypt what i found on rapidleech.
Lynx187 Wrote:Yes, this is only the first part of the link. If you use e.g. Wireshark you will see that the videolink is much longer.
A solution written in python is here: https://github.com/Lynx187/xbmc-urlresol...videobb.py
How to decrypt what i found on rapidleech.

thanky you Big Grin
I noticed there hasn't been any activity on t0mm0's github repository for this project since November 3, so I was just wondering if this project is still active and being maintained or if it has been abandoned? I was hoping to use it for my latest project, but if it's no longer being maintained I might have to rethink that.

Thanks for any input.

Harry
Harry Muscle Wrote:I noticed there hasn't been any activity on t0mm0's github repository for this project since November 3, so I was just wondering if this project is still active and being maintained or if it has been abandoned? I was hoping to use it for my latest project, but if it's no longer being maintained I might have to rethink that.

Thanks for any input.

Harry

The common library and urlresolver are pretty much ready, if t0mm0 doesn't come back anytime soon I think it might be best that we take it upon ourselves to try and get them into the official repo so they can be used by all
Never knew this thing existed. So far I've seen couple of addon author's own implementation of such an idea. Ajay had snapvideos on his addons. Pretty sure I saw someone else's library too. I'm even working on my own implementation based on jbel's work on documentaryheaven. If I knew about this one, I wouldn't have had to.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28