mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-01 19:26:58 +02:00
added stream state "unknown"
This commit is contained in:
parent
4a75aaf84b
commit
a77be90fee
3 changed files with 7 additions and 5 deletions
|
@ -25,7 +25,7 @@ public class Stream implements JsonSerialisable {
|
||||||
} else {
|
} else {
|
||||||
uri = new StreamUri(json);
|
uri = new StreamUri(json);
|
||||||
id = json.getString("id");
|
id = json.getString("id");
|
||||||
status = Status.fromString("idle");
|
status = Status.unknown;
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -99,6 +99,7 @@ public class Stream implements JsonSerialisable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Status {
|
public enum Status {
|
||||||
|
unknown("unknown"),
|
||||||
idle("idle"),
|
idle("idle"),
|
||||||
playing("playing"),
|
playing("playing"),
|
||||||
disabled("disabled");
|
disabled("disabled");
|
||||||
|
|
|
@ -135,7 +135,7 @@ void PcmReader::onChunkEncoded(const Encoder* encoder, msg::PcmChunk* chunk, dou
|
||||||
|
|
||||||
json PcmReader::toJson() const
|
json PcmReader::toJson() const
|
||||||
{
|
{
|
||||||
string state("idle");
|
string state("unknown");
|
||||||
if (state_ == kIdle)
|
if (state_ == kIdle)
|
||||||
state = "idle";
|
state = "idle";
|
||||||
else if (state_ == kPlaying)
|
else if (state_ == kPlaying)
|
||||||
|
|
|
@ -34,9 +34,10 @@ class PcmReader;
|
||||||
|
|
||||||
enum ReaderState
|
enum ReaderState
|
||||||
{
|
{
|
||||||
kIdle = 0,
|
kUnknown = 0,
|
||||||
kPlaying = 1,
|
kIdle = 1,
|
||||||
kDisabled = 2
|
kPlaying = 2,
|
||||||
|
kDisabled = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue