Username and password for AMC Kodi update script

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
ChromeQ
Posts: 2
Joined: 18 Nov 2019, 06:13

Username and password for AMC Kodi update script

Post by ChromeQ »

Hi,
I've been trying out the AMC script which has a kodi option. I entered the host but I am getting a 401 auth error since I have set a password on the settings of kodi (.kodi/userdata/guisettings.xml)

Code: Select all

...
    <setting id="services.webserver">true</setting>
    <setting id="services.webserverpassword">**PASSWORD**</setting>
    <setting id="services.webserverport">2620</setting>
    <setting id="services.webserverssl" default="true">false</setting>
    <setting id="services.webserverusername">dav</setting>
...
I have tried to enter the host in the following format: "user:[email protected]:port"

Code: Select all

Notify Kodi: [host:dav:**PASSWORD**@192.168.0.66, port:2620]
POST: http://dav:**PASSWORD**@192.168.0.66:2620/jsonrpc {"jsonrpc":"2.0","method":"GUI.ShowNotification","params":{"title":"FileBot finished processing 1 files","message":"\u2022 Madam.Secretary.S06E07.720p.HDTV.x264-AVS","image":"https://app.filebot.net/icon.png"},"id":1}
IOException: Server returned HTTP response code: 401 for URL: http://dav:**PASSWORD**@192.168.0.66:2620/jsonrpc
Is there a way to get this working as expected as I'd rather not remove the password on Kodi's RPC. Thanks
User avatar
rednoah
The Source
Posts: 19166
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Username and password for AMC Kodi update script

Post by rednoah »

1.
The --def kodi option only works for simple LAN configurations. HTTPS and HTTP authentication are not supported


2.
You may use the --def exec to send out arbitrary requests via curl:
https://kodi.wiki/view/HOW-TO:Remotely_update_library
:idea: Please read the FAQ and How to Request Help.
ChromeQ
Posts: 2
Joined: 18 Nov 2019, 06:13

Re: Username and password for AMC Kodi update script

Post by ChromeQ »

Thanks, I was using curl before. Will the exec command run once per file or per run?
Just wondering if I can get access to the file count or file name as your script does for the notification.
User avatar
rednoah
The Source
Posts: 19166
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Username and password for AMC Kodi update script

Post by rednoah »

Both, depending on how many unique commands your --def exec expression generates.

e.g. 1 call:

Code: Select all

--def exec="/path/to/my/script.sh"
e.g. 1 call per 1 file processed:

Code: Select all

--def exec="/path/to/my/script.sh {quote f}"
:!: file count is tricky though, with the --def exec expression.
:idea: Please read the FAQ and How to Request Help.
Post Reply