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 - glk1001 - 2023-08-24

Could you possibly try the following in a Windows cmd box:

C:\Users\tegha\AppData\Roaming\Kodi\addons\plugin.audio.spotify\resources\lib\deps/spotty\windows\spotty.exe --cache C:\Users\tegha\AppData\Roaming\Kodi\userdata\addon_data\plugin.audio.spotify/spotty-cache --ap-port 54443 --verbose --enable-audio-cache --name temp-spotty --get-token --client-id 2eb96f9b37494be1824999d58028a305 --scope user-read-playback-state -u Xetec71 -p ****

replacing the '****' with your password.

What I found on Linux was if I used an incorrect username or password then spotty would give the error: "Failed to create session or connect to servers." Same as the error you're getting.
So we need to make sure your username and password are getting through to spotty correctly.


RE: Spotify for Kodi - glk1001 - 2023-08-24

OK, thanks, so all is well


RE: Spotify for Kodi - tehax - 2023-08-25

Hi glk1001,
i do not know why but with one of the latest Kodi v21 alpha from 23.08.2023 the titles do not play to the end. hey breake up and then the next title starts playing. I am aware of the alpha state but who knows.
Here a small cut from the log. Could it be Skin Helper Simplecache addon or WSGIRef ?
log


RE: Spotify for Kodi - glk1001 - 2023-08-26

Hmm, not sure about this one. The error is a socket timeout which is in the Python wsgiref server.

I tried a Kodi nightly build in a Ubuntu Docker container with the 1.3.5 plugin and it worked fine.

So is it a Windows issue, Kodi issue, or Python issue. Not sure. Is it consistently reproducible after a reboot?

Does the 1.3.0 plugin work with the same Kodi?


RE: Spotify for Kodi - glk1001 - 2023-08-26

I just tried 1.3.5 on a Windows 11 virtual machine with a Kodi nightly build and it also worked OK.

One possibility is the track duration. Long tracks causing a timeout. Does it work for you with shorter tracks?


RE: Spotify for Kodi - glk1001 - 2023-08-26

I've tried longer tracks with Kodi Nexus and 1.3.5 and it works OK.


RE: Spotify for Kodi - tehax - 2023-08-27

Ok, thanks. I will try a new installation.


RE: Spotify for Kodi - tehax - 2023-09-17

A bit late but i tried to install new kodi portable installation with same cache issue. I tried also your last v1.3.6.
I found out that when i delete "video player" in the from Spotify addon modified playercorefactory.xml the title plays complete to the end and without caching .

Edit: Please ignore, doesn't work either. Latest spotify version 1.2.3 from LdSz works and has not the cache issue.


RE: Spotify for Kodi - glk1001 - 2023-09-18

Unfortunately the "video player" setting in the modified "playercorefactory.xml" makes Kodi properly stream the file from Spotify. Without that setting, Kodi does not use streaming and downloads the file before starting to play it. That's why it was slow to start.

I've just added a new 'v1.3.6-experimental' version which uses a different web server to handle streaming. Can you try that. I think it is some network/web server issue. Strange it works OK with my Windows test. Maybe a windows setting. Anyway, if you can try the new version and let me know that would be good.

Also, if after the new version install you get strange errors or menu issues, then run 'Clear the plugin cache' menu item on the opening Spotify menu and restart Kodi.


RE: Spotify for Kodi - glk1001 - 2023-09-18

Also, I've added a much larger timeout in v1.3.6-experimental


RE: Spotify for Kodi - tehax - 2023-09-18

Thanks so far. Yes, it seems better. The pre loading (light grey bar) is very very slow but it seems to load until the end of the track. My network is DSL 50k. So that is not the issue. I use Neflix HD with no problems.


RE: Spotify for Kodi - glk1001 - 2023-09-18

And the "video player" setting is still set in the modified "playercorefactory.xml"?

Can you give me some of the log where it starts loading the track?


RE: Spotify for Kodi - tehax - 2023-09-18

Yes, Video player is set in PCF. Here ist complete debug log. Played some tracks. When i stoped playing i got a 30 sec. system freeze.
Log


RE: Spotify for Kodi - glk1001 - 2023-09-19

Hi,

I think I've narrowed down the problem with your setup. Looking at the log you gave me, it looks like your Kodi setup
is not buffering video and audio files. I've reproduced the problem on a Windows 10 box. If I use the 'advancedsettings.xml'
setting:

<advancedsettings version="1.0">
    <cache>
        <buffermode>3</buffermode>
    </cache>
</advancedsettings>

which means 'no buffering' I get the error you're getting. I added Curl debugging to kodi logging and I could see this:

Curl:: Debug - TEXT: Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds

just before the error:

CCurlFile::CReadState::XFILE::CCurlFile::CReadState::FillBuffer - (0x21ad0d588f0) Failed: Timeout was reached(28)

It seems when buffermode = 3, Kodi uses XCURL:: DllLibCurlGlobal to stream Spotify files. But if in 'advancedsettings.xml'
I use:

<advancedsettings version="1.0">
    <cache>
        <buffermode>1</buffermode>
    </cache>
</advancedsettings>

(buffer all internet filesystems), then Kodi uses CFileCache to stream Spotify files. And no error occurs.

So I'm wondering why your setup seems to have no buffering. And also, could you try buffering = 1 with the latest
v1.3.6 plugin and see if that works.

Sadly, I have no idea why 'no buffering' causes this problem.

Thanks.


RE: Spotify for Kodi - tehax - 2023-09-19

Hi,
thanks for trying to solve the issue. Buffermode made things worse. No playing to the title end possible. I use always portable mode. Could this being an issue?
Here is the log with buffermode 1.
log

Maybe script.module.simplecache is worth a try?