ceuk / spotui Goto Github PK
View Code? Open in Web Editor NEWSpotify in the terminal π»πΆ
License: MIT License
Spotify in the terminal π»πΆ
License: MIT License
Describe the bug
start_playback has it's context_uri and track_uri parameters reversed
they are now
def start_playback(self,
device_id,
track_uri=None,
context_uri=None,
offset=None):
but they should be
def start_playback(self,
device_id,
context_uri=None,
track_uri=None,
offset=None):
I set spotui up like the readme shows. It shows what song is playing and I can browse through my playlists etc. But I can't control the playback.
My Setup:
Describe the bug
Some non-Latin characters break the section delimiters and the artists list alignment, and other characters aren't displayed how they should, as shown in the screenshot.
To Reproduce
Search any title that has non-Latin characters and/or play any song to see the progress bar characters issues.
Screenshots
Here you can see how Japanese characters break the right delimiters of the current playlist section and also the artists list alignment. In the song's progress bar you can see how the bar ends aren't shown how they're supposed to (in the screenshot they're displayed as Ξ© and Ξ¦), along with the play and shuffle icons at the left of the current song title (in the screenshot they're displayed as Chinese characters).
Desktop
Additional context
This happens no matter what font I use for the terminal.
Describe the bug
When selecting "recently played" and nothing has yet been played (due to an inablility to play any tracks; I'm working on debugging it since it might actually be my fault, idk, if not, I'll submit a report shortly) the program craashes with the a TypeError.
β― python3 spotui
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "spotui/__main__.py", line 10, in <module>
main()
File "spotui/__main__.py", line 6, in main
SpoTUI = curses.wrapper(App)
File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/ui.py", line 8, in __init__
self.main_form = MainForm(stdscr)
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/MainForm.py", line 98, in __init__
key)
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/LibraryMenu.py", line 61, in receive_input
self.items[self.component.selected]["handler"]()
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/LibraryMenu.py", line 54, in __select_recent_tracks
"Recently Played")
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/MainForm.py", line 123, in change_tracklist
self.components[0].update_tracks(tracks, title)
File "/home/user/.local/lib/python3.5/site-packages/spotui/src/TracksMenu.py", line 30, in update_tracks
self.items = list(map(self.__map_tracks, tracks))
TypeError: 'NoneType' object is not iterable
To Reproduce
Steps to reproduce the behavior:
python3 spotui
in ~/.local/lib/python3.5/site-packages
Expected behavior
The program should fail gracefully.
Desktop (please complete the following information):
Additional context
I think that covers it.
Since SpoTUI doesn't support it, is there good alternative?
Using the existing patterns in config.py and colors.py implement a new config section: "theme" that allows users to define the terminal color using the ncurses constant names. These config values should be plugged into colors.py (replacing the hardcoded values) if they are present.
e.g.
[theme]
progress_bar_fg = "COLOR_GREEN"
progress_bar_bg = "COLOR_BLACK"
border_fg = "COLOR_WHITE"
border_bg = "COLOR_BLACK"
border_active_fg = "COLOR_YELLOW"
# ...etc
We will also need to define a set of themeable colors as currently the colors file and use thereof isn't very organised (Basically, we need to make sure that we have a pair defined for each semantic UI element: e.g. progress bar etc - and that we update the pairs being used by these elements accordingly)
Describe the bug
spotui will exit with a Traceback if you hit enter in the devices popup and there are no active devices.
To Reproduce
Steps to reproduce the behavior:
d
to open devices popupEnter
Expected behavior
I would expect the empty box to close without attempting to make a selection if there are no devices to choose from, i.e. it should behave like hitting Escape when there aren't active devices.
Desktop:
β ~ uname -a
Linux backlog 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
β ~ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Additional context
Hit enter after this point:
Traceback:
β ~ spotui
Traceback (most recent call last):
File "/home/trey/.local/bin/spotui", line 11, in <module>
sys.exit(main())
File "/home/trey/.local/lib/python3.5/site-packages/spotui/__main__.py", line 6, in main
SpoTUI = curses.wrapper(App)
File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/home/trey/.local/lib/python3.5/site-packages/spotui/src/ui.py", line 8, in __init__
self.main_form = MainForm(stdscr)
File "/home/trey/.local/lib/python3.5/site-packages/spotui/src/MainForm.py", line 88, in __init__
self.popup.receive_input(key)
File "/home/trey/.local/lib/python3.5/site-packages/spotui/src/DeviceMenu.py", line 49, in receive_input
self.items[self.component.selected]["handler"]()
IndexError: list index out of range
The version of Spotipy on PyPi is outdated and I'm not sure how to specify the Github version as a dependency in my Pipfile so that it will automatically be installed when running pip install on Spotui.
I'm sure there's a way, it's just down to my inexperience with Python dependency management. I'll leave this issue open in case anyone can provide some assistance while I figure it out.
Occasionally the search box UI will close itself but user input will continue to be directed to the now invisible text box.
This is likely due to one of the following:
Describe the bug
My play button is changing to Chinese character, and the progress bar is not working
ο€ο¦ Afterglow - Ed Sheeran 02:22/03:05
ξΆββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ξ΄
Currently using latest version of Linux Mint.
Is your feature request related to a problem? Please describe.
Only around 52 playlists are visible, out of the 80+
Describe the solution you'd like
Either list all playlists in a flattened directory, or integrate with spotify-folder to provide a better view.
Describe alternatives you've considered
I've migrated to spotui from spotify-tui (even though I prefer the arrow nav from *-tui) simply because this is python and I don't know rust π
this way I can help contribute.
Additional context
for smaller screens, scrolling name of playlists, songs & artists would be very beneficial as well, since there are a lot of songs with naming schemas such as mihoy remix - Renegade: <song name>
and in smaller screens the user simply gets mihoy remix - Renega...
I'd also like to help where I can towards theming, as this is what mine looks like at the moment:
Describe the bug
Spotui crashes after configuring and providing the 'broken link'
To Reproduce
.spotuirc
Stack trace
Traceback (most recent call last):
File "/usr/bin/spotui", line 6, in <module>
from spotui.__main__ import main
File "/usr/lib/python3.8/site-packages/spotui/__main__.py", line 2, in <module>
from spotui.src.ui import App
File "/usr/lib/python3.8/site-packages/spotui/src/ui.py", line 1, in <module>
from spotui.src.MainForm import MainForm
File "/usr/lib/python3.8/site-packages/spotui/src/MainForm.py", line 4, in <module>
from spotui.src.spotifyApi import SpotifyApi
File "/usr/lib/python3.8/site-packages/spotui/src/spotifyApi.py", line 220, in <module>
client = SpotifyApi()
File "/usr/lib/python3.8/site-packages/spotui/src/spotifyApi.py", line 10, in __init__
self.auth()
File "/usr/lib/python3.8/site-packages/spotui/src/spotifyApi.py", line 19, in auth
self.token = util.prompt_for_user_token(
File "/usr/lib/python3.8/site-packages/spotipy/util.py", line 86, in prompt_for_user_token
token_info = sp_oauth.get_access_token(code)
File "/usr/lib/python3.8/site-packages/spotipy/oauth2.py", line 217, in get_access_token
raise SpotifyOauthError(response.reason)
spotipy.oauth2.SpotifyOauthError: Bad Request
Describe the bug
Okay, I have no idea what I'm getting wrong, but I can't play any tracks. This might have to do with my system since it's ChromeOS, but I really don't know. Linux is supposed to be able to interface with the sound.
Works: fetching playlists, songs, top tracks, etc. Search. All keybindings, etc.
Doesn't work: Showing/selecting devices (I have both the official PWA and spotifyd running), detecting if another client is playing a song (always says "nothing is playing", despite songs playing on web client or phone), and playing songs. The bind to start a track is Enter, right?
To Reproduce
Steps to reproduce the behavior:
I followed the instructions in the README with exactness. Like I said before, this could just be my system.
Expected behavior
Being able to play tracks.
Screenshots
I had a song playing then, via the PWA.
Yes, I did have spotifyd running right then. I used ps -aux
to check.
Desktop (please complete the following information):
Chromebook C330
Additional context
Does spotifyd require configuration?
If this is just a problem with my system, could someone maybe reproduce and try to figure it out? I understand if you don't have a Chromebook, but this is just frustrating.
I don't know if this is because of the shell I'm using or not. My default shell is FISH. I suspect this is due to differences in how Unicode is handled. After submitting this, I'll check if Bash has the same error.
(PS - this is rad and I love it)
OS: Manjaro Linux
Kernel: 5.4.13-3-MANJARO
Shell: fish 3.0.2
Terminal: cool-retro-term (also happens in Konsole)
EDIT: Also happens in Bash. Not shell dependent, and not terminal dependent
Describe the bug
I'm not able to see version and upgrade it. There is no documentation about it.
I recommend to improve the README file.
To Reproduce
Steps to reproduce the behavior:
spotui -v | --version
Expected behavior
See version
Desktop (please complete the following information):
Describe the bug
When a track title is long enough that it gets cut off, the artist's name is shifted one column.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
All artist's names should line up.
Screenshots
See the second-to bottom's artist name is shifted one column.
Desktop (please complete the following information):
0.1.10
When text is truncated it should automatically scroll left and right on an interval.
E.g. given the text "Never gonna give you up - Rick Astley"
You would move the truncation offset about 1 character every 500ms until the end is reached (at which point it should reverse).
There should also be a short delay (2 seconds or so) when the truncation offset reaches 0 again.
e.g. (the bar represents the truncation)
Never gonna give you up - Rick Astley
| ---------------- |
rendered: Never gonna give...
~500ms later:
Never gonna give you up - Rick Astley
| ---------------- |
rendered: ever gonna give ...
~500ms later:
Never gonna give you up - Rick Astley
| ---------------- |
rendered: ver gonna give y...
... etc
Just started spotifyd
, got this new error:
Traceback (most recent call last):
File "spotui", line 8, in <module>
sys.exit(main())
File "/home/harrison/.local/lib/python3.8/site-packages/spotui/__main__.py", line 6, in main
SpoTUI = curses.wrapper(App)
File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/home/harrison/.local/lib/python3.8/site-packages/spotui/src/ui.py", line 8, in __init__
self.main_form = MainForm(stdscr)
File "/home/harrison/.local/lib/python3.8/site-packages/spotui/src/MainForm.py", line 51, in __init__
PlaylistMenu(stdscr, self.api, self.change_tracklist),
File "/home/harrison/.local/lib/python3.8/site-packages/spotui/src/PlaylistMenu.py", line 15, in __init__
self.restart()
File "/home/harrison/.local/lib/python3.8/site-packages/spotui/src/PlaylistMenu.py", line 26, in restart
list(map(self.__map_playlists, self.items)),
TypeError: 'NoneType' object is not iterable
Error persists eve after stopping spotifyd
and/or un-and re-installing spotui
library.
Desktop:
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
Btw, Windows should install windows-curses
or it will show no module named '_curses'
Describe the bug
When spotui is launched, it does run, show songs, navigation works as well
But when the song is played, it doesn't play
It looks as if no keys have been pressed.
To Reproduce
Steps to reproduce the behavior:
I do not have any ideas. As far as I can see, there are no logs, nothing. It just decides to stop working.
Expected behavior
Play/Pause, Next/Previous commands should work
Desktop (please complete the following information):
This is a list I compiled from small things I noticed don't quite work, or features from other TUI clients that can be imported with relative ease. None of this is final, but for other devs seeing this, if you know how to do one, please comment or send a PR.
βββββββββββββββββββββ
β todo
βββββββββββββββββββββ
nav not intuitive: tab changes panels, LR changes seekbar, UD changes cursor
play/pause icons are inverted from what spotify has
doesn't make sense to keep the icon there since' it's not clickable
replace the icon with a loader (braille 4-sq spinner) when playing
exit search with [esc]
no padding above and below the entire app
if "nothing is playing" is perma-visible, shouldn't search also be?
0:0/0:0 probably shouldn't be visible if nothing is playing
remove play bar, center "nothing is playing" vertically with the color of bar
use elipsis character β¦ to squeeze one more letter out of long names
open modal with keybinds on ?
horizontal scroll of text on long names if hovered - tracked in #23
https://www.youtube.com/watch?v=FGcZeVDWXR0
playlists capped at 50 shouldn't be a thing
playlist folders - tracked in #21
https://github.com/mikez/spotify-folders
currently playing
https://www.fileformat.info/info/unicode/block/braille_patterns/images.htm
https://www.npmjs.com/package/cli-spinners
arrow navigation for panels
this will require two colors for borders: hovered & selected
make playlist screen wider if focused?
migrate next big version to blessings?
https://github.com/erikrose/blessings
remove delay from esc when closing popups
https://stackoverflow.com/questions/27372068/why-does-the-escape-key-have-a-delay-in-python-curses
remove esc as a method to close the app. (spamming esc to close menus)
quick actions menu for those still learning/not wanting to learn keybinds
ie: if cursor is on playlist, show playlist actions
more steps in seekbar so it doesn't feel as jumpy, replace β with curses " " + bg color
7 steps: βββββββ
2 steps: β β Ά
, β‘β‘·
, β‘β£Ώ
, β‘β£
βββββββββββββββββββββ
β done
βββββββββββββββββββββ
custom colors + theme engine - tracked in #22
instead, check if xterm256, and then use a custom color profile
current device icon
Currently, podcasts (shows) appear in search results. The logic to handle playing a show, setting the context etc just needs implementing. Feel free to π this issue to pressure me to get this done π
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.