-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to api v2 #134
Migrate to api v2 #134
Conversation
1. Move base url and api base into own module 2. Use new api base where applicable
1. Add login settings 2. Add login/logout functions 3. Add automatic (re)login after forbidden responses
…derfulsubs into migrate-to-api-v2
Wow, this looks like a lot of work! Thanks for all this @nalch. I think this official WS add-on could use a cleanup in some places. |
|
Just tried this, and it's not working. This said. It would seem like the entire WonderfulSubs site is um dead. Going there points you to use the 'beta.WonderfulSubs.com' location. That on first inspection looks more promising. But, nothing seems to be quite baked there as well. Hopefully these issues will be resolved soon. But, I got a feeling things are staying down again for a while T_T But, I thank the Developers use of their time. And, having no intentions of disrespecting it either. Even if nothing much has changed. But, as stated, I believe these troubles are all on the other side of the ether right now. |
That is weird. Just watched a bit with the new version. |
Awsome work @nalch thanks alot for your hard work! |
is there away of getting the plugin to work on the firestick? |
I haven't used a Fire Device in some time. So I might be out of touch. But, assuming things haven't changed much. You should be a side / down load(er), from the Amazon Appstore. That you will endup pluging the URL to Kodi into. Which will allow you to download, and install it. Its a shame this still has to be said in 2020. But, Google really is your best Friend in such matters, use him. |
That isn’t the issue I am having I am having issues with the videos not working as log shows
From: Ichijoe2112 <notifications@github.com>
Sent: 23 March 2020 14:11
To: DxCx/plugin.video.wonderfulsubs <plugin.video.wonderfulsubs@noreply.github.com>
Cc: NerdNational <flimz13@hotmail.co.uk>; Comment <comment@noreply.github.com>
Subject: Re: [DxCx/plugin.video.wonderfulsubs] Migrate to api v2 (#134)
I haven't used a Fire Device in some time. So I might be out of touch. But, assuming things haven't changed much. You should be a side / down load(er), from the Amazon Appstore. That you will endup pluging the URL to Kodi into. Which will allow you to download, and install it. Its a shame this still has to be said in 2020. But, Google really is your best Friend in such matters, use him.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALESW7BUYCURZ6ED2AAH7V3RI5UXFANCNFSM4LQ66UDA>.
|
@NerdNational are you able to watch it on the website? because some old / obscure shows simply don't have any working sources anymore. If what you're trying to watch doesn't have the CR server then I wouldn't put much hope into it. |
|
Yup I can watch it on the site with no issues I cannot even load the category
From: doko-desuka <notifications@github.com>
Sent: 23 March 2020 14:18
To: DxCx/plugin.video.wonderfulsubs <plugin.video.wonderfulsubs@noreply.github.com>
Cc: NerdNational <flimz13@hotmail.co.uk>; Mention <mention@noreply.github.com>
Subject: Re: [DxCx/plugin.video.wonderfulsubs] Migrate to api v2 (#134)
@NerdNational<https://github.com/NerdNational> are you able to watch it on the website? because some old / obscure shows simply don't have any working sources anymore.
They still reference Mangostream / RapidVideo, video hosters that don't exist anymore.
If what you're trying to watch doesn't have the CR server then I wouldn't put much hope into it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALESW7E7WB4TLI4UCMTWPKTRI5VP7ANCNFSM4LQ66UDA>.
|
Ok I like to think I'm on top of things. But, I'm willing to admit stupidity on my part. The Zip Files as given... Do I need to treat these is any other special way, other then the usual method of 'installing as zip file' (i.e. System -> Settings -> Add-ons -> Install from zip file)? I was also trying to access the Site from my Tablet, as I was requested to log back into my old account. Which was Not workong for me. Henne the Beta Website which did allow me to create a working account. Which this Add-on seems to also accept. No more nagging about needing to log in. But, (and, it may be a tablet thing), but, nothing was apparently working on the actual website over Crome either. |
???
From: doko-desuka <notifications@github.com>
Sent: 23 March 2020 14:18
To: DxCx/plugin.video.wonderfulsubs <plugin.video.wonderfulsubs@noreply.github.com>
Cc: NerdNational <flimz13@hotmail.co.uk>; Mention <mention@noreply.github.com>
Subject: Re: [DxCx/plugin.video.wonderfulsubs] Migrate to api v2 (#134)
* Streamango, not Mangostream lol
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALESW7GR5APZS3E6XAZD5DLRI5VRTANCNFSM4LQ66UDA>.
|
Same for me
From: Ichijoe2112 <notifications@github.com>
Sent: 23 March 2020 14:26
To: DxCx/plugin.video.wonderfulsubs <plugin.video.wonderfulsubs@noreply.github.com>
Cc: NerdNational <flimz13@hotmail.co.uk>; Mention <mention@noreply.github.com>
Subject: Re: [DxCx/plugin.video.wonderfulsubs] Migrate to api v2 (#134)
Just tried this, and it's not working. This said. It would seem like the entire WonderfulSubs site is um dead. Going there points you to use the 'beta.WonderfulSubs.com' location. That on first inspection looks more promising. But, nothing seems to be quite baked there as well. Hopefully these issues will be resolved soon. But, I got a feeling things are staying down again for a while T_T
But, I thank the Developers use of their time. And, having no intentions of disrespecting it either. Even if nothing much has changed. But, as stated, I believe these troubles are all on the other side of the ether right now.
That is weird. Just watched a bit with the new version.
The pull request version uses the beta version of the site (or more precisely api version v2), so that shouldn't be a problem. If you can upload the kodi log, I'll have a look, what could have gone wrong.
Ok I like to think I'm on top of things. But, I'm willing to admit stupidity on my part. The Zip Files as given... Do I need to treat these is any other special way, other then the usual method of 'installing as zip file' (i.e. System -> Settings -> Add-ons -> Install from zip file)?
Because this is how I did it, on my Shield TV running Kodi v18.6.2
I was also trying to access the Site from my Tablet, as I was requested to log back into my old account. Which was Not workong for me. Henne the Beta Website which did allow me to create a working account. Which this Add-on seems to also accept. No more nagging about needing to log in. But, (and, it may be a tablet thing), but, nothing was apparently working on the actual website over Crome either.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALESW7A2FJSRQZAWVDNLOKDRI5WQTANCNFSM4LQ66UDA>.
|
I have no idea what that means tbh XD
From: doko-desuka <notifications@github.com>
Sent: 23 March 2020 14:18
To: DxCx/plugin.video.wonderfulsubs <plugin.video.wonderfulsubs@noreply.github.com>
Cc: NerdNational <flimz13@hotmail.co.uk>; Mention <mention@noreply.github.com>
Subject: Re: [DxCx/plugin.video.wonderfulsubs] Migrate to api v2 (#134)
* Streamango, not Mangostream lol
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#134 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALESW7GR5APZS3E6XAZD5DLRI5VRTANCNFSM4LQ66UDA>.
|
Ok Tried somethings differently, and have since found some success. My main point of failure is in using 'Latest'. As per my want, if I instead look into the 'Airing' channel. Things begin to work. But, I'm to lasy to read subs, and want to watch the dubbed stuff. And, that may well be all still hit, and miss at this point. As I was trying to start a dubbed ep of new LotGH on my Samsung Tablet last night, and the Site was clearly not having any of it. |
Can you test it with this add-on? https://github.com/doko-desuka/plugin.video.wsbeta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, Thanks alot!
I havnt tried it yet but ill defently do after next CR cycle
@@ -155,6 +157,10 @@ def __send_request(session, url, data=None, set_request=None, head=False): | |||
'allow_redirects': True, | |||
} | |||
|
|||
token = control.getSetting('login.token') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the seperation between http and control (you may add token throught api/self instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure, where to put it. Do you mean to pass it from WonderfulSubsBrowser into the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, token is generic to http, control isnt
return response["json"] | ||
if self._response_forbidden(response) and reauth: | ||
login() | ||
return self._json_request(url, data, reauth=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont you need to just tell xbmc to referesh?
Also, i think there was another place which tried to handle relogin..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My knowledge about xmbc is not sufficient for that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill need to referesh my memory but i think there is a function to halt render and just referesh the same addon url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
II was exploring today, on another issue, and came across: Kodi Documentation website [ https://codedocs.xyz/AlwinEsch/kodi/index.html ]. It appears to be for v19.0, so I do not know if you can find something useful here. nalch, I thought this might help.
Also I
tried your version yesterday and watched 22/7 sub [from Currently Airing]. I did not get any subs, on screen. I reviewed the log, and found WS could not find sub. I apologize, but I did not copy the segment of the log referencing this issue... Sorry, just thought I would mention this.
I really appreciate all you are doing!
@@ -5,6 +5,13 @@ | |||
<setting id="reverseorder" label="40002" type="labelenum" values="Ascending|Descending" default="Descending"/> | |||
<setting id="searchhistory" label="40003" type="labelenum" values="Yes|No" default="Yes"/> | |||
|
|||
<setting type="lsep" label="Login"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So looks like we need to remove wonderful subs from the playlist flavor (as everone is logged in by default) and handle different flavor only if set..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that some changes leaked from this commit into previous one, like strings and forbiden/use token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like you can browse some lists without being logged in, so not sure, if we want to remove the watchlist flavor. Probably a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need it to play? What gives browse without play?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I usually just log in when I have to, but I'll try to put it on load.
@@ -1,11 +1,11 @@ | |||
import itertools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor pycodestyle fixes
- while i am in favor of using tooling i think that commit alone deserves its own PR.
Also, if using such tool, the configuration file should be shared in the repo (to make sure everyone is aligned), so please add such file to git (tox.ini?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, was conflicted myself, but those are just a subset of the pycodestyle rules my IDE showed :/ The inner monk wanted the empty lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im perfectly fine with your inner monk, it just make sense, i just want the config to be shared so other monks woth get nuts ;)
4db4c04
to
478428e
Compare
478428e
to
1e03664
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, if you please can rebase and squash properly so i can use the commits as is and not squash all togather
1. Move _response_forbidden into subs browser 2. Remove constants import from embed_extractor
Not sure, what you mean with that. I usually have the commits separate for easier reviewing and then squash them when merging. What do you prefer to do? |
Everything is reviewed and can be prepared for a merge ;) |
Is the upcoming new version still compatible with Kodi 17.6? I am using RecalBox 6.1.1 and unfortunately, their Kodi version is always way older than the current Kodi release. I much prefer RecalBox to RetroPie and even though Kodi introduced RetroPlayer in version 18, it's far from great, the input lag alone is horrendous. Maybe Kodi 19 or 20 will be better but so far, RecalBox it is, which unfortunately means Kodi 17.6 for the foreseeable future. |
@nalch should i expect another drop soon? Or do you want me to take it from this point to merge? I think that espeically now (covid-19) people would need this plugin even more |
Hey, I'm probably not able to add something until late next week so feel free to chime in :) |
please open a PR with pycodestyle fixes (including its config) |
fixes #127, fixes #128, fixes #131, fixes #132, fixes #133