Sandmann79 / xbmc

Prime Video Addon for Kodi Media Center
https://forum.kodi.tv/showthread.php?tid=349255
GNU General Public License v3.0
753 stars 191 forks source link

Cant search or access to listed movies and TV shows, only featured #656

Closed MrCoolAndroid closed 1 year ago

MrCoolAndroid commented 1 year ago

Addon used

Account type

System Setup (please provide the following information):

Upload Logs

https://pastebin.com/Gh8yqQhB

Describe the bug

Whenever i try to search something or see listed movies or TV shows like from categories it always throws an error, but when you see featured movies it works normally and you can watch normally, for the debug log i tried searching, it throws the same error for listed movies and TV Shows, something like this: screenshot00000 Like if it cant access to something from the API, weird

max3163 commented 1 year ago

Same issue since yesterday :

2022-10-30 15:46:24.486 T:16259 ERROR : [Amazon VOD] Error reason: 403 error (NoRetries)
2022-10-30 15:46:24.500 T:16259 ERROR : [Amazon VOD] Unable to fetch the url: /search/ref=atv_me_kid_c_hahmlw_4_smr?queryToken=XXX 2022-10-30 15:46:24.519 T:16259 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

MrCoolAndroid commented 1 year ago

I just installed the add-on yesterday, was it working normally before?

ramemat commented 1 year ago

Same issue for me. Kodi / windows 10

MrCoolAndroid commented 1 year ago

Yeah I think it's something related with the API

MrCoolAndroid commented 1 year ago

@ramemat @max3163 Was the add-on working before? I might try an older version to see what happens

max3163 commented 1 year ago

@MrCoolAndroid : yes worked like a charm before.

ramemat commented 1 year ago

Worked fine before!

MrCoolAndroid commented 1 year ago

@Sandmann79 it's possible to check this?

TheRealBadRobot commented 1 year ago

Same issue on Kodi Matrix, Ubuntu 20.10

Necdilzor commented 1 year ago

Still happening on version 0.9.5 of the addon as of today. It was working fine before and it stopped working abruptly

MrCoolAndroid commented 1 year ago

I just hope that some developer will see this

max3163 commented 1 year ago

No response, no commit since many months... I think the repo is dead...

MrCoolAndroid commented 1 year ago

Yeah, that's really sad, my workaround on this was to add Movies and TV shows that i wanted to see to my Watchlist, it's the only way to watch them on Kodi

Paco8 commented 1 year ago

I think they changed the "search" in the api to "searchDefault" : api/searchDefault?query token...

MrCoolAndroid commented 1 year ago

Yeah probably, you should make a pull request but i don't know if they are going to merge it

Varstahl commented 1 year ago

I mean, I'm reading, I just been having work and health problems, and the question would be if it's searchDefault for all regions or just the usual suspect, but yeah…

MrCoolAndroid commented 1 year ago

I mean, I'm reading, I just been having work and health problems, and the question would be if it's searchDefault for all regions or just the usual suspect, but yeah…

Ooh that's okay, it's just that there hasn't been any activity for a while

Varstahl commented 1 year ago

Yeah, last time I managed to get some work done was in August. I have a very tiny kid, so most of my free time has been eaten up by playing with her instead of code, and by the viruses and bacteria she brings home. Tiny adorable petri dishes with legs… :)

MrCoolAndroid commented 1 year ago

Yeah, last time I managed to get some work done was in August. I have a very tiny kid, so most of my free time has been eaten up by playing with her instead of code, and by the viruses and bacteria she brings home. Tiny adorable petri dishes with legs… :)

Awww, well don't worry about us, whenever you have free time! In the meantime we have the watchlist workaround

Ronny-nerd commented 1 year ago

Problem solved

https://www.kodinerds.net/index.php/Thread/44211-Release-Amazon-Prime-Instant-Video/?postID=702438#post702438

MrCoolAndroid commented 1 year ago

Problem solved

