Skip to content
Bruno Passeri edited this page Mar 2, 2018 · 11 revisions

This fork hosted the work aimed at building primevideo.com support for Sandmann79's Kodi plugin Amazon VOD. Has since then been merged in the main repository and now it's being used as a personal fork.

Original issue #22.

Installation

Note: the code has since been merged to Sandmann79's repo, you don't really need to do this unless you want to use my personal fork for some nightly build or the like.

With the original Sandmann79's Amazon VOD installed in Kodi (procedure described in his README), you can copy the new files over %AppData%\Kodi\addons\plugin.video.amazon-test (windows) or ~/.kodi/addons/plugin.video.amazon-test (linux).

New options

In order to support primevideo.com, a few changes had to be made to the codebase. After selecting Other (primevideo.com) as a country, you will have to select the proper area, from the four available: ROE_EU; ROW_EU; ROW_FE; ROW_NA. The last two are for asian countries and north american countries (possibly south american too?). I'm not too sure of the first two though, I only know that Italy (and Spain?) are in the ROE_EU area, you'll have to figure yours by yourself, either by fiddling with the browser's console, sniffing the traffic or by trial and error. Now obsolete since the introduction of the auto detection.

newoption

Note: unless you're sniffing the traffic for debugging purposes, you shouldn't disable SSL certificate validation, it's quite the security issue.

How do I find out the correct area?

The easiest method is by using a browser's console. In case of Vivaldi/Chrome/Chromium (Vivaldi is the best, btw) go to primevideo.com while being logged in, open the developer tools (CTRL+SHIFT+I) and type/copy-paste the following in the Console:

/"marketplaceId":"([^"]+)"/.exec($('#av-wconf-dv-web-player-cfg').innerHTML)[1]

As shown in the following image…

Extract the MarketplaceID via browser

… the command should show you the marketplaceId you can use to retrieve the area name from the following table:

Area marketplaceId
ROE_EU A3K6Y4MI8GDYMT
ROW_EU A2MFUE2XK8ZSSY
ROW_FE A15PK738MTQHSO
ROE_NA ART4WZ8MWBX2Y

If you don't want to do it in a browser and want to know how to do it with packet sniffing, in short: after you successfully login to primevideo.com you will have a number of connections to different websites. The easiest to check is fls-<something>.amazon.com, where you can find a number of GET and POST request. You want to look for the marketplace name and/or the marketplaceId. You can find the guide I previously wrote right here.

A virus?

The original addon by Sandmann has the file plugin.video.amazon-test/tools/userinput.exe, which contains AutoHotKey code which triggers some antivirus. Its original purpose is to switch between browser modes and to input age restriction PINs, but it's perfectly safe to remove it and never use its functionalities. It should be now in part obsolete anyway, with Kodi's Adaptive InputStream mode (for Kodi 18+).