Jump to content

Netflix integration?


hstamas

Recommended Posts

hstamas

It's not really Netflix approved though right?

I believe it is @@Luke. All DRM rights are being honored as far as I can tell. You need to log in to watch and once logged in, Netflix sends you a confirmation that you’ve logged in to a “device” for playback.

Edited by hstamas
Link to comment
Share on other sites

VladTepz

It's not really Netflix approved though right?

 

It is not Netflix approved, it is a workaround, and may break at anytime. Although both the Netflix & Amazon Prime apps do work really well.

 

That said, it does use proper DRM and you do need a proper Netflix account. So for the time being, Netflix & Amazon are allowing it.

 

 

The biggest issue with these addons is the use of the Widevine Library that is needed for non ARM Systems to support the DRM. I believe there is no proper/legal way to repackage the Widevine Library into Emby and would need the user to manually acquire it.

 

This is currently done in Kodi either manually, or through a 3rd party helper script that either extracts the library from Chrome or Firefox, as Kodi can't legally include this library in it's install setup.

Perhaps one day Netflix/Amazon/Etc.. will supply them with a proper/official DRM solution in the future..., hopefully...


BTW, a big +1 for me to see this implemented in Emby in the future.

  • Like 2
Link to comment
Share on other sites

VladTepz

Also, it’s only a client side solution, and not all Clients support Widevine. (Apple, Xbox, Etc..) so because of the DRM, it most likely couldn’t be implemented into the server without doing the same thing PlayOn does. i.e... Transcode the stream to pass it to the clients.

Edited by VladTepz
Link to comment
Share on other sites

  • 1 year later...
xnappo

Replying to an old topic, but I do kinda integrate Netflix and Amazon into my Emby library in a hacky way that might be something that can be expanded upon.

1. I have scripts that create dummy video files with Netflix or Prime in the name for shows on Amazon

2. Emby scans them and adds them as normal

3. I have a script on my NVidia Kodi that launches Netflix or Amazon whenever these are played and marks as watched correctly

It does not automatically launch that show, just the app, but it is good enough for my purposes of just keeping everything we are watching under the Emby umbrella.

What would be nice for me would be a way to do #1 from inside of Emby.

xnappo

Edited by xnappo
  • Like 1
Link to comment
Share on other sites

3 hours ago, xnappo said:

Replying to an old topic, but I do kinda integrate Netflix and Amazon into my Emby library in a hacky way that might be something that can be expanded upon.

1. I have scripts that create dummy video files with Netflix or Prime in the name for shows on Amazon

2. Emby scans them and adds them as normal

3. I have a script on my NVidia Kodi that launches Netflix or Amazon whenever these are played and marks as watched correctly

It does not automatically launch that show, just the app, but it is good enough for my purposes of just keeping everything we are watching under the Emby umbrella.

What would be nice for me would be a way to do #1 from inside of Emby.

xnappo

For #1 couldn't you just have an external tool create create stub files or strm files?

Link to comment
Share on other sites

xnappo
1 hour ago, Luke said:

For #1 couldn't you just have an external tool create create stub files or strm files?

Sure, that is what my scripts do, but it is fairly manual.  Maybe it is something better done as a Sonarr addin now that I think about it, might look into that.

Link to comment
Share on other sites

#3 I would think could be accomplished by adding some additional flexibility to external players.

Link to comment
Share on other sites

Do you mean changing the external players or adding some additional flexibility in Emby to use the external players?

It could be cool if Emby saw an strm file with "NETFLIX" in it to launch the netflix app on that device sort of how we launch Youtube on Android TV.  If we could pass the file link even better.

This could be done for Netflix, Amazon Prime, Hulu for example as they are 3 of the big ones. That would make for some interesting integration things that could be done.

I'd use something like this for some TV series especially to see if I like the series before I'd want to load on my system or to make it easier for the Daughter to get to shows like "Love Island" that's on Hulu.

Link to comment
Share on other sites

horstepipe

@xnappo

would you mind to share your work/your scripts? I thought about something similar awhile ago but didn’t find the time to start yet.

How did you accomplish to create all files without getting an API ban? How do you keep the files up to date (content is being removed regularly)?

 

 

Edited by horstepipe
  • Like 1
Link to comment
Share on other sites

xnappo
12 hours ago, cayars said:

It could be cool if Emby saw an strm file with "NETFLIX" in it to launch the netflix app on that device sort of how we launch Youtube on Android TV.  If we could pass the file link even better.

Yeah, this is pretty much exactly what my little Kodi hack does, I just use a dummy video file instead of a strm though.  It used to be on AndroidTV you could link to a specific video, then they broke that and you could link to a search, but now you can only launch the app from what I can tell (for Netflix and Prime at least).

        if "Netflix_S" in str(self.getPlayingFile(self)):
            xbmc.sleep(400)
            while(self.isPlaying() == True): # Force to end to mark watched in Emby
                self.seekTime(10)
                xbmc.sleep(200)
            app      = 'com.netflix.ninja'
            cmd = 'StartAndroidActivity("%s", "%s", "%s", "%s")' % (app, intent, dataType, dataURI)
            xbmc.executebuiltin(cmd)
3 hours ago, horstepipe said:

@xnappo

would you mind to share your work/your scripts? I thought about something similar awhile ago but didn’t find the time to start yet.

How did you accomplish to create all files without getting an API ban? How do you keep the files up to date (content is being removed regularly)?

