leon icon indicating copy to clipboard operation
leon copied to clipboard

Spotify Package

Open Zeikko opened this issue 5 years ago • 11 comments

Feature Use Case

  • Play a song
  • Play an album
  • Play songs of an artist
  • Stop music
  • Resume music
  • Set volume
  • Tell what are we listening to
# Example
--> Leon, play The Fat Rat
<-- Ok, playing the calling by TheFatRat

Feature Proposal

Implement a feature to use the Spotify web API to find the music that the use is looking for and play with a device that is available through the API.

Zeikko avatar Mar 24 '19 17:03 Zeikko

Hi @Zeikko , I have some worked on this package https://github.com/jtorresdev/leonify

jtorresdev avatar Mar 24 '19 17:03 jtorresdev

Cool! Great work @jtorresdev ! I just tried it out and got this error: ✖ The "Leonify" package configuration file does not exist. Try to pull the project (git pull) when running npm install in leon root. Also the dependencies of leonify are missing so I get this when trying to play a song:

✖ Traceback (most recent call last):
  File "bridges/python/main.py", line 23, in <module>
    main()
  File "bridges/python/main.py", line 18, in main
    m = import_module('packages.' + package + '.' + module)
  File "/home/zeikko/Documents/Projects/leon/bridges/python/.venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "./packages/leonify/play.py", line 3, in <module>
    from .leonify import getDeviceId, sp_request, getCurrentSong
  File "./packages/leonify/leonify.py", line 10, in <module>
    import six
ModuleNotFoundError: No module named 'six'

Zeikko avatar Mar 24 '19 18:03 Zeikko

try installing six module pip install six

jtorresdev avatar Mar 24 '19 19:03 jtorresdev

Hello @Zeikko,

Thanks for suggesting! A while ago I planned to create a Music package containing a Spotify module as you can see on the roadmap. But depending how Leon will evolve until there, maybe a Spotify package will be more appropriate, let's see.

@jtorresdev it looks awesome! 👏

louistiti avatar Mar 25 '19 00:03 louistiti

Why not an mpd client on Leon and users can configure their own sources from there as well?

nrj5k avatar Mar 26 '19 15:03 nrj5k

Hello @nrj5k,

It is an interesting idea. But for now I prefer to minimize the type of clients. However, that's something we could implement directly on the top of the existing client.

louistiti avatar Mar 27 '19 00:03 louistiti

I like the sound of that.

nrj5k avatar Mar 27 '19 01:03 nrj5k

Today the web app client is a simple messaging interface, but later we could imagine that will be a bit more complex than that with cool features 😃

louistiti avatar Mar 27 '19 01:03 louistiti

Could I contribute to this issue?

rachel-l-sanchez avatar Aug 01 '22 02:08 rachel-l-sanchez

Could I contribute to this issue?

Sure! But I suggest to wait a bit until the official release as the whole core of Leon is being rewritten and several breaking changes will take place. In the meantime, you can join us on Discord. Once the stable version shipped, we'll all be working together on creating new skills for Leon.

louistiti avatar Aug 01 '22 15:08 louistiti