2015-05-30, 04:46
This is how I was able to play encrypted blu-rays on my os x machine opening them with the play disc button in the Kodi home screen.
To play encrypted blu-rays download MakeMKV (if you like it or use it often buy it) then create symbolic links to libmmbd.dylib to simulate blu-ray libraries.
cd ~
mkdir ~/lib
ln -s /Applications/MakeMKV/Contents/lib/libmmbd.dylib ~/lib/libaacs.dylib
ln -s /Applications/MakeMKV/Contents/lib/libmmbd.dylib ~/lib/libbdplus.dylib
Make your symbolic links executable
Sudo chmod 755 ~/lib/libaacs.dylib
Sudo chmod 755 ~/lib/libbdplus.dylib
Now to associate blurays with the play disc button. I would like to thank teedubb for his solution. I borrowed heavily from it but made several alterations to make it work with os x.
We will need to edit the home.xml of your skin I use confluence and use a 720p monitor so for me it was:
sudo nano /Applications/Kodi/Contents/Resources/Kodi/addons/skin.confluence/720p/home.xml
Your file path may be different depending on your preferred skin and resolution.
Find this line in home.xml
<onclick condition=“!HasMediaDVD">PlayDVD()</onclick>
And change it to this (just change my user name "mike" with your user name. Make sure that any path where you see my user name you replace it with your user name.)
<onclick condition=“!HasMediaDVD">RunScript(/Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py)</onclick>
CTRL-X, Y, ENTER to save and exit
Now make a folder to be home to your blu-ray scripts
mkdir ~/Blu-ray
Create your first script (don't forget to change user names)
nano /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py
And type this text:
import os
os.system('/Volumes/Macintosh\ HD/mike/Blu-ray/kodi-play-disc.sh &')
CTRL-X, Y, ENTER to save and exit
Create your second script
nano /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.sh (don't forget to change user names)
And type or paste this text:
#!/bin/bash
#script to play dvd/cd/bluray with kodi
BD_DISC=$(find /Volumes/*/BDMV/index.bdmv)
if [ $(find /Volumes/*/BDMV/index.bdmv) ]; then
curl --data-binary '{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"'"$BD_DISC"'"}}}' -H 'content-type: application/json;' http://127.0.0.1:8080/jsonrpc
else
curl --data-binary '{"id":789,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"dvd:\/\/1"}}}' -H 'content-type: application/json;' http://127.0.0.1:8080/jsonrpc
fi
CTRL-X, Y, ENTER to save and exit
Make both scripts executable.
Sudo chmod 755 /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py
Sudo chmod 755 /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.sh
Everything should work for you at this point. Kodi should play encrypted blu-ray discs with the help of MakeMKV. The play disc button should work for blu-rays and dvds. I don't own a single cd so I can't verify if they play with the button or not.
If you have any problem make sure that you replaced my user name with yours (it's in nearly every file path including those in the edited xml line and scripts)
To play encrypted blu-rays download MakeMKV (if you like it or use it often buy it) then create symbolic links to libmmbd.dylib to simulate blu-ray libraries.
cd ~
mkdir ~/lib
ln -s /Applications/MakeMKV/Contents/lib/libmmbd.dylib ~/lib/libaacs.dylib
ln -s /Applications/MakeMKV/Contents/lib/libmmbd.dylib ~/lib/libbdplus.dylib
Make your symbolic links executable
Sudo chmod 755 ~/lib/libaacs.dylib
Sudo chmod 755 ~/lib/libbdplus.dylib
Now to associate blurays with the play disc button. I would like to thank teedubb for his solution. I borrowed heavily from it but made several alterations to make it work with os x.
We will need to edit the home.xml of your skin I use confluence and use a 720p monitor so for me it was:
sudo nano /Applications/Kodi/Contents/Resources/Kodi/addons/skin.confluence/720p/home.xml
Your file path may be different depending on your preferred skin and resolution.
Find this line in home.xml
<onclick condition=“!HasMediaDVD">PlayDVD()</onclick>
And change it to this (just change my user name "mike" with your user name. Make sure that any path where you see my user name you replace it with your user name.)
<onclick condition=“!HasMediaDVD">RunScript(/Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py)</onclick>
CTRL-X, Y, ENTER to save and exit
Now make a folder to be home to your blu-ray scripts
mkdir ~/Blu-ray
Create your first script (don't forget to change user names)
nano /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py
And type this text:
import os
os.system('/Volumes/Macintosh\ HD/mike/Blu-ray/kodi-play-disc.sh &')
CTRL-X, Y, ENTER to save and exit
Create your second script
nano /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.sh (don't forget to change user names)
And type or paste this text:
#!/bin/bash
#script to play dvd/cd/bluray with kodi
BD_DISC=$(find /Volumes/*/BDMV/index.bdmv)
if [ $(find /Volumes/*/BDMV/index.bdmv) ]; then
curl --data-binary '{"id":1,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"'"$BD_DISC"'"}}}' -H 'content-type: application/json;' http://127.0.0.1:8080/jsonrpc
else
curl --data-binary '{"id":789,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"dvd:\/\/1"}}}' -H 'content-type: application/json;' http://127.0.0.1:8080/jsonrpc
fi
CTRL-X, Y, ENTER to save and exit
Make both scripts executable.
Sudo chmod 755 /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.py
Sudo chmod 755 /Volumes/Macintosh HD/mike/Blu-ray/kodi-play-disc.sh
Everything should work for you at this point. Kodi should play encrypted blu-ray discs with the help of MakeMKV. The play disc button should work for blu-rays and dvds. I don't own a single cd so I can't verify if they play with the button or not.
If you have any problem make sure that you replaced my user name with yours (it's in nearly every file path including those in the edited xml line and scripts)