georgehj / albumart-ueber Goto Github PK
View Code? Open in Web Editor NEWA little mpd + bash script for viewing album artwork in the terminal.
License: GNU General Public License v3.0
A little mpd + bash script for viewing album artwork in the terminal.
License: GNU General Public License v3.0
The script does not work with Python 3.9, ueberzug returns
Task exception was never retrieved
future: <Task finished name='Task-7' coro=<shutdown() done, defined at /usr/lib/python3.9/site-packages/ueberzug/layer.py:88> exception=AttributeError("type object '_asyncio.Task' has no attribute 'all_tasks'")>
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/ueberzug/layer.py", line 89, in shutdown
tasks = [task for task in asyncio.Task.all_tasks()
AttributeError: type object '_asyncio.Task' has no attribute 'all_tasks'
Where there are duplicates such as folder.jpg and folder(1).jpg, find
will match both.
Consider using head
to limit the matches to one or using find
with the -quit
option.
Currently the function will wait before first checking to see if mpd
is running.
Test changing the order of operations within the function.
mpd_check() {
# wait until mpd is running
while true; do
sleep 1
if mpc -q 2</dev/null; then
break
fi
done
}
Refreshing on a keypress of r
is preferable to quitting and reopening.
Variable names are inconsistently cased.
Fix in line with current recommendations following bash
library deprecation.
Currently the tmpimgfile logic is firing on every track change regardless of whether the album changes.
Logically, there could be two states: where the file is different and where it isn't. In which case could only change when the art is different.
Currently the script uses two hard coded paths for the music directory and the pictures directory.
$XDG_DATA_HOME
to store collateral like no-art.png
?Functions are inconsistently named and reading order could be improved.
We don't need output from grep.
mpd
's music_dir
can't be printed with mpc
.
The following should be better explained:
mpc
will give file paths which are absolute but start under mpd
's set music directoryTo avoid confusion consider doing the following:
music_dir
tmpimgfile_old isn't being used. Delete it.
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.