Kodi Community Forum

Full Version: [RELEASE] Spotimc: Another Spotify music addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was able to compile the ARM libspotify.so intended for Android on debian stretch, with aarch64 architecture. Spotimc is installed and configured in Kodi Jarvis stock build. Despite making a number of directories with the architecture name, spotimc cannot find libspotify.so. Is there a way to force spotimc to find a specific directory containing libspotify.so or modify the script to find it? Apologies if I missed the answer in this giant thread.


19:45:57 T:546909482784 WARNING: CPythonInvoker(3): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
19:46:28 T:546909482784 ERROR: Traceback (most recent call last):
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/spotimcgui/main.py", line 509, in main
19:46:28 T:546909482784 ERROR: gui_main(__addon_path__)
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/spotimcgui/main.py", line 393, in gui_main
19:46:28 T:546909482784 ERROR: initially_unload_playlists=False,
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/spotify/session.py", line 310, in __init__
19:46:28 T:546909482784 ERROR: err = self.__session_interface.create(ctypes.byref(config), ctypes.byref(self.__session_struct))
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/session.py", line 129, in create
19:46:28 T:546909482784 ERROR: ctypes.POINTER(config), ctypes.POINTER(ctypes.c_void_p)
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 73, in _get_func
19:46:28 T:546909482784 ERROR: lib = self.get_library()
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 66, in get_library
19:46:28 T:546909482784 ERROR: self.__library = self._load_library()
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 91, in _load_library
19:46:28 T:546909482784 ERROR: return ll.load('libspotify')
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 189, in load
19:46:28 T:546909482784 ERROR: _library_cache[name] = self._load(name)
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 183, in _load
19:46:28 T:546909482784 ERROR: return self._load_from_sys_path(loader, name)
19:46:28 T:546909482784 ERROR: File "/home/noah/.kodi/addons/script.audio.spotimc/resources/libs/pyspotify-ctypes/src/_spotify/__init__.py", line 165, in _load_from_sys_path
19:46:28 T:546909482784 ERROR: raise OSError("Unable to find '%s'" % name)
19:46:28 T:546909482784 ERROR: OSError: Unable to find 'libspotify'
19:46:28 T:546909482784 ERROR: Exception
19:46:28 T:546909482784 ERROR: OSError
19:46:28 T:546909482784 ERROR: :
19:46:28 T:546909482784 ERROR: OSError("Unable to find 'libspotify'",)
19:46:28 T:546909482784 ERROR: in
19:46:28 T:546909482784 ERROR: <bound method ?.? of <spotify.session.Session instance at 0x7f552d1d40>>
19:46:28 T:546909482784 ERROR: ignored
(2016-05-06, 21:51)superstream Wrote: [ -> ]I was able to compile the ARM libspotify.so intended for Android on debian stretch, with aarch64 architecture. Spotimc is installed and configured in Kodi Jarvis stock build. Despite making a number of directories with the architecture name, spotimc cannot find libspotify.so. Is there a way to force spotimc to find a specific directory containing libspotify.so or modify the script to find it? Apologies if I missed the answer in this giant thread.

Great stuff you compiled the libspotify for aarch64. That should also work on nvidia shield, right ?
Would it be possible for you to send me your compiled version ? In that case I can fix support for it in my spotify addon for you.
If you want to use it in spotimc, you will have to modify the code. If I recall correctly there's a method in one of the helper classes to detect the system's architecture and set the correct path to the libspotify library.
2 tar files for you here, 1 with the full dir used for compiling & 1 with libspotify.so (as compiled on aarch64) only:

http://hq.fsn.net/spotify/

If you need more, please ask.

Please modify spotimc to include aarch64 architecture if possible. I tried to put the libspotify.so into ~/.kodi/...../linux/aarch64/libspotify.so but it did not work. Also I copied libspotify.so (android arm64) to all of the architecture directories and made up a couple of others (arm64, aarch64, arm) and no luck.

Looking forward to using your coveted script. I'm on a aarch64 development board running debian stretch.

Edit: I assume it will work with anything arm64 or aarch64, so it should be fine for Nvidia Shield's octo core cortex. I have a development board with the same and will test it once ready.



Regards -
(2016-05-07, 06:39)superstream Wrote: [ -> ]2 tar files for you here, 1 with the full dir used for compiling & 1 with libspotify.so (as compiled on aarch64) only:

Thanks but the link doesn't work. Possible to send me an updated link (may as well be through PM if you prefer) ?
Apologies, here it is on a more reliable server:

