jurialmunkey / plugin.video.themoviedb.helper

GNU General Public License v3.0
204 stars 96 forks source link

[Request] Add Player Function for Amazon VOD Plugin #463

Closed DevHov closed 3 years ago

DevHov commented 3 years ago

Amazon is one of the bigger streaming services, so it wouldt be nice if the player function wouldt be added for the Amazon VOD Plugin (https://github.com/Sandmann79/xbmc). I've seen a similar request from a reddit user on the Addons4Kodi sub recently, so I might be not alone finding this useful. I tried adding it myself but I'm still coding beginner so I can't get it running.

drinfernoo commented 3 years ago

You can attempt to create a player for the add-on by following the player documentation at https://www.github.com/jurialmunkey/plugin.video.themoviedb.helper/wiki/Player-Function.

I think the main reason that nobody has ever made this player is that nobody who uses Amazon VOD has ever stepped up to make and/or test a player for it 🤷🏼‍♀️

jurialmunkey commented 3 years ago

@AnthroposGoticus - Can you please test this player file and see if it works for you? It is adapted from the Netflix player and I'm pretty sure it is working -- I've got an Amazon account so I'm able to test the search for the episode but I don't currently have Prime so I can't test playback.

File: amazon.zip

Code (for future reference)

{
    "name"              : "Amazon Prime Video",
    "plugin"            : "plugin.video.amazon-test",
    "priority"          : 100,
    "is_resolvable"     : "true",
    "assert"            : {
                            "play_movie":       ["title", "year"],
                            "play_episode":     ["showname", "season", "episode"],
                            "search_movie":     ["title"],
                            "search_episode":   ["showname"]
                          },
    "play_movie"        : [
                            "plugin://plugin.video.amazon-test/pv/search/",
                            {"keyboard": "{title}"},
                            {"label": "(?i).*{title}.*", "year": "{year}"}
                          ],
    "play_episode"      : [
                            "plugin://plugin.video.amazon-test/pv/search/",
                            {"keyboard": "{showname}"},
                            {"label": "(?i).*{showname}.*"},
                            {"season": "{season}"},
                            {"season": "{season}", "episode": "{episode}"}
                          ],
    "search_movie"      : [
                            "plugin://plugin.video.amazon-test/pv/search/",
                            {"keyboard": "{title}"}
                          ],
    "search_episode"    : [
                            "plugin://plugin.video.amazon-test/pv/search/",
                            {"keyboard": "{showname}"}
                          ]
}
DevHov commented 3 years ago

For context: my hardware/Software: CoreELEC with Kodi 19.0

Adding worked fine, also the Amazon Logo is shown, but functionality fails. I tried it with a series, where I know its available and free on Prime Video. Played fine directly in the amazon app.

Play with Amazon returns in the folowing error:

2021-03-22 00:40:12.752 T:5187     INFO <general>: Python interpreter stopped
2021-03-22 00:40:22.846 T:5029     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-22 00:40:22.849 T:5029     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-22 00:40:22.861 T:5029     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-22 00:40:22.863 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-22 00:40:22.863 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-22 00:40:26.421 T:5203     INFO <general>: initializing python engine.
2021-03-22 00:40:27.159 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Expecting value: line 1 column 1 (char 0)
2021-03-22 00:40:27.160 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.container.router - Attempting to play item
                                                   {'info': 'play', 'tmdb_type': 'tv', 'tmdb_id': '63639', 'season': '1', 'episode': '1'}
2021-03-22 00:40:27.161 T:5203    ERROR <general>: GetDirectory - Error getting /storage/.kodi/userdata/addon_data/plugin.video.themoviedb.helper/players/
2021-03-22 00:40:27.161 T:5203    ERROR <general>: GetDirectory - Error getting special://profile/addon_data/plugin.video.themoviedb.helper/players/
2021-03-22 00:40:27.454 T:5203    ERROR <general>: GetDirectory - Error getting /storage/.kodi/userdata/addon_data/plugin.video.themoviedb.helper/reconfigured_players/
2021-03-22 00:40:27.454 T:5203    ERROR <general>: GetDirectory - Error getting special://profile/addon_data/plugin.video.themoviedb.helper/reconfigured_players/
2021-03-22 00:40:27.478 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Expecting value: line 1 column 1 (char 0)
2021-03-22 00:40:28.526 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Getting KodiDB tvshow FAILED!
2021-03-22 00:40:31.181 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Getting KodiDB episode FAILED!
2021-03-22 00:40:31.187 T:5206     INFO <general>: initializing python engine.
2021-03-22 00:40:33.454 T:5206  WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2021-03-22 00:40:33.881 T:5206     INFO <general>: Skipped 1 duplicate messages..
2021-03-22 00:40:33.881 T:5206    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'pv'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in <module>
                                                       EntryPoint()
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 63, in EntryPoint
                                                       g.pv.Route(verb, path)
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/common.py", line 50, in __getattr__
                                                       def __getattr__(self, name): return self._globals[name]
                                                   KeyError: 'pv'
                                                   -->End of Python script error report<--

2021-03-22 00:40:34.497 T:5206     INFO <general>: Python interpreter stopped
2021-03-22 00:40:34.507 T:5203    ERROR <general>: GetDirectory - Error getting plugin://plugin.video.amazon-test/pv/search/
2021-03-22 00:40:34.571 T:5010     INFO <general>: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY

Search gets this error:

2021-03-22 00:42:00.406 T:5029     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-22 00:42:00.406 T:5029     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-22 00:42:00.416 T:5029     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-22 00:42:00.417 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-22 00:42:00.418 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-22 00:42:03.837 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player.players - attempt to resolve dummy file
                                                   /storage/.kodi/addons/plugin.video.themoviedb.helper//resources/dummy.mp4
2021-03-22 00:42:03.888 T:5010     INFO <general>: VideoPlayer::OpenFile: plugin://plugin.video.themoviedb.helper/?info=play&tmdb_type=tv&tmdb_id=63639&season=1&episode=1
2021-03-22 00:42:03.892 T:5212     INFO <general>: Creating InputStream
2021-03-22 00:42:03.921 T:5212     INFO <general>: Creating Demuxer
2021-03-22 00:42:04.214 T:5212     INFO <general>: Opening stream: 0 source: 256
2021-03-22 00:42:04.215 T:5212     INFO <general>: CVideoPlayerVideo::OpenStream - Creating codec: 27
2021-03-22 00:42:04.215 T:5212     INFO <general>: CBitstreamConverter::Open bitstream to annexb init
2021-03-22 00:42:04.220 T:5212     INFO <general>: DVDVideoCodecAmlogic: Opened Amlogic Codec
2021-03-22 00:42:04.220 T:5212     INFO <general>: Creating video thread
2021-03-22 00:42:04.220 T:5215     INFO <general>: running thread: video_thread
2021-03-22 00:42:04.221 T:5212     INFO <general>: Opening stream: 1 source: 256
2021-03-22 00:42:04.221 T:5212     INFO <general>: Finding audio codec for: 86018
2021-03-22 00:42:04.222 T:5212     INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2021-03-22 00:42:04.222 T:5212     INFO <general>: Creating audio thread
2021-03-22 00:42:04.223 T:5216     INFO <general>: running thread: CVideoPlayerAudio::Process()
2021-03-22 00:42:04.224 T:5215     INFO <general>: DVDVideoCodecAmlogic::AddData Open decoder: fps:30000/1001
2021-03-22 00:42:04.234 T:5216     INFO <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2021-03-22 00:42:04.236 T:5029     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-22 00:42:04.237 T:5029     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-22 00:42:04.263 T:5029     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02"
2021-03-22 00:42:04.267 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-22 00:42:04.267 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-22 00:42:04.381 T:5010     INFO <general>: Constructing CRendererAML
2021-03-22 00:42:04.394 T:5010     INFO <general>: Loading skin file: VideoFullScreen.xml, load type: KEEP_IN_MEMORY
2021-03-22 00:42:04.406 T:5010     INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 29.970, 3D: false
2021-03-22 00:42:04.407 T:5010     INFO <general>: Display resolution ADJUST : 1920x1080 @ 60.00 - Full Screen (16) (weight: -4122670530560.000)
2021-03-22 00:42:05.132 T:5010    ERROR <general>: Control 55 in window 10025 has been asked to focus, but it can't
2021-03-22 00:42:05.133 T:5010     INFO <general>: CVideoPlayer::CloseFile()
2021-03-22 00:42:05.134 T:5010     INFO <general>: VideoPlayer: waiting for threads to exit
2021-03-22 00:42:05.138 T:5212     INFO <general>: CVideoPlayer::OnExit()
2021-03-22 00:42:05.139 T:5212     INFO <general>: Closing stream player 1
2021-03-22 00:42:05.139 T:5212     INFO <general>: Waiting for audio thread to exit
2021-03-22 00:42:05.151 T:5216     INFO <general>: thread end: CVideoPlayerAudio::OnExit()
2021-03-22 00:42:05.152 T:5212     INFO <general>: Closing audio device
2021-03-22 00:42:05.161 T:5029     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-22 00:42:05.161 T:5212     INFO <general>: Deleting audio codec
2021-03-22 00:42:05.162 T:5212     INFO <general>: Closing stream player 2
2021-03-22 00:42:05.162 T:5212     INFO <general>: waiting for video thread to exit
2021-03-22 00:42:05.162 T:5215    ERROR <general>: Got MSGQ_ABORT or MSGO_IS_ERROR return true
2021-03-22 00:42:05.162 T:5215     INFO <general>: thread end: video_thread
2021-03-22 00:42:05.163 T:5212     INFO <general>: deleting video codec
2021-03-22 00:42:05.177 T:5010     INFO <general>: VideoPlayer: finished waiting
2021-03-22 00:42:05.177 T:5010     INFO <general>: CVideoPlayer::CloseFile()
2021-03-22 00:42:05.177 T:5010     INFO <general>: VideoPlayer: waiting for threads to exit
2021-03-22 00:42:05.177 T:5010     INFO <general>: VideoPlayer: finished waiting
2021-03-22 00:42:05.181 T:5222     INFO <general>: Deleting settings information for files plugin://plugin.video.themoviedb.helper/?info=play&tmdb_type=tv&tmdb_id=63639&season=1&episode=1
2021-03-22 00:42:05.355 T:5029     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-22 00:42:05.364 T:5029     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-22 00:42:05.365 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-22 00:42:05.366 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-22 00:42:08.335 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player.players -- successfully resolved dummy file
                                                   /storage/.kodi/addons/plugin.video.themoviedb.helper//resources/dummy.mp4
2021-03-22 00:42:08.335 T:5203     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player - finished executing action
                                                   Container.Update(plugin://plugin.video.amazon-test/pv/search/)
2021-03-22 00:42:08.337 T:5203     INFO <general>: CPythonInvoker(8, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): script successfully run
2021-03-22 00:42:08.337 T:5203     INFO <general>: CPythonInvoker(8, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): waiting on thread 3661619888
2021-03-22 00:42:11.135 T:5228     INFO <general>: initializing python engine.
2021-03-22 00:42:13.171 T:5228  WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2021-03-22 00:42:13.485 T:5228     INFO <general>: Skipped 1 duplicate messages..
2021-03-22 00:42:13.485 T:5228    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'KeyError'>
                                                   Error Contents: 'pv'
                                                   Traceback (most recent call last):
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/default.py", line 5, in <module>
                                                       EntryPoint()
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/startup.py", line 63, in EntryPoint
                                                       g.pv.Route(verb, path)
                                                     File "/storage/.kodi/addons/plugin.video.amazon-test/resources/lib/common.py", line 50, in __getattr__
                                                       def __getattr__(self, name): return self._globals[name]
                                                   KeyError: 'pv'
                                                   -->End of Python script error report<--

2021-03-22 00:42:13.526 T:5029     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-22 00:42:13.527 T:5029     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-22 00:42:13.539 T:5029     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-22 00:42:13.540 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-22 00:42:13.540 T:5029     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-22 00:42:14.056 T:5228     INFO <general>: Python interpreter stopped
2021-03-22 00:42:14.076 T:5225    ERROR <general>: GetDirectory - Error getting plugin://plugin.video.amazon-test/pv/search/
2021-03-22 00:42:14.105 T:5010    ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.amazon-test/pv/search/) failed
jurialmunkey commented 3 years ago

What version of the Amazon plugin are you using? Because it seems like whatever version you are using has a different search path from the one I installed.

For reference, I tested with 0.9.1+matrix.1 of plugin.video.amazon-test

jurialmunkey commented 3 years ago

In the player file can you try replacing the /pv/ parts with /amz/ and see if that works

i.e. change all these: plugin://plugin.video.amazon-test/pv/search/ to this plugin://plugin.video.amazon-test/amz/search/

It looks like the Amazon plugin switches endpoints depending on locale/region, which makes things a pain for creating a player. So for me the path uses /pv/ (Prime Video) but for you it is using /amz/ (Amazon Video).

jurialmunkey commented 3 years ago

Can you try replacing the player file with the code below? It looks like the Amazon plugin switches between a /pv/ and a /amz/ endpoint depending on the server type for each region/locale -- which is why my previous player was working for me in a pv region whilst you are likely in a region served by amz. The below player should hopefully adapt regardless of endpoint.

{
    "name"              : "Amazon Prime Video",
    "plugin"            : "plugin.video.amazon-test",
    "priority"          : 100,
    "is_resolvable"     : "true",
    "assert"            : {
                            "play_movie":       ["title", "year"],
                            "play_episode":     ["showname", "season", "episode"],
                            "search_movie":     ["title"],
                            "search_episode":   ["showname"]
                          },
    "play_movie"        : [
                            "plugin://plugin.video.amazon-test/",
                            {"file": "(?i).*/search/"},
                            {"keyboard": "{title}"},
                            {"label": "(?i).*{title}.*", "year": "{year}"}
                          ],
    "play_episode"      : [
                            "plugin://plugin.video.amazon-test/",
                            {"file": "(?i).*/search/"},
                            {"keyboard": "{showname}"},
                            {"label": "(?i).*{showname}.*"},
                            {"season": "{season}"},
                            {"season": "{season}", "episode": "{episode}"}
                          ],
    "search_movie"      : [
                            "plugin://plugin.video.amazon-test/",
                            {"file": "(?i).*/search/"},
                            {"keyboard": "{title}"}
                          ],
    "search_episode"    : [
                            "plugin://plugin.video.amazon-test/",
                            {"file": "(?i).*/search/"},
                            {"keyboard": "{showname}"}
                          ]
}
DevHov commented 3 years ago

Hey, I've got the same version as you. Can I lookup anywhere this string (plugin://plugin.video.amazon-test/pv/search/, or with /amz/) in one of the amazon plugin files? I tried search manually but I didn't found anything.

Unfortunately no success. But this time I did'nt get any error message from TMDBH itself in the gui like the last time, it simply seem to make nothing and the "choose action" window opens up again. The following logs are written: For Play:

2021-03-24 21:33:16.720 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 21:33:16.721 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 21:33:16.726 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-24 21:33:16.727 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 21:33:16.727 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-24 21:33:16.739 T:5111     INFO <general>: initializing python engine.
2021-03-24 21:33:17.353 T:5073     INFO <general>: Python interpreter stopped
2021-03-24 21:33:18.049 T:5111     INFO <general>: Skipped 1 duplicate messages..
2021-03-24 21:33:18.049 T:5111     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Expecting value: line 1 column 1 (char 0)
2021-03-24 21:33:18.050 T:5111     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.container.router - Attempting to play item
                                                   {'info': 'play', 'tmdb_type': 'tv', 'tmdb_id': '63639', 'season': '1', 'episode': '5'}
2021-03-24 21:33:18.051 T:5111    ERROR <general>: GetDirectory - Error getting /storage/.kodi/userdata/addon_data/plugin.video.themoviedb.helper/players/
2021-03-24 21:33:18.052 T:5111    ERROR <general>: GetDirectory - Error getting special://profile/addon_data/plugin.video.themoviedb.helper/players/
2021-03-24 21:33:18.238 T:5111    ERROR <general>: GetDirectory - Error getting /storage/.kodi/userdata/addon_data/plugin.video.themoviedb.helper/reconfigured_players/
2021-03-24 21:33:18.238 T:5111    ERROR <general>: GetDirectory - Error getting special://profile/addon_data/plugin.video.themoviedb.helper/reconfigured_players/
2021-03-24 21:33:18.260 T:5111     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Expecting value: line 1 column 1 (char 0)
2021-03-24 21:33:19.298 T:5111     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Getting KodiDB tvshow FAILED!
2021-03-24 21:33:20.300 T:5111     INFO <general>: [plugin.video.themoviedb.helper]
                                                   Getting KodiDB episode FAILED!
2021-03-24 21:33:20.304 T:5113     INFO <general>: initializing python engine.
2021-03-24 21:33:22.220 T:5113  WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2021-03-24 21:33:22.551 T:5113     INFO <general>: Skipped 1 duplicate messages..
2021-03-24 21:33:22.551 T:5113  WARNING <general>: [Amazon VOD] Version: 0.9.1+matrix.1
2021-03-24 21:33:22.552 T:5113  WARNING <general>: [Amazon VOD] Unicode filename support: False
2021-03-24 21:33:22.554 T:5113  WARNING <general>: [Amazon VOD] Locale: en-us / Language: de
2021-03-24 21:33:23.423 T:5113     INFO <general>: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run

For search:

2021-03-24 21:33:23.423 T:5113     INFO <general>: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run
2021-03-24 21:36:06.821 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 21:36:06.822 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 21:36:06.828 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-24 21:36:06.829 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 21:36:06.829 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-24 21:36:07.824 T:5113     INFO <general>: initializing python engine.
2021-03-24 21:36:07.827 T:5113  WARNING <general>: [Amazon VOD] Version: 0.9.1+matrix.1
2021-03-24 21:36:07.829 T:5113  WARNING <general>: [Amazon VOD] Unicode filename support: False
2021-03-24 21:36:07.830 T:5113  WARNING <general>: [Amazon VOD] Locale: en-us / Language: de
2021-03-24 21:36:08.703 T:5113     INFO <general>: CPythonInvoker(21, /storage/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run
2021-03-24 21:36:15.171 T:5111     INFO <general>: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): script successfully run
2021-03-24 21:36:15.793 T:5111  WARNING <general>: CPythonInvoker(20, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): the python script "/storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE
2021-03-24 21:36:15.793 T:5111     INFO <general>: Python interpreter stopped
2021-03-24 21:36:15.811 T:4723    ERROR <general>: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.themoviedb.helper/?info=play&tmdb_type=tv&tmdb_id=63639&season=1&episode=5]
2021-03-24 21:36:35.871 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 21:36:35.871 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 21:36:35.880 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-24 21:36:35.882 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 21:36:35.882 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE

