XLordKX / kodi

kodi plugins & addons
211 stars 80 forks source link

Add full interface for non-prime users #29

Closed kharts closed 8 years ago

kharts commented 8 years ago

Hi! I don't have Amazon Prime account (only regular Amazon), and I have some owned videos in My Watchlist. I'd like to see them with plugin, but when I login I see only Free Pilot Episodes. I added an ability for non-prime users to see full interface of plugin, including My Watchlist. I would be glad if my modest work has become useful for someone. Thanks in advance!

kharts commented 8 years ago

I also fixed a debug logging issue: as I understand, the only way to get debug logs from plugin is to set variable NODEBUG to True. In that case all debug content will be put to log file, regardless of whether the user has turned the debug mode or not (using print). I think it is not quite well, so I changed debug logging mechanism to using standard xbmc.log() function. As I see, it has been used before, but perhaps dropped after transition to Unicode. I fixed this function - now it will work with Unicode and regular strings.

kharts commented 8 years ago

I also added the ability to show paid videos in search results. Next step - buying videos directly from plugin (wish me luck).

claell commented 8 years ago

Thanks for your effort. I hope it can be used, since Amazon dropped support for Google TV by today :(

kharts commented 8 years ago

At the time of writing the plugin is still working for me. The only features, that have been broken:

BenjaminHae commented 8 years ago

Watchlist throws an error. Clicking a tv-show -> error

08:33:17 T:2592 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python >callback/script returned the following error<--

  • NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <class 'urllib2.HTTPError'> Error Contents: HTTP Error 404: Not Found Traceback (most recent call last): File >"C:\Users\Benjamin\AppData\Roaming\Kodi\addons\plugin.video.prime_instant\default.py", line 1439, in listSeasons(name, url, thumb, showAll=showAllSeasons) File "C:\Users\Benjamin\AppData\Roaming\Kodi\addons\plugin.video.prime_instant\default.py", line 577, in listSeasons content = getUnicodePage(urlMain+"/gp/product/"+seriesID) File "C:\Users\Benjamin\AppData\Roaming\Kodi\addons\plugin.video.prime_instant\default.py", line 993, in getUnicodePage req = opener.open(url) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 410, in open response = meth(req, response) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 442, in error result = self._call_chain(_args) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain result = func(_args) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 629, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 410, in open response = meth(req, response) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 448, in error return self._call_chain(_args) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 382, in _call_chain result = func(_args) File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 404: Not Found -->End of Python script error report<--
TobiMob commented 8 years ago

Works for me (Windows 8.1). And also fixes the rather critical issue #30 (user-agent blocked by Amazon), which makes the Addon unusable. Thumbs up for this :+1:

Edit: Also works on my Pi2 (Isengard DE)