[How to] Get libwidevine working in OSMC kodi 18 & 19?(Netflix, Disney+

I’ve previously had a netflix-prep, since Google closed the old libwidevine and all the Issues Netflix have plagued the addon with, I thought I’d make it less Netflix oriented since there are a multitude of addons, depending on libwidevine, for example Netflix, Disney+, Viaplay, DANZ.

So I wrote this script instead, it downloads the patched system binaries needed, grabs the python dependencies, patches medicenter in v.18

Grab the script file for your Kodi version and run it in shell.

As per request of @angry.sardine:

Then download the widevine addon of your choice and install it.

2 Likes

Just looking at your script.
2 things come to my mind:

  1. I am wondering - if there is a default configuration directory for kodi/media-center?
    as systemd is used, it is common to have a configuration-override file in /etc/default read by the syetemd-script when starting media-center.

@sam_nazarko - any chance the mediacenter script could get an “OPTIONS” variable it handles?
And that one would be loaded through /etc/default/mediacenter as options?
That would make some integrations easier in the long run.

  1. Did you think about using error-levels in your script to make it exit if an error occurs?
    I do it like this:
mkdir ~/temp_glibc
errlvl=$?
if [ $errlvl -gt 0 ]
then
   "*** FATAL: Unable to create temporary download directory. Exiting!"
  exit 1
fi

At least, the script would not continue and eventually break some things.

There will be plenty of people who want to use this script who don’t know Linux and aren’t familiar with GitHub. I think you can probably assume the user knows how to reach an SSH prompt; but from that point on you should include step by step instructions on downloading and running the script.

@Smurphy I’m all for people PR improvements, I just put this together like in10 mins, copy and pasting from my Netflix script and some early instructions from Sam. I should edit it since the “sed” might not be needed anymore.

@angry.sardine Well, I did this at like 1 am, wasn’t in the mood for writing a “how to”, but you are welcome to do it =), I might be able to take a shot at it later this weekend. I usually do nice dialogs and such, but this script is just raw command execution.

ps. heck, while I was here i made a small instruction

1 Like