-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ToDos - unify and conditionalize file write #3
base: master
Are you sure you want to change the base?
Implement ToDos - unify and conditionalize file write #3
Conversation
…onal to improve performance, add limited/partial Windows support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried out the PR...
mixxx-now-playing.sh
Outdated
|
||
FormatAndWriteTitle(){ | ||
currentTitle=$( | ||
echo "$1" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this echo breaks the song title resulting in no output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed how this works, now using a regex to extract the track title, but it still uses an echo to feed the pipe. It works fine on my GNU Bash, what environment are you running it in?
mixxx-now-playing.sh
Outdated
cut -d\| -f1 | | ||
sed 's/,/ -/' | | ||
awk '{ print tolower($0) }' | | ||
ascii2uni -aU -q| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't work with some characters such as in
V ∴ V ∴ V (Headless Horseman Remix),
¿Can You Hear Me?
when a song title with these characters show up sed barfs with "sed: RE error: illegal byte sequence"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's interesting, the sed line has not been altered from the original and clearly works for Viktor, and also works fine for me (on Windows under GNU Bash).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a change to move the unicode conversion much earlier in the flow, which will hopefully fix the issues you're seeing. Unfortunately, I don't have an environment where I can test it, so it's a blind change.
…acted from window title to use a regex to be more easily adapted to other tools besides Mixxx
… updating doc some more
…ixing some of the encoding issues
if [ $OS == "Linux" ]; then | ||
xdotool search --name "\| Mixxx" getwindowname | | ||
cut -d\| -f1 | | ||
quartzListAllWindows=$'import Quartz\nprint(Quartz.CGWindowListCopyWindowInfo(Quartz.kCGWindowListExcludeDesktopElements|Quartz.kCGWindowListOptionAll,Quartz.kCGNullWindowID))' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better than quartz...db query, the db path will be different for windows/whatever for mac:
sqlite3 ~/Library/Application\ Support/Mixxx/mixxxdb.sqlite "select library.artist, library.title, library.year from library where library.id = (select PlaylistTracks.track_id from PlaylistTracks where id = (select max(id) from PlaylistTracks));"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was forced to figure this out as quartz was causing mixxx to freeze for me at random for who knows why, my setup is "quirky"
Functionize logic, unify writing to output file, make writing conditional to improve performance, add limited/partial Windows support