https://www.kodinerds.net/index.php/Thread/44211-Release-Amazon-Prime-Instant-Video/?postID=702438#post702438

Ooh look at that, @Varstahl it's possible to pull request this?

fpusersuggest commented 1 year ago

what's the solution ? Because I followed that link and I substituted the line 947 in .kodi/addons/plugin.video.amazon-test/resources/lib/network.py I substituted this line: if url.startswith('/search/') or url.startswith('/gp/video/search/'): with the following: if url.startswith('/search/') or url.startswith('/gp/video/searchDefault/'):

but, it didnt' work.

Varstahl commented 1 year ago

Ooh look at that, @Varstahl it's possible to pull request this?

I guess so, I'll try to do it tomorrow (here's hoping I remember to)

I substituted this line: but, it didnt' work.

Did you restart Kodi? In case the addon was not refreshed?

MrCoolAndroid commented 1 year ago

I guess so, I'll try to do it tomorrow (here's hoping I remember to)

Alright! Whenever you can

MrCoolAndroid commented 1 year ago

I might try this solution too, will let know if it works

max3163 commented 1 year ago

I try the change but... without success ! ... too bad !

fpusersuggest commented 1 year ago

Ooh look at that, @Varstahl it's possible to pull request this?

Did you restart Kodi? In case the addon was not refreshed?

yep, I rebooted and also removed pycache

MrCoolAndroid commented 1 year ago

@fpusersuggest what's your Amazon account type?

fpusersuggest commented 1 year ago

to be honest I don't know what's mean "amazon account type". I have just a prime account. Primevideo.com works fine on browser.

MrCoolAndroid commented 1 year ago

to be honest I don't know what's mean "amazon account type". I have just a prime account. Primevideo.com works fine on browser.

I don't know if I'm correct but i think it's the region, and maybe the API URL is different, just like @Varstahl said

... and the question would be if it's searchDefault for all regions or just the usual suspect, but yeah…

Varstahl commented 1 year ago

Applied the "search fix", but it only works on some regions apparently (because on mine it doesn't affect anything (yet?)), but I'm on the case.

Edit: I got a working prototype, figuring out how to to implement the fix and make it work for everyone is going to be a little tougher.

Varstahl commented 1 year ago

I've just released 0.9.6, this should hopefully fix the issues for every region (hopefully without breaking anything for other regions). Can you guys give it a round to see if the issues are solved?

max3163 commented 1 year ago

I just tested the 0.9.6 version and it works like a charm !!!

Perfect and really thanks @Varstahl for your work !

MrCoolAndroid commented 1 year ago

Nice! I guess if it works for everyone we could close this issue

gst-kodi commented 1 year ago

hello i am gst. with a german amazon account this does not work. ERROR: [Amazon VOD] Error reason: 403 error (NoRetries) 2022-11-28 12:35:40.705 T:139627692283648 ERROR: [Amazon VOD] Unable to fetch the url: /gp/video/search/ref=atv_hm_hom_1_c_ozq...

my quick fix from yesterday didn't show the next page, but that works now when in line 954 (network.py) insert

newPath = '/gp/video' + up.path.replace('/gp/video', '')

i hope i can help it work in all regions even though i am not a programmer

gst-kodi commented 1 year ago

forgot to say with this it works here

Varstahl commented 1 year ago

newPath = '/gp/video' + up.path.replace('/gp/video', '')

WHA— how… but… *perplexity*

gst-kodi commented 1 year ago

me too. it's a bit wrong with the regular expression operations. but i'm not that trained there

MrCoolAndroid commented 1 year ago

I will try when I get home, i guess it works for some regions, then I will try with @gst-kodi fix

Varstahl commented 1 year ago

me too. it's a bit wrong with the regular expression operations. but i'm not that trained there

It shouldn't be, no. It's just that… did they remove the API endpoint for Germany as well? But then the fix in https://github.com/Sandmann79/xbmc/issues/656#issuecomment-1328324328 shouldn't have worked, but people claim it does? Unless it didn't work for everyone in the first place, and there's another problem for Germany.

MrCoolAndroid commented 1 year ago

I wonder if it's different for all countries or regions

Varstahl commented 1 year ago

They use canary releases, and some lag behind, like India. So it goes something like this:

We thought it fixed by just using the global web APIs, but they went and changed them again.

At one point, iirc, I was supporting 6 to 8 different versions on PrimeVideo parsing alone, just to browse categories, each with their own subset of further changes. This was a thing of the past with the new JSON/WebAPI paradigm and all, but apparently not that certain anymore.

MrCoolAndroid commented 1 year ago

Damn, so much complexity

Ronny-nerd commented 1 year ago

The code changes from gst for the brand new Amazon VOD version 0.9.6+matrix.1 addon works for me in DE.

https://www.kodinerds.net/index.php/Thread/44211-Release-Amazon-Prime-Instant-Video/?pageNo=430

Just needed the changed code from StollD for the playback.py file to play Freevee movies/series.

https://github.com/Sandmann79/xbmc/pull/641

Varstahl commented 1 year ago

Fair enough, I'll make new changes, merge the FreeVee PR and then make a new release (and hear from the rest of the DE people about their Kodi breaking and I'll go cry in a corner) :D