I also tried replacing /pv/ with /amz/ the results in the log seems to be similar at least for play. But this time after running search this episode the main menu of the amazon VOD plugin opened. So there are different reactions between the "file": "(?i).* and the /amz/ version.

Search for the /amz/ version:

2021-03-24 22:05:09.393 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 22:05:09.393 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 22:05:09.400 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-24 22:05:09.401 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 22:05:09.402 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-24 22:05:11.825 T:5280     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player.players - attempt to resolve dummy file
                                                   /storage/.kodi/addons/plugin.video.themoviedb.helper//resources/dummy.mp4
2021-03-24 22:05:12.242 T:4723     INFO <general>: VideoPlayer::OpenFile: plugin://plugin.video.themoviedb.helper/?info=play&tmdb_type=tv&tmdb_id=63639&season=1&episode=5
2021-03-24 22:05:12.247 T:5292     INFO <general>: Creating InputStream
2021-03-24 22:05:12.290 T:5292     INFO <general>: Creating Demuxer
2021-03-24 22:05:12.522 T:5292     INFO <general>: Opening stream: 0 source: 256
2021-03-24 22:05:12.522 T:5292     INFO <general>: CVideoPlayerVideo::OpenStream - Creating codec: 27
2021-03-24 22:05:12.522 T:5292     INFO <general>: CBitstreamConverter::Open bitstream to annexb init
2021-03-24 22:05:12.525 T:5292     INFO <general>: DVDVideoCodecAmlogic: Opened Amlogic Codec
2021-03-24 22:05:12.525 T:5292     INFO <general>: Creating video thread
2021-03-24 22:05:12.525 T:5295     INFO <general>: running thread: video_thread
2021-03-24 22:05:12.526 T:5292     INFO <general>: Opening stream: 1 source: 256
2021-03-24 22:05:12.526 T:5292     INFO <general>: Finding audio codec for: 86018
2021-03-24 22:05:12.527 T:5292     INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2021-03-24 22:05:12.527 T:5292     INFO <general>: Creating audio thread
2021-03-24 22:05:12.528 T:5296     INFO <general>: running thread: CVideoPlayerAudio::Process()
2021-03-24 22:05:12.530 T:5295     INFO <general>: DVDVideoCodecAmlogic::AddData Open decoder: fps:30000/1001
2021-03-24 22:05:12.541 T:5296     INFO <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2021-03-24 22:05:12.542 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 22:05:12.543 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 22:05:12.559 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02"
2021-03-24 22:05:12.561 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 22:05:12.561 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-24 22:05:12.686 T:4723     INFO <general>: Constructing CRendererAML
2021-03-24 22:05:12.709 T:4723     INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 29.970, 3D: false
2021-03-24 22:05:12.710 T:4723     INFO <general>: Display resolution ADJUST : 1920x1080 @ 59.94 - Full Screen (21) (weight: -4129010221056.000)
2021-03-24 22:05:12.723 T:4723     INFO <general>: VideoPlayer: OnLostDisplay received
2021-03-24 22:05:12.723 T:4723    ERROR <general>: GetString: error reading /sys/class/amhdmitx/amhdmitx0/custom_mode
2021-03-24 22:05:12.920 T:4723     INFO <general>: VideoPlayer: OnResetDisplay received
2021-03-24 22:05:12.920 T:4723     INFO <general>: GLES: Maximum texture width: 4096
2021-03-24 22:05:13.501 T:4723    ERROR <general>: Control 55 in window 10025 has been asked to focus, but it can't
2021-03-24 22:05:13.503 T:4723     INFO <general>: CVideoPlayer::CloseFile()
2021-03-24 22:05:13.503 T:4723     INFO <general>: VideoPlayer: waiting for threads to exit
2021-03-24 22:05:13.503 T:5292     INFO <general>: CVideoPlayer::OnExit()
2021-03-24 22:05:13.504 T:5292     INFO <general>: Closing stream player 1
2021-03-24 22:05:13.504 T:5292     INFO <general>: Waiting for audio thread to exit
2021-03-24 22:05:13.521 T:5296     INFO <general>: thread end: CVideoPlayerAudio::OnExit()
2021-03-24 22:05:13.521 T:5292     INFO <general>: Closing audio device
2021-03-24 22:05:13.531 T:4731     INFO <general>: CActiveAESink::OpenSink - initialize sink
2021-03-24 22:05:13.531 T:5292     INFO <general>: Deleting audio codec
2021-03-24 22:05:13.531 T:5292     INFO <general>: Closing stream player 2
2021-03-24 22:05:13.532 T:5292     INFO <general>: waiting for video thread to exit
2021-03-24 22:05:13.548 T:5295  WARNING <general>: OutputPicture - timeout waiting for buffer
2021-03-24 22:05:13.548 T:5295     INFO <general>: thread end: video_thread
2021-03-24 22:05:13.549 T:5292     INFO <general>: deleting video codec
2021-03-24 22:05:13.562 T:4723     INFO <general>: VideoPlayer: finished waiting
2021-03-24 22:05:13.562 T:4723     INFO <general>: CVideoPlayer::CloseFile()
2021-03-24 22:05:13.562 T:4723     INFO <general>: VideoPlayer: waiting for threads to exit
2021-03-24 22:05:13.562 T:4723     INFO <general>: VideoPlayer: finished waiting
2021-03-24 22:05:13.567 T:5294     INFO <general>: Deleting settings information for files plugin://plugin.video.themoviedb.helper/?info=play&tmdb_type=tv&tmdb_id=63639&season=1&episode=5
2021-03-24 22:05:13.726 T:4731     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=AMLMESONAUDIO,DEV=0"
2021-03-24 22:05:13.733 T:4731     INFO <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=AMLMESONAUDIO,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2021-03-24 22:05:13.734 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2021-03-24 22:05:13.734 T:4731     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE
2021-03-24 22:05:17.135 T:5280     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player.players -- successfully resolved dummy file
                                                   /storage/.kodi/addons/plugin.video.themoviedb.helper//resources/dummy.mp4
