-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect Kodi to Nextcloud #11
Comments
It seems to connect, but it appears to not find any artists, with my nextcloud it works, i will do some tests and i will release a fix |
If you need more details let me know. Btw it is Nextcloud 17.01. I will see if I can upgrade to 17.02 asap, maybe that helps? |
I have your exact version of nextcloud and in my version it works. I have reworked the error messages to better test the connection, can you please try the development version? You can download the plugin here: https://github.com/lusum/ampache-xbmc-plugin/archive/master.zip |
Can you post the results of the development version? |
Thanks, working on it. |
It does not start at all, gives an error when I start it:
|
This the debug log. I see that it picks Python 2.7, is that as expected?
|
I need the log before this point, like connection error or connection ok, from CPythonInvoker(55, .kodi/addons/plugin.audio.ampache/default.py): start processing |
ok, python 2.7 is the default |
The plugin connect, but the server don't seems to send anything.
I have updated the master, adding a debug to show what the server send on connecting, can you update to the new master ( same address for the zip ) and post the log? |
Yes, one moment |
Interesting, http code 401
|
Ampache expects a timestamp in the handshake request? See Nextcloud "controller/ampachecontroller.php" line 156. See also https://github.com/ampache/ampache/wiki/XML-API |
Ampache require a timestamp, i have found a bug on owncloud very similiar to your Try to control if the time on server and client are the same, it should be possible that they are different and it introduce a bug. |
Timestamps are identical, at least <1 sec difference. Both use NTP. I will run curl manually from my Kodi system to Ampache and see what the responses are. |
I have to fix the bug introduced and after i will check the time problem. It is weird that the same servers have differents problem. I use the generated api-key? Maybe you use login and password? Or your api-key is expired? |
Ok the bug introduced is fixed, now i control your time bug You can use the development version now |
2019-12-28 11:27:21.642 T:139750358898432 NOTICE: https://....nl/nextcloud/index.php/apps/music/ampache/server/xml.server.php?action=handshake&auth=....&version=350001 Why don't appear timestamp between auth and version? I will check in the plugin. The correct one should be: https://....nl/nextcloud/index.php/apps/music/ampache/server/xml.server.php?action=handshake&auth=....×tamp=....&version=350001 |
I have my setup working. I have no time today but I will post the details tomorrow.
…On Dec 28, 2019, 12:54, at 12:54, Carlo Sardi ***@***.***> wrote:
2019-12-28 11:27:21.642 T:139750358898432 NOTICE:
https://....nl/nextcloud/index.php/apps/music/ampache/server/xml.server.php?action=handshake&auth=....&version=350001
Why don't appear timestamp between auth and version? I will check in
the plugin.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#11 (comment)
|
Maybe i have found the problem, api_key url sent lack timestamp and i use login/password, now i try with api_key with and without timestamp |
Found the bug: in settings you have to unckeck use api key. Nextcloud use username password. They are generated, but not username and password. I will issue a warning dialog in code. Try it and tell me the results. I have updated the development version, a little more robust and a warning message, try it, if it works, i will close the bug. |
You found what I found: username + password instead of API key. The Nextcloud Music addon gave me the impression that it generates an API key. Yesterday, when I created a 2nd key while troubleshooting this problem, I saw that it is a username and password. I put that into your Kodi Ampache addon configuration and it works. And the requests contain a timestamp too. I see you updated the readme. Great and thanks! I will test the last development version now. |
It works fine. Two questions:
|
Ok, perfect.
The main ampache developer want to include this addon to the official repository, so, i'm not allowed, but i never asked for it.
Yes, i have some albums with cover art embedded and it works fine |
Then I will check the cover art. Thank for helping, I will close this issue. |
Hi,
I am struggling with this for some hours, but giving up now. I have Kodi 18.5 Leia (on Linux) and your plugin version 0.9.0.0 and it has to connect to NextCloud Music app version. 0.11.1. From Android using a subsonic client it works fine so API key etc exist.
This piece of logging turns up on every error in Kodi. Server side I see the requests in the Apache access log with response code 200.
`2019-12-27 15:31:47.048 T:140086079362816 NOTICE: https:///nextcloud/index.php/apps/music/ampache/server/xml.server.php?action=handshake&auth=&version=350001
2019-12-27 15:31:50.723 T:140085274056448 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: invalid literal for int() with base 10: ''
Traceback (most recent call last):
File "/home/htpc/.kodi/addons/plugin.audio.ampache/default.py", line 691, in
get_items("artists", limit=None, useCacheArt=False)
File "/home/htpc/.kodi/addons/plugin.audio.ampache/default.py", line 416, in get_items
limit = int(ampache.getSetting(object_type))
ValueError: invalid literal for int() with base 10: ''
-->End of Python script error report<--
2019-12-27 15:31:50.779 T:140086079362816 ERROR: GetDirectory - Error getting plugin://plugin.audio.ampache/?mode=1&name=Artists%20()&object_id=None
2019-12-27 15:31:50.795 T:140086970316992 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.ampache/?mode=1&name=Artists%20()&object_id=None) failed
2019-12-27 15:31:51.465 T:140085274056448 NOTICE: https:///nextcloud/index.php/apps/music/ampache/server/xml.server.php?action=handshake&auth=&version=350001
`
I have tried API version 350001 and 400001, also downgrading to the previous version of your plugin didn't fix it.
Do you have any hint?
Kind regards
Paul
The text was updated successfully, but these errors were encountered: