Kodi Community Forum
Beta Spotify for Kodi - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Music Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=148)
---- Thread: Beta Spotify for Kodi (/showthread.php?tid=265356)



RE: Spotify for Kodi - marcelveldt - 2017-06-16

(2017-06-16, 15:43)Fjux Wrote: i googled around a bit. but it might be harder then i initially thought.

As far as i know Kodi has no default support for audio inputs. except streaming to pusle audio.

the only thing i could think of letting the local system stream the audio to the DLNA of kodi (all localhost) and then play it through kodi.
https://wiki.archlinux.org/index.php/PulseAudio/Examples

but i think you will get some issues then with showing the correct songs ect.
PS. i noticed that the songs sometimes stop playing, and it suddently skips to the next song.
In the log from kodi i only see a next song requested log row. though i did not press any button. where is the spotty lib streaming the songs from? is a different source (IE mobile or PC) streaming it to spotty, or is it streaming directly from the spotify servers?

Yeah, I came to the same conclusion. For now I stripped the local playback from the Connect daemon. I can eventually make it a setting toggle to enable it again.
Instead I just monitor the events the connect player is receiving and I launch the Kodi player with the track that was requested.
The source for the audio is just the official Spotify servers but it's requested with an unofficial SDK (librespot), the same logic that is used by standalone Spotify Connect devices, for example wifi speakers, sonos etc.

I've just reproduced the issue with the sudden track changes and that will be fixed in the next release.
I'm still a bit struggling with the question why Kodi sometimes refuses to play, as also indicated by a few logs posted here.
I'm guessing that if it takes too long before the stream starts, Kodi ends the connection or something.


RE: Spotify for Kodi - marcelveldt - 2017-06-16

(2017-06-16, 16:01)Raitsa Wrote: Very happy to report that this is now fixed; with 1.1.22 everything suddenly started playing nicely, not sure if it was just because of alsa or what. Blush

OK, great! Well, alsa is no longer used now.
I've decided to just send the audio stream to the Kodi player...

Please give it a good test drive and let me know the results


RE: Spotify for Kodi - marcelveldt - 2017-06-16

(2017-06-16, 17:25)eusi Wrote: authentication and browsing songs works.

However playback doesn't work on 1.1.22 on ODROID C2 Libreelec (32bit userspace) Kodi 17.3.
Not sure if I missed something or doin something wrong!?

Hmmm, looking at your log it seems that something is going wrong because you can clearly see that Kodi is trying to start the playback over and over and finally gives up.
I will add some more logging in the code so maybe we can spot what's happening.

In the meanwhile maybe you can test something? In the addon settings, there's an option called "buffer entire track"
This will slowdown the start of the track but it might fix the issue. Instead of receiving the trackdata frame by frame, the entire trackdata is requested from the server and sent all at once to the Kodi player.
remember to restart/reboot Kodi after you changed that setting.


RE: Spotify for Kodi - sswilson - 2017-06-16

It had been working fine using 1.1.16 under windows 10, but now is back to freezing with a failed playback error under 1.1.22.

I'll try a fresh install of Kodi.... Sad


RE: Spotify for Kodi - marcelveldt - 2017-06-16

(2017-06-16, 21:59)sswilson Wrote: It had been working fine using 1.1.16 under windows 10, but now is back to freezing with a failed playback error under 1.1.22.
I'll try a fresh install of Kodi.... Sad

Debug log please !


RE: Spotify for Kodi - Didko - 2017-06-16

@marcelveldt, I'm sorry for the small offtopic, but is there any way to get the "old" plugin (0.x or 1.0 - don't remember the version number) as a zip file and to install it locally? I'm asking because I was happy with the results..


RE: Spotify for Kodi - sswilson - 2017-06-16

(2017-06-16, 22:04)marcelveldt Wrote:
(2017-06-16, 21:59)sswilson Wrote: It had been working fine using 1.1.16 under windows 10, but now is back to freezing with a failed playback error under 1.1.22.
I'll try a fresh install of Kodi.... Sad

Debug log please !

This might be more than you're interested in trying at the moment.... I did a fresh install of kodi, but tried the 64bit windows version....

http://paste.ubuntu.com/24875144/

I've left the audio output to default of normal PC speakers, but for the moment the first issue appears to be that it's not signing in (can't find the folder location?), and there also appears to be an initial error that's carried over from the installation of the plugin.

Let me know if you've got no interest at the moment of looking at the 64bit version and I'll go back to the 32bit one. (I would have already but thought you might want to see the log).


RE: Spotify for Kodi - marcelveldt - 2017-06-16

(2017-06-16, 22:48)Didko Wrote: @marcelveldt, I'm sorry for the small offtopic, but is there any way to get the "old" plugin (0.x or 1.0 - don't remember the version number) as a zip file and to install it locally? I'm asking because I was happy with the results..

Yes that is possible but that will be worthless within a few weeks because Spotify is going to pull the plug from the old sdk.
So there's a reason we now need to go through the pain to change it all.


RE: Spotify for Kodi - sswilson - 2017-06-16

(2017-06-16, 23:18)sswilson Wrote:
(2017-06-16, 22:04)marcelveldt Wrote:
(2017-06-16, 21:59)sswilson Wrote: It had been working fine using 1.1.16 under windows 10, but now is back to freezing with a failed playback error under 1.1.22.
I'll try a fresh install of Kodi.... Sad

Debug log please !

This might be more than you're interested in trying at the moment.... I did a fresh install of kodi, but tried the 64bit windows version....

http://paste.ubuntu.com/24875144/

I've left the audio output to default of normal PC speakers, but for the moment the first issue appears to be that it's not signing in (can't find the folder location?), and there also appears to be an initial error that's carried over from the installation of the plugin.

Let me know if you've got no interest at the moment of looking at the 64bit version and I'll go back to the 32bit one. (I would have already but thought you might want to see the log).

Ok.... uninstalled the 64bit and got the 32bit installed and running. I have a strong suspicion that install order/reboot might be the key....

Installed kodi - reboot - Installed plugin - shut down kodi - reboot - open kodi - enter credentials - restart kodi.

Initial attempt didn't recognize the credentials, but after shutting down and restarting kodi the credentials seem to have stuck.


RE: Spotify for Kodi - fastcolors - 2017-06-17

thanks for the great plugin,
I'm using it a lot on OSX and it works like a charm

but I can't seem to be able to make it work on Android... :-(

kodi 17.3 on android 6.0.1 - kernel Linux 3.14.29

CPU: Aarch64 (Amlogic?)

log file:
https://paste.ubuntu.com/24878757/

thanks in advance for the help

edit: forgot addon version 1.1.22

;-)


RE: Spotify for Kodi - gazzauk71 - 2017-06-17

Hi. Been using this plugin since its inception on an Android Librelec 8 system build from Kszaq. I think its the 32 bit build so that it maintains functionality with more Kodi addons at this time. I updated the spotify addon and noticed the connect extra's and it continued to work for a while. But, the latest version 1.1.22 seems to continually ask for credentials and the Browser question, which isn't easy in Libreelec. I did install the Chromium browser but couldn't get that to work in Kodi on Libreelec. I thought that this version 1.1.22 removed the need for the browser auth for Spotify?

I did create the username.cache file in Windows (Months ago) and use that previously, which works with this plugins old versions. So last night I uninstalled deleted all apps data relating to this spotify plugin and installed from scratch. Same issue again, continues to complain about credentials (which I checked elsewhere). I spent a few hours messing with it, but couldn't get any connection to spotify. So deleted the latest version and re-installed the base old versions 1.0.26 I think from the original repo's. Either way it returned the functions of the addon back and I was able to play tunes, search etc in spotify as before. I know its on borrowed time, but without a resolution in the newer addon, Im stuffed with Kodi and Spotify at this time....

Running on an Android S905X (2G/16GB) Libreelec community build Kodi 17.3 (LE 8.0.2B T1 from Kszaq)

Any help or ideas please?


RE: Spotify for Kodi - marcelveldt - 2017-06-17

(2017-06-17, 11:32)gazzauk71 Wrote: Any help or ideas please?

I know I keep asking this over and over to everyone but I will need the Kodi logfile.


RE: Spotify for Kodi - gazzauk71 - 2017-06-17

(2017-06-17, 13:50)marcelveldt Wrote:
(2017-06-17, 11:32)gazzauk71 Wrote: Any help or ideas please?

I know I keep asking this over and over to everyone but I will need the Kodi logfile.

I'll install the latest version and produce the kodi logs. Thanks.


RE: Spotify for Kodi - eusi - 2017-06-18

Hey,
I have to report 3 (more or less) issues:

----------------------------------------------------------------

Since 1.1.24 I am not able to login on Win10 (64bit) with latest Kodi.

"No credentials have been set or the login failed.
Please enter your credentials in the next settings dialog."

I haven't changed anything, so my login data should be correct Undecided

Not sure if this logs comes from spotify addon. While I open spotify and get the error, there is almost no logging besides this:
Code:
10:56:29.126 T:9864   ERROR: XFILE::CDirectory::GetDirectory - Error getting
10:56:45.327 T:15276   ERROR: Previous line repeats 3 times.
10:56:45.327 T:15276   ERROR: Control 55 in window 10502 has been asked to focus, but it can't
10:56:49.127 T:9864   ERROR: Unable to find plugin
10:56:49.127 T:15276   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://
10:56:49.127 T:15276   ERROR: CGUIMediaWindow::GetDirectory(plugin://) failed
10:56:50.307 T:15276 WARNING: XFILE::CFileFactory::CreateLoader - unsupported protocol(sources) in sources://music.tbn

----------------------------------------------------------------

Another issue: When I close Kodi, I get this error in my log (windows 10 64bit, didnt test it on libreelec etc.):
Code:
11:02:57.127 T:2088   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: cannot join thread before it is started
                                            Traceback (most recent call last):
                                              File "D:\Users\...\AppData\Roaming\Kodi\addons\plugin.audio.spotify\service.py", line 13, in <module>
                                                MainService()
                                              File "D:\Users\...\AppData\Roaming\Kodi\addons\plugin.audio.spotify\resources\lib\main_service.py", line 69, in __init__
                                                self.main_loop()
                                              File "D:\Users\...\AppData\Roaming\Kodi\addons\plugin.audio.spotify\resources\lib\main_service.py", line 112, in main_loop
                                                self.close()
                                              File "D:\Users\..\AppData\Roaming\Kodi\addons\plugin.audio.spotify\resources\lib\main_service.py", line 120, in close
                                                self.connect_daemon.stop()
                                              File "D:\Users\...\AppData\Roaming\Kodi\addons\plugin.audio.spotify\resources\lib\main_service.py", line 215, in stop
                                                self.join(0.5)
                                              File "D:\Programme\Kodi\system\python\Lib\threading.py", line 929, in join
                                                raise RuntimeError("cannot join thread before it is started")
                                            RuntimeError: cannot join thread before it is started
                                            -->End of Python script error report<--

----------------------------------------------------------------

And a 3rd "issue":
Whenever you update your addon, I need to update the cache-files on my ODROID (via Windows trick, because no browser on ODROID). This is not nice, but it is ok. However it is annoying that Kodi tells me every some less minutes that I need to "authorize this app on Spotify". When I hit "ok", the message disappears and appears some less minutes later again... At the end, I need to disable the addon or do the authorisation via windows trick (copy cache files), otherwise it is not possible to enjoy watching a moive with this popups Undecided


RE: Spotify for Kodi - seb937 - 2017-06-18

(2017-06-15, 02:12)marcelveldt Wrote:
(2017-06-15, 00:33)seb937 Wrote: I'm running into the same issue, I have LibreElec 8.0.2 and Spotify 1.1.19.
I can browse my library, but nothing will play. And after I clicked a song, Kodi freezes then crashes then restarts after about 1 min.

Can you try again with 1.1.20 and send me your log again if playback is still failing ?

Sorry, did not get the chance to test before today. Looks like everything is working perfectly on 1.1.24

Also, a quick question about Spotify Connect. From Kodi, I can launch palyback to other device and that works great. Do you plan on making Kodi seeable from other devices to control playback on Kodi from a phone for example?

Thanks again for your work!