Comments (6)
Could you paste two complete outputs with that difference?
We could look what we need to change in that script.
from polybar-scripts.
Thank you for the quick reply. Three outputs, one for each case :)
Working output (complete):
$ cmus-remote -Q 2 "$info" | grep position | awk -F\ '{print $2}'
28
$ cmus-remote -Q 2 "$info"
...
duration 240
position 38
tag artist Brian Hogan
tag album 26 Days
tag title Put It In Drive
tag date 2011
tag tracknumber 3
tag comment Recorded in February 2011 for the RPM Challenge. All songs copyright 2011 Brian P. Hogan.
set aaa_mode all
set continue trueset play_library true
set play_sorted false
set replaygain disabled
set replaygain_limit true
set replaygain_preamp 0.000000
set repeat false
set repeat_current false
set shuffle false
set softvol false
set vol_left 20
set vol_right 20
Partially working output (shows artist):
$ cmus-remote -Q 2 "$info" | grep position | awk -F\ '{print $2}'6
$ cmus-remote -Q 2 "$info"
status paused
duration 159
position 6
tag artist bella coola
tag album Light Years To Be Lonely
tag title Light Years to Be Lonely
tag date 2007
tag genre FOLK: Folk Blues
tag tracknumber 1
tag albumartist Bella Coola
tag composer Angelika Antalova / Angelica Antaltag comment Bella Coola is a Canadian singer/songwriter and guitarist currently based in Central Europe. She enjoys writing and collaborating with international artists and is currently involved in many diverse musical projects. Smokey, understated vocals and percussive guitar playing inform most of her songs on this debut EP. All of her songs from Light Years To Be Lonely were conceived in the previous century when she was still residing in British Columbia. All songs are available as digital downloads.
tag replaygain_track_gain -9.2 dB
set aaa_mode all
set continue false
set play_library true
set play_sorted false
set replaygain disabled
set replaygain_limit true
set replaygain_preamp 0.000000
set repeat false
set repeat_current false
set shuffle false
set softvol false
set vol_left 20
set vol_right 20
Broken output (shows file path):
$ cmus-remote -Q 2 "$info" | grep position | awk -F\ '{print $2}'
7
comment
$ cmus-remote -Q 2 "$info"
status paused
...
duration 262
position 7
tag artist Amanda Abizaid
tag album The Great Plan Vol. l
tag title Take It On Faith
tag date 2004
tag genre ROCK: Modern Rock
tag tracknumber 1
tag albumartist Amanda Abizaid
tag composer Amanda Abizaid, Shane Soloski
\nBorn in Beirut, Lebanon, AMANDA JO ABIZAID moved to The United States when she was nine years old. She learned how to harmonize as a child by singing a wide range of music with her four older sisters. For many years, Amanda studied piano and flute with private teachers. She continued to perfect her talents at The Catholic University of America, majoring in drama and music. She has also lived and modeled in Wash. D.C., New \nAmanda co-started and fronted the band "BLUE" that performed regularly in and around the Los Angeles area. Now as a solo artist, Amanda Abizaid performs her unique songs on piano and guitar and also with her band. Her original musical compositions include flute and violin parts that add an Arabian flavor to her poetic and classic songwriting: a mixture of sultry/soulful vocals and haunting melodies. Her debut EP Album, "The Great Plan", Vol. I, was independently released last Summer 2004 and is sold internationally at www.CDBaby.com along with her first single "Lebanon", a song about the poli\nShe was the singing voice for Ally Sheady and Carisma Carpenter on VH1's show "STRANGE FREQUENCY", and has sung songs for WB's "CHARMED", "SUMMERLAND", "SMALLVILLE", Paramount's "THE 4400" (theme song, "A Place In Time"), and many more. Her feature film vocal and songwriting credits include, "3 BELOW" and "FACING THE LION". She performs regularly at Genghis Cohen, The Derby and Tangier Lounge in Los Angeles. She has just finished the follow up to "The Great Plan", Vol. II, which is set to be released this F\n3 Below- DITS 3 Below, Fairlon Suite/writer & vocalist S\nFacing The Lion- Facing The Lion, Timeless/co-writer & vocalist S\nThe Groomsmen- featured/vocalist Vision\nDevious Beings- God Rest ye Merry Gentlemen, Come Alive/vocalist Redbea\nOdd Girl Out- Dreams In Ashes/vocalist Lifeti\nThe 4400 theme song- A Place In Time/vocalist Viacom/Paramou\nCharmed-s opening song, Not Gonna Drag Me Down/vocalist W\nBig Man On Campus- How Do I Make/vocalist Next Entertain\nOne Tree Hill- At The E2 episodes/vocalist WB W\nThe Division- 1 song/vocalist Lifetime Netwo\nThat's Life-y CARISMA 3 episodes/vocalistlistvocalist,Viacom/VH1/Paramount EADViacom\nJC Penny-LS ctures 1 song/v1 song/vocalist WB Boss H\nFelicity- 1 song/vocalist WB/Wad\nStephen Phillips & Tim P.- Boss H\nTom Gimbel- Aerosmith, For\nJennifer Stills- Three \nTaylor Mills- - The Wallflowers,WilliamsBrian \nScott Bennett - Brian \nPepper Mashay- Jungle\nBird York - Guided\nRoyal Caribbean Cruise Lines- Christmas CD Wade H\nCarnival Cruise Lines- CD Wade H\nTaylor Daine- vocal demo
set aaa_mode all
set continue false
set play_library true
set play_sorted false
set replaygain disabled
set replaygain_limit true
set replaygain_preamp 0.000000
set repeat false
set repeat_current false
set shuffle false
set softvol false
set vol_left 20
set vol_right 20
from polybar-scripts.
The problem is that we are looking for the position with grep position
. If you have now a string like that somewhere in your stream info you run into problems.
Look at this:
Her original musical compositions include ...
You could try to use grep "position "
. But this is more a workaround than a solution.
from polybar-scripts.
I rewrote the conditions. Can you test it?
from polybar-scripts.
Thank you very much.
I quickly tested it and so far it works as intended. I will use it more in the next days and I will give you a more accurate feedback if I will find something.
from polybar-scripts.
Sounds good! 😎
I will close this issue. Open another one if you find something bad.
from polybar-scripts.
Related Issues (20)
- Arch Linux Import Error libffi.so.7 player-mpris-tail HOT 5
- hlwm workspaces custom script HOT 2
- player mpris tail audio control keys not showing HOT 11
- dunst-snooze not showing icons HOT 8
- `pw-record` and `pw-play` no longer have the `--list-targets` flag HOT 2
- How do I set up weather-icons? HOT 1
- Script has syntax errors HOT 3
- info-wifionice: Train portal is reachable but script says otherwise
- info-wifionice: Add French trains HOT 1
- player-mpris-tail.py does not print icon-none on startup. HOT 4
- fcitx5-module HOT 1
- info-dualshock4 only working correctly when controller is connect HOT 1
- Translate / Document Icon Codes in openweathermap-fullfeatured HOT 2
- [bug] info-cava.py is not work HOT 5
- Feature request: clipboard history HOT 1
- I seem to be getting an error for the network-traffic script HOT 2
- Altering vpn-wireguard-wg HOT 1
- pipewire-microphone script is broken HOT 4
- player-mpris-tail doesn't show any icon HOT 9
- battery-combined-udev 34: arithmetic expression: expecting primary: ""31800000 + 0"" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polybar-scripts.