mocp return -6 sometimes

Forums:

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?

It looks like a case of a race condition like in http://moc.daper.net/node/1567

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.

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.

So, where exactly do you see this -6? As current time?

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