MrCoolAndroid commented 1 year ago

Thanks a lot for your work! I will let know how it works whenever I get to try it!

Varstahl commented 1 year ago

newPath = '/gp/video' + up.path.replace('/gp/video', '')

I was on my way to upload this "fix", when I realised it does work, but for the wrong reasons. I need someone in Germany to do me a favor:

  1. open up prime video in a browser, and open developers tools (usually CTRL+SHIFT+I for Inspect)
  2. go to the network tab in the developers tools
  3. go back to the prime video page, and do a generic search, like a. This should yield a number of results, and make sure to scroll to the bottom to trigger the infiniload/infinite scrolling
  4. in the network tab you should see resource names, similar to searchDefault?startIndex=N…
  5. click on any of those, and under Headers, General, copy the Request URL

It should look something like the following: image image

Before making assumptions and introducing regressions in functionalities, I'd like for this feedback, at least I can make informed decisions.

thekswenson commented 1 year ago

This is what it looks like in France:

GET https://www.primevideo.com/region/eu/api/searchDefault?startIndex=20&phrase=a&isCrow=1&isElcano=1&useNodePlayer=1&totalItems=37762&refMarker=atv_sr_infinite_scroll&isHover2019=1&shouldShowPrimeSigns=1&searchResultsImpressionData=404|ClcKKVNlYXJjaEZsZXhEZWZhdWx0U2VhcmNoTGl2ZURlZmF1bHREZWZhdWx0EhAxOjEyNkdXSlJKVTU0QldRGhAyOkRZODMyQTcxMzlBOUE5IgZUbjc0UkESPwoGc2VhcmNoEgRmbGV4IgZjZW50ZXIqAWEyJDkzMTVjODY0LTZmZTQtNDQwNi1hNTI0LTZlOWUxNmIxYzhkMBoAIgAqADIMdmVydGljYWxMaXN0Og9BVlNlYXJjaFNlcnZpY2VCDlNlYXJjaFN0cmF0ZWd5SgpTZWFyY2hGbGV4ShRzaG93VW5kZXJFdmVyeUZpbHRlckoNZGVmYXVsdFNlYXJjaFIIZW50aXRsZWRaDTE2Njk2NzExODkxNjViEFN0YW5kYXJkQ2Fyb3VzZWxoAQ==&ie=UTF8&ref_=atv_sr_infinite_scroll

Varstahl commented 1 year ago

Thanks, but France falls under PrimeVideo itself. The only ones who'd have it kinda different would be DE/JP/UK/US, which is why I asked the info to Germans :)

MrCoolAndroid commented 1 year ago

Question @Varstahl, i tried to look for an update on Kodi but there is no new update on the repository, do i have to update it manually?