You are overestimating my level of automation lol.  I use Sonaar to keep track of shows I am watching - just as a calendar.  I manually add the files using a script when they are available, Emby takes care of all the metadata and 'watched' states.  This is the bit I think could be done with a Sonaar addon.

#!/bin/bash

read -p 'Starting season: ' startseason
read -p 'Ending season: ' endseason

for ((season = $startseason; season <= $endseason; season++)); do
        niceseason=$(printf "%02d" $season)
        mkdir "Season $niceseason"
        read -p "Epsiodes in Season ${season} :" episodes
        for ((episode = 1; episode <= $episodes; episode++)); do
                niceepisode=$(printf "%02d" $episode)
                echo Netflix_S${niceseason}E${niceepisode}.mp4
                cp ../../netflix_intro.mp4 "Season $niceseason/Netflix_S${niceseason}E${niceepisode}.mp4"
        done
done

 

Edited by xnappo
Link to comment
Share on other sites

xnappo

Also I realize this is super corner-case and not likely to get support inside Emby, but I think the way to do it would be to allow 'virtual episodes' to be turned on only at the series level and add the concept of virtual episode providers when 'air date' has past.

Link to comment
Share on other sites

xnappo

@horstepipe - likely just talking to myself here, but I did add Sonarr based automation to my setup.  Chron job run at 6am plus this Python script.  Top bit of script needs to be modified for your needs, I will update this post if I find any bugs.

[EDIT: code obsolete, see https://github.com/xnappo/VirtualEpisodes ]

 

Edited by xnappo
code obsolete
  • Thanks 1
Link to comment
Share on other sites

xnappo

Here is another Python script to replace my earlier shell script to add series that have already aired.  This one also uses Sonarr for the data - so add the show to Sonarr and set it to 'unmonitored'.  Then run the script with a reasonable subset of the series title and it will make dummy files for all the seasons/episodes.  

[EDIT: code obsolete, see https://github.com/xnappo/VirtualEpisodes]

 

Edited by xnappo
code obsolete
Link to comment
Share on other sites

  • 4 weeks later...
  • 6 months later...
  • 2 years later...
misterkoat

This occurred to me after exporting strm files from the Netflix addon for Kodi and then adding them to the Emby library. For now, it works great with the Netflix addon still installed on Kodi but it would eliminate one cog in the system to have the stream directly decoded by Emby.

I think it's implementable (someone has done it for Kodi), and it's not illegal because one has to have a subscription to Netflix, and they don't bypass DRM restrictions.

Link to comment
Share on other sites

7 hours ago, misterkoat said:

and it's not illegal

Hi. Legality would be conditional on a lot of factors but doing this definitely violates their terms of use:

Quote

you agree not to:

(i) archive, download, reproduce, distribute, modify, display, perform, publish, license, create derivative works from, offer for sale, or use content and information contained on or obtained from or through the Netflix service;

(ii) circumvent, remove, alter, deactivate, degrade, block, obscure or thwart any of the content protections or other elements of the Netflix service, including the graphical user interface, any advertising or advertising features, copyright notices, and trademarks;

(iii) use any robot, spider, scraper or other automated means to access the Netflix service;

 

  • Agree 1
Link to comment
Share on other sites

xnappo

Well, my solution certainly doesn't violate the terms.

I would love to see it implemented in Emby, but also understand it may not be something a lot of people want.

Link to comment
Share on other sites

Have you read https://help.netflix.com/legal/termsofuse ?

4.6 I, II, III, IV, V, VI would certainly be violated

4.6. You agree to use the Netflix service, including all features and functionalities associated therewith, in accordance with all applicable laws, rules and regulations, or other restrictions on use of the service or content therein. Except as explicitly authorized by us, you agree not to:

(i) archive, download, reproduce, distribute, modify, display, perform, publish, license, create derivative works from, offer for sale, or use content and information contained on or obtained from or through the Netflix service;

(ii) circumvent, remove, alter, deactivate, degrade, block, obscure or thwart any of the content protections or other elements of the Netflix service, including the graphical user interface, any advertising or advertising features, copyright notices, and trademarks;

(iii) use any robot, spider, scraper or other automated means to access the Netflix service;

(iv) decompile, reverse engineer or disassemble any software or other products or processes accessible through the Netflix service;

(v) insert any code or product or manipulate the content of the Netflix service in any way;

(vi) use any data mining, data gathering or extraction method;

Link to comment
Share on other sites

xnappo

Err, all my solution does is launch the Netflix app. It doesn't even scrape Netflix. 

Edited by xnappo
Link to comment
Share on other sites

My Bad, Channels DVR does this also.

While it probably doesn't make sense to have it as part of Emby itself, I do believe it could be done If you created a shim (script or exe) used as an external player. You could launch Netflix, Prime Video, etc passing a proper URL to play the video.

Link to comment
Share on other sites

xnappo
14 hours ago, cayars said:

My Bad, Channels DVR does this also.

While it probably doesn't make sense to have it as part of Emby itself, I do believe it could be done If you created a shim (script or exe) used as an external player. You could launch Netflix, Prime Video, etc passing a proper URL to play the video.

Yeah, ideally I would replace the Sonaar piece with using the Emby data for when shows are released, but it is a chicken/egg thing - I would like to able to search for shows inside Emby that I don't have files for.  I don't think there is any way to do that.

Just to be clear, Sonaar in my setup is used only as a convenient API to get air dates.

Edited by xnappo
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...