Closed ruuk closed 10 years ago
You have already finish!! Shit! I'm quite lazy...don't go so speedy ;)
Just a joke... Cool, Cool, Cool works! Your project is on another world respect to mine.
Running Pushbullet from Programs will now start the interface or prompt the user to authorize if the token is not set.
Of course! Mine had not any gui ;)
I removed the code for automatically creating a device, and replaced it with my code that allows either creating a new device and choosing a name, or selecting an existing device. This gives the user more control and allows them to add multiple Kodi devices. The old method would create multiple same name devices on Pushbullet if it was run from multiple devices.
Too kindly with end user...I had leave this use case to Pushbullet site ;)
Links are now run through my code. I've only got it handling video so far. I'm going to add some settings for the user to enable what push types they want automatically displayed before adding handling for them.
ops...yeah, I have not read and I have suggested the same thing...
There is still a bit that needs cleaned up - extra strings in strings.po, the settings could be re-organized, some of the code could be simplified, for instance I could probably remove some of the functions from my util.py and use the ones in common.py and move the remaining functions there.
You are an hard worker :P Do you think that pblicent.py and pusbullet.py are not redundant in some stuff?
There are also a lot of my code that it can be re-organized and re-formated (and deleted) with yours adds.
Videos played from pushes will not currently trigger a call to sendEphemeral() because they don't have a title like the youtube plugin supplied. I think I can fix this by using xbmc.Player().play() and passing in a ListItem with the title and other info.
I already trigger this event on https://github.com/elbowz/xbmc.service.pushbullet/blob/master/service.py#L221 don't worry...I hope this works without others mod.
I don't think I broke any of your code, but I haven't tested any of the stuff that didn't affect the code I added.
Seems works like a charm...but I have to do a full test and I have not created a test unit ( it's not in my capabilities).
What don't works anymore is the action on pushes dismission, but only on android (on chrome works). I think that Pushbullet team have done some change. Ephemeral pushes are quite beta :(
And now, a couple of questions:
There are some issues on my project...when the merge will be ended, I'm sure you'll be able to do where I have failed ;)
Do you think that pblicent.py and pusbullet.py are not redundant in some stuff?
Yeah. I didn't try very hard to remove redundancies yet. I just wanted to get everything working together first and then move on to cleaning up that sort of stuff. It also gave me a chance to get a feeling for how your code is organized an works before I start messing with it :)
Videos played from pushes will not currently trigger a call to sendEphemeral() because they don't have a title like the youtube plugin supplied. I think I can fix this by using xbmc.Player().play() and passing in a ListItem with the title and other info.
I already trigger this event on https://github.com/elbowz/xbmc.service.pushbullet/blob/master/service.py#L221 don't worry...I hope this works without others mod.
Actually I turns out I misread some code and it seems that sendEphemeral() does not work reliably which helped confuse me. In any case, I added the xbmc.Player().play() code to add video information so that when it does work it will have the description and thumbnails and such.
In settings there are Authorize and Access token, can I use both how I prefer? What I mean is that I can use directly access token without authorize?
Yes. It doesn't matter if the token was added via OAuth or taken from Pusbullet settings and entered manually, as long as it is valid.
Always under settings/interface: "Force Specific Device Pushes To View On Start" I think it's very cool option, but it should be more explained...if you change this option my part of add-on continue to view the pushes for selected device in Authorization.
I see what you mean. I'll see what I can do to make it clearer.
this question it's not related to add-on. In development/debugging phase , each time you change the python code do you have to restart xbmc? disable/enable add-on? It's quite annoying....
Only for service addons, although it is possible to edit the keymap and have it call some code to toggle the addon enabled/disabled.
Obviously, your are more better then my...and I'll learn a lot from your code...thanks in advance :)
Well, It's possible I know a few more things about programming addons on XBMC/Kodi because I have been doing it for so many years, but your code is very readable and I actually learned a few things while combining the addons. Also your websocket stuff is much more elegant than mine was.
Great I already love this collaboration! :+1:
I can merge your pull request when you want...You should only change the version number and the path on pushhandler.py and maps.py.
For what I have understood I can't change your pull request, is it right? I should pull, change and push but I don't think It's the correct procedure.
The rest can be adjusted in the future...
Now, do you think this add-on as is, can it be given to the final users? We could use them for testing/debugging purpose and suggestions...too early?
For me the only problem is the script.module.oauth.helper-0.0.7.zip...
Ciao!
p.s. Could you do me a favor? can you delete the character "s" at the end of this line https://github.com/elbowz/xbmc.service.pushbullet/blob/master/lib/common.py#L37 (opsss...)
I fixed all the stuff you mentioned, plus I added the handling for all push types as well as settings for that. I also fixed some other things I noticed while testing. I'm pretty happy with things so far.
I squashed the commits so all the changes are together now. Take a look and let me know if there are any issues remaining. I'm not going to change anything else until after we've released what we have.
Now, do you think this add-on as is, can it be given to the final users? We could use them for testing/debugging purpose and suggestions...too early?
I think this would be fine. I can post this on my private repository so people can easily install it. I haven't yet because some people may have my repository installed and already be running your addon and it would automatically update it. Installing from here will also install the OAuth module.
No matter what, I can get the OAuth module pushed to the official repository so it's ready when we want to release the addon there.
For what I have understood I can't change your pull request, is it right? I should pull, change and push but I don't think It's the correct procedure.
That sounds correct. When you think everything is ok, click that 'Merge pull request' button and it will merge into your repository. You will then have to pull the changes in locally. You can actually edit before you merge my request, but then you might have to deal with merge conflicts (which isn't that big of a deal). In any case, once it's merged and you've pulled it, you can edit and push commits as normal.
It would probably be good if you could test it before we let the users at it, especially the stuff dealing with your code because you know how all that works.
For me the only problem is the script.module.oauth.helper-0.0.7.zip...
Do you mean that its not on the official repository or you were not able to install it manually?
For me the only problem is the script.module.oauth.helper-0.0.7.zip...
Do you mean that its not on the official repository or you were not able to install it manually?
You have already answered: your personal repository is the solution!
Let's go!
What do you think about the forum thread...I'd like have my thread, but you are more indicated/addicted/skilled of me to "public relation", for the main reason that my english is as is (terrible)
How about we keep it in your thread, an if you want I can post updates when we do releases.
If all seems OK how about I go ahead an put it on my repository when I get home and the users can try it out.
Go ahead!
ok, start as you said...with the time we will be able to correct the workflow as we prefer
feel free (and constrained) to submit corrections, additions or whatever you want to my thread...I will edit the first post
I changed the version to 0.7.0b I figured this is a pretty big change :)
You'll notice that other than my added code, I modified very little of your code.
Some notes on my changes:
Running Pushbullet from Programs will now start the interface or prompt the user to authorize if the token is not set.
I removed the code for automatically creating a device, and replaced it with my code that allows either creating a new device and choosing a name, or selecting an existing device. This gives the user more control and allows them to add multiple Kodi devices. The old method would create multiple same name devices on Pushbullet if it was run from multiple devices. The service code will now not run unless both the token and device iden are set.
Links are now run through my code. I've only got it handling video so far. I'm going to add some settings for the user to enable what push types they want automatically displayed before adding handling for them.
There is still a bit that needs cleaned up - extra strings in strings.po, the settings could be re-organized, some of the code could be simplified, for instance I could probably remove some of the functions from my util.py and use the ones in common.py and move the remaining functions there.
Videos played from pushes will not currently trigger a call to sendEphemeral() because they don't have a title like the youtube plugin supplied. I think I can fix this by using xbmc.Player().play() and passing in a ListItem with the title and other info.
I don't think I broke any of your code, but I haven't tested any of the stuff that didn't affect the code I added.
Below are links to module dependencies that you need installed. The script.module.oauth.helper module isn't in the official repository yet so I'll need to add it before we release the combined version.
http://mirrors.xbmc.org/addons/frodo/script.module.requests/script.module.requests-2.3.0.zip http://mirrors.xbmc.org/addons/gotham/script.module.youtube.dl/script.module.youtube.dl-14.925.0.zip https://ruuks-repo.googlecode.com/svn/trunk/repo/script.module.oauth.helper/script.module.oauth.helper-0.0.7.zip