marcdjulien / spotify-terminal Goto Github PK
View Code? Open in Web Editor NEWTerminal application to play/control Spotify.
License: GNU General Public License v3.0
Terminal application to play/control Spotify.
License: GNU General Public License v3.0
Erase is control-H (^H).
/ /_ ____ / /(/ ____ __
__ / __ / __ / / / // / / /
/ / // / // / // / __/ // /
// ./_/_/// _, /
// //
______ _ __
/ _____ _________ ___ ()__ ____ / /
/ / / _ / / __ __ \/ / __ \/ __
/ /
/ / / __/ / / / / / / / / / / / // / /
// __// // // //// //_,/_/
[marcdjulien]
Loading...
v0.15.2
Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /home/user1/.Xauthority which is owned by user1.)
I think it is trying to open default borwser but it is not opening also i have tried to install it in termux there also its not working
cann't we use 'xdg-open' there.
Traceback (most recent call last):
File "./spotify.py", line 58, in <module>
display.start()
File "/home/mjulien2/spotifyterminal/display.py", line 118, in start
self.render()
File "/home/mjulien2/spotifyterminal/display.py", line 180, in render
self.render_footer()
File "/home/mjulien2/spotifyterminal/display.py", line 277, in render_footer
text = self.state.current_menu.get_current_list_entry().str(self._cols)
AttributeError: 'NoneType' object has no attribute 'str'
The application isn't robust to starting if a player isn't open. Come up with a way to start the player.
Potential solutions:
Implement the save tracks API endpoint and add a hotkey for it.
Is their any way to sort the playlist song order, such as date added? All my new songs added are all the way at the bottom.
Disk cache: Should delete items after a certain time limit. Default is 6 days (will automatically refresh discover weekly playlist), can be configurable.
Memory cache: Should limit to 100MB, can be configurable (need to actually profile memory usage first).
Also a command to clear cache items without having to restart.
you should register the application to use a non-root required port number, like 8000, for the first authentication :)
The Spotify API does not treat the Saved tracks like other playlists. Since there is no context for the playlist only one track will play.
Add this feature. Also warn about duplicate tracks when adding.
Do the same thing for Saved Tracks. Send a list of uris from the Artist view.
I have issue with device searching.
When I startup the spotify client, everything works fine... It will load up and show my playlists, etc.
But when I hit play, the messege show up: No device is selected! Press W to open devices menu.
So I press W and new "window" pop up with searching with no response, it just freezes.
When there is no selected player device, the program should automatically choose one.
When highlighting a Track you can use the goto_artist
hotkey to go directly to the artist. Currently, this just goes to the first artist. Allow the user to select which artist to go to in the pop-up menu.
Context:
Some artists have a ton of singles, which makes it annoying to listen to all of their tracks back to back.
Create a special context that expands all tracks into a single track list. This can be triggered by hitting TAB (In the future it will be a custom hotkey).
Similar to #17 add the ability to save tracks to a certain play list. Workflow:
Also add the ability to create a new playlist.
Resizing does not work. Users have to restart the application to fix UI issues.
There are no tests!
I installed with pip install spotify-terminal
on my Raspberry Pi Linux raspberrypi 5.10.92+ #1514 Mon Jan 17 17:35:21 GMT 2022 armv6l GNU/Linux
Python 3.9.2, pip 20.3.4
I then closed and reopened my terminal and ran spotify-terminal.py -u xxxxx
(user ID) and received this output:
... ASCII art ...
v0.15.3
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/spotify_terminal/authentication.py", line 67, in show_link
if web_thread.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'
Is there a way to browse through the albums and artists I've liked in Spotify? It looks like I can only really see my liked songs and playlists.
Right now the default market is US. Use the "country" parameter from the account.
Allow users to specify hotkeys in a configuration fie.
Example:
play_next: ">"
play_prev: "<"
to_artist: "D"
to_album: "S"
show_devices: "W"
sync_player: "R"
play_pause: " "
find_next: "n"
find_prev: "p"
volume_[1-10]: "1-0"
volume_mute: "~"
add_track: "P"
Entries can either be ascii (in quotes) or raw key code:
add_track: 60
Show all possible actions from any given state.
Not sure if this is worth since a Help menu was added.
There's no outgoing transition. Add it.
Make this easier to install.
get this error when trying to run it on an iMac G4.
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/spotify-terminal.py", line 4, in
import('pkg_resources').run_script('spotify-terminal==0.15.2', 'spotify-terminal.py')
File "/Users/Mac/Library/Python/3.8/lib/python/site-packages/pkg_resources/init.py", line 651, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/Users/Mac/Library/Python/3.8/lib/python/site-packages/pkg_resources/init.py", line 1448, in run_script
exec(code, namespace, namespace)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/EGG-INFO/scripts/spotify-terminal.py", line 5, in
main()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/spotify_terminal/main.py", line 97, in main
api = ApiClass(args.username, args.use_cache)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/spotify_terminal/api.py", line 124, in init
self.auth = Authenticator(username)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/spotify_terminal/authentication.py", line 46, in init
self._init()
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/spotify_terminal/authentication.py", line 109, in _init
line = "".join([
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/spotify_terminal-0.15.2-py3.8.egg/spotify_terminal/authentication.py", line 110, in
chr(i-1993) for i in struct.unpack("64I", f.readline())
ValueError: chr() arg not in range(0x110000)
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Add the ability to open the current song information in a browser.
The SpotifyState would be a lot cleaner is it was a ... state machine.
See what non-premium users are able to do.
All player functions (pause, play, next, volume ,etc) don't work for non-premium users. See if there's a way around this through another API.
Unfortunately, the spotilocal API has been deprecated.
If there is no track currently playing and you command one of the goto_ commands you get a KeyError.
Make searching start with quotes.
Instead of #nine inch nails
use "nine inch nails"
. End quotes are optional.
Add the ability to queue songs.
Queue'ing through the API is not yet supported: spotify/web-api#462
The API often loses track of the current device. The application should save the last device and supply that to the play endpoint.
Additionally, allow a user to select from a list of known devices.
It's great not to have to leave my terminal / tmux session yet still be able to control spotify, however I notice very high CPU (around 60%) reported from htop for spotify.py, even when no playback is occurring.
This is on a 2016 macbook pro 2.9 GHz Intel Core i7 / 16GB ram, so I would not say it's under-spec'ed. Is anyone else seeing / reported this issue?
When trying to see the list of devices (W), the list is never able to load. I'm running this on a fairly minimal fedora system so maybe there are some unlisted dependencies. I haven't looked through the source yet.
The application opens a browser to complete authentication. After this is complete it's still possible for the browser to output log messages to the screen which ruins the curses display.
Find a way to suppress or clear this output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.