2021-03-24 22:05:17.136 T:5280     INFO <general>: [plugin.video.themoviedb.helper]
                                                   lib.player - finished executing action
                                                   Container.Update(plugin://plugin.video.amazon-test/amz/search/)
2021-03-24 22:05:17.137 T:5280     INFO <general>: CPythonInvoker(28, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): script successfully run
2021-03-24 22:05:17.137 T:5280     INFO <general>: CPythonInvoker(28, /storage/.kodi/addons/plugin.video.themoviedb.helper/plugin.py): waiting on thread 3547325104
2021-03-24 22:05:18.309 T:4723    ERROR <general>: GetString: error reading /sys/class/amhdmitx/amhdmitx0/custom_mode
2021-03-24 22:05:18.525 T:4723     INFO <general>: GLES: Maximum texture width: 4096
2021-03-24 22:05:20.109 T:5283     INFO <general>: initializing python engine.
2021-03-24 22:05:20.123 T:5283  WARNING <general>: [Amazon VOD] Version: 0.9.1+matrix.1
2021-03-24 22:05:20.125 T:5283  WARNING <general>: [Amazon VOD] Unicode filename support: False
2021-03-24 22:05:20.131 T:5283  WARNING <general>: [Amazon VOD] Locale: en-us / Language: de
2021-03-24 22:05:20.882 T:5283     INFO <general>: CPythonInvoker(29, /storage/.kodi/addons/plugin.video.amazon-test/default.py): script successfully run
jurialmunkey commented 3 years ago

Do you have an option for search when inside the Amazon plugin itself? Because it sounds like there is no search function for you available.

If there isn't any search functionality exposed for you then a player is going to be impossible. There has to be a search path that tmdbhelper can use to find the item you're looking for.

DevHov commented 3 years ago

The amazon VOD plugin has a search function. However I figured out, that there might be an issue with that. At least on my device searching takes a very long time (more than a Minute), so couldt that be the issue, is there something like a timeout for the TMDBH Plugin?

jurialmunkey commented 3 years ago

There's no timeout in TMDbH but it is possible that Kodi's json rpc module has a timeout as that is what is used to retrieve the directories from the plugin.

Either way, without a quick way to search it isn't really possible to have a player because you're going to be waiting that long everytime.

In essence, all a TMDBh player does is automate the process of clicking on things in the plugin - so it is just opening search, inputting the info in the keyboard and then clicking on the item that matches the rules setup in the player. Without a working search or index of some sort, there isn't really any way for TMDBh to find the item you want to play.

I don't know why your search is taking so long though. For me, the Amazon plugin only takes a few seconds for search to find things.

DevHov commented 3 years ago

Okay weird. Thanks anyway for the json. Probably someone else couldt confirm that it's workling.

Unfortunately the S905x Coreelec is the only device where I can run it right now. So I can't validate it at the moment. On my pc the amazon plugin doesn't work, but that's another story.

jurialmunkey commented 3 years ago

Thanks anyway for the json. Probably someone else couldt confirm that it's workling.

Actually just reactivated my Prime account yesterday because I wanted to get a few things shipped to me. So I was able to test this morning and the above player code is working well for me (tested using The Boys, Man in the High Castle, Knives Out, and Coming to America and all played fine). So I think I will merge it.

The Amazon plugin in general is painfully slow to navigate though! Fortunately the search isn't too bad for me but I've found some of the other sections are very sluggish to load. And I recently upgraded my loungeroom htpc (11thGen i7 NUC w/ 32gb RAM and M.2 SSD), so if it is slow on that then it is definitely going to be slow on low powered systems like the s905x.