asciidisco / plugin.video.netflix

Inputstream based Netflix plugin for Kodi
MIT License
1.24k stars 225 forks source link

Access Netflix extern #454

Closed Animizio closed 6 years ago

Animizio commented 6 years ago

I'm submitting a ...

Prerequisites

Description

[Description of the bug or feature]

Accessing the Netflix Addon extern with an multisearch addon. Searching in my Addon and playing through your Addon.

Expected behavior: [What you expected to happen]

I would like to access this addon extern for a search addon. Thats enough?

plugin://plugin.video.netflix/?action=play_video&video_id=70099789

Installation

Operating System

Thanks for any help and Support. If you need anything, just ask for more.

Philps commented 6 years ago

similar to this request: https://github.com/Sandmann79/xbmc/issues/128

caphm commented 6 years ago

Thanks for the hint @Philps!

@Animizio: If you already know the Netflix video id then yes, the call you listed will be enough.

Is there any place I can have a look at your plugin and test it out? I was thinking of implementing something similar someday as well.

Philps commented 6 years ago

@caphm: thats something to look into. does netflix has a similar api as amazon? how are search queries being made, so that a netflix video id is being returned?

alternatively ( as a workaround ) justwatch.com could be used but its less preffered. see: https://ask.metafilter.com/320483/How-to-programmatically-check-whether-a-movie-exists-on-netflix

any help would be appreciated

caphm commented 6 years ago

There is currently no way to programmatically query the search.

Do you want to auto-play the first returned result or display a selection of results and let the user choose which one to play? The former may be tricky, as even an exact match is not always returned as the first result by Netflix.

Philps commented 6 years ago

get a list of search results and compare against the search title to get a match. how this Addon is doing the search?

edit1:

the simples workaroudn might be using a search engine:

site:netflix.com intitle:"house of cards"

Question: How would i find a Season/Episode VideoID? Or is it simply the same VideoID + Season + Episode Argument?

Philps commented 6 years ago

So movie part is working, however i am having issues ( probably due to encoding of the params?) for tv shows

Neither is working:

plugin://plugin.video.netflix/?action=play_video&video_id=70242311%26infoLabels%3D%7B%27episode%27%3A5%2C%27season%27%3A6%7D

plugin://plugin.video.netflix/?action=play_video&video_id=70242311&infoLabels={'episode':5,'season':6}

DEBUG: [Netflix] "Navigation::router" called with arguments :paramstring = action=play_video&video_id=70242311&infoLabels={'episode':5,'season':6}:

DEBUG: [Netflix] "Navigation::before_routing_action" called with arguments :params = {'action': 'play_video', 'infoLabels': "{'episode':5,'season':6}", 'video_id': '70242311'}:

DEBUG: [Netflix] "Navigation::play_video" called with arguments :infoLabels = {'episode':5,'season':6}::video_id = 70242311::start_offset = -1:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

Philps commented 6 years ago

the issue is a follow. for a external addon its impossible to call the correct epsidodeid, even when having thecorrect videoid ( entry videoid)

the eposideID is a standalone videoID but i dont know where to find it =/

Philps commented 6 years ago

This issue can be closed

Search MovieID or TvShowID using a search engine and extract the ID

For Video

plugin://plugin.video.netflix/?action=play_video&video_id=

For TvShow Episodes

plugin://plugin.video.netflix/?action=play_video&video_id=&infoLabels=season=&episode=&mediatype=episode

Note: pass on Info Labels as params eg. infoLabels=urllib.urlencode({'episode':episode,'season':season,'mediatype':'episode'})

caphm commented 6 years ago

You should probably refrain from passing the infolabels with the addon call. These will be retrieved if they are not provided with the call and incomplete infolabels may break some functionality with library exports. I will change how this works someday and make it more robust, but for now just default to passing only the video_id