Stable: 2.5.2
Development: 2.6-alpha3
Hi. I have a question or two. I made a script using `mocp` commands. The script will run `mocp --seek +5` or `mocp --seek -5`, then `mocp --info` immediately to obtain the new values. I can run the seek commands using mouse scrolling. The bug is that if I seek too much, mocp return -6. What does -6 mean... and if it is a bug?
tomaszg
Mon, 2017-10-30 16:33
Permalink
It looks like a case of a
It looks like a case of a race condition like in http://moc.daper.net/node/1567
lasers
Mon, 2017-10-30 17:20
Permalink
Ah I see. Thanks. I'll toy
Ah I see. Thanks. I'll toy with the delay or accept it as-is... as it is a minor issue that could be ignored in the script and wait for next few seconds to get the new values instead.
lasers
Mon, 2017-10-30 21:07
Permalink
I fixed this issue by reusing
I fixed this issue by reusing the last retrieved data if the -6 happens again. This prevents me from seeing a brief glitch on the bar because -6 would give me only the first line of `mocp --info` to work with... Maybe it's not useful, but it seems that I can trigger this error only in `PLAY` state. Anyhow, many thanks for a nudge on the race condition.
tomaszg
Mon, 2017-10-30 21:31
Permalink
So, where exactly do you see
So, where exactly do you see this -6? As current time?
lasers
Wed, 2017-11-01 20:52
Permalink
Error code from command `mocp
Error code from command `mocp --info` that came up in the log. This may have nothing to do with `mocp --info` as I am not able to trigger `-6` in the terminal... only `0` and `134`. I made a pull request to make `moc` more consistent with its data. https://github.com/ultrabug/py3status/pull/1138