https://drive.google.com/folderview?id=0...sp=sharing
(2016-05-08, 22:48)superstream Wrote: [ -> ]Apologies, here it is on a more reliable server:

Thanks, this link worked :-)

I have integrated your compiled version for aarch64 on android into my spotify addon (not yet in spotimc).
Can you please test it with my spotify addon to see if it works ?

https://github.com/marcelveldt/plugin.au...master.zip

I did a little guessing for the platform detection. If it fails on your setup, please have a look at utils.py in the resources directory, around line 124

If it works in my addon I can also make the changes to the spotimc addon if you like.
Hi marcelveldt -

For clarity / reference, I compiled the Android / ARM64 libspotify on Debian Stretch running a 4.4.8 linux kernel, using a aarch64 CPU (not Android).

Today I removed all references to spotify & spotimc from kodi, then installed your zip file as an add-on. It successfully installed, but shows there is an update available. I tried both with & without the update.

Once installed, I added my premium account information. However, the spotify plugin did not launch the browser to authenticate. I was using midori. Then I installed chromium and it finally launched and successfully authenticated.

I see these new files here:

./addons/plugin.audio.spotify-master/resources/dlls/android/aarch64/libspotify.so.12.1.51
./addons/plugin.audio.spotify-master/resources/dlls/android/aarch64/libspotify.so
./addons/plugin.audio.spotify-master/resources/dlls/android/aarch64/libspotify.so.12

I do not see a new aarch64 directory here:

./addons/plugin.audio.spotify-master/resources/dlls/linux/*

So I created one and copied the files from android/aarch64/ to /dlls/linux/aarch64/.

I see around line 124 in utils.py, that kodi is trying to identify the architecture, but my guess is that the directory is still off.

I successfully authenticated with accounts.spotify but get a blank box "Login error:" pop-up after a few minutes of waiting.

Here's the logs:

14:15:43 T:546459086624 NOTICE: Spotify --> Your platform (aarch64 System.Platform.Linux)
14:15:43 T:546459086624 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.OSError'>
Error Contents: This platform is not supported (aarch64 System.Platform.Linux)
Traceback (most recent call last):
File "/home/noah/.kodi/addons/plugin.audio.spotify-master/spotifyservice.py", line 3, in <module>
import resources.playbackservice as service
File "/home/noah/.kodi/addons/plugin.audio.spotify-master/resources/playbackservice.py", line 9, in <module>
load_all_libraries()
File "/home/noah/.kodi/addons/plugin.audio.spotify-master/resources/utils.py", line 83, in load_all_libraries
add_native_libraries()
File "/home/noah/.kodi/addons/plugin.audio.spotify-master/resources/utils.py", line 112, in add_native_libraries
raise OSError('This platform is not supported (%s %s)' % (architecture, platform))
OSError: This platform is not supported (aarch64 System.Platform.Linux)
-->End of Python script error report<--
(2016-05-10, 16:30)superstream Wrote: [ -> ]I see around line 124 in utils.py, that kodi is trying to identify the architecture, but my guess is that the directory is still off.
I successfully authenticated with accounts.spotify but get a blank box "Login error:" pop-up after a few minutes of waiting.

Ah okay, sorry that's my bad. My understanding was that you were actually on the android platform.
I will post a new version in a few hours.
Hi Marcelveldt -

Any luck with incorporating it into Kodi for Debian?

Thanks -
(2016-05-25, 01:48)superstream Wrote: [ -> ]Hi Marcelveldt -

Any luck with incorporating it into Kodi for Debian?

Thanks -

Sorry, forgot to reply. A new version of my own spotify addon is available. Can you test with that ?

http://www.mb3admin.com/downloads/addons...1.0.15.zip
fantastic addon, but for the life of me i cant find out or work out where to set playlist to shuffle, anyoneHuhHuh
(2016-06-18, 23:28)Ruckus Wrote: [ -> ]fantastic addon, but for the life of me i cant find out or work out where to set playlist to shuffle, anyoneHuhHuh

You can do that in Kodi itself. When you start the playback you can enable random/shuffle in the Kodi OSD.
Hello, my first post here, and a request if there is someone willing to do this little feat.

First of all, thanks for a great software, got it set up and running just fine. The problem is, I'm running kodi on rpi3, embedded to my old BMW 325 oem navigator screen, wich is small 4:3 and very low resolution. I can navigate in it, but text is pretty much unreadable at this point. so my request is, if someone could do little editing to the spotimc skin or tell me the steps to make them myself. I'll attach few pictures to what I need to make it usable for the car

Link to the changes

Thanks in advance.
works on android box?
Love the spotmic addy but it does not work on Kodi krypton any updates