mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
cspot duration
This commit is contained in:
@@ -32,9 +32,9 @@ message Artist {
|
|||||||
message Track {
|
message Track {
|
||||||
optional bytes gid = 1;
|
optional bytes gid = 1;
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
|
optional sint32 duration = 0x7;
|
||||||
optional Album album = 0x3;
|
optional Album album = 0x3;
|
||||||
repeated Artist artist = 0x4;
|
repeated Artist artist = 0x4;
|
||||||
optional sint32 duration = 0x7;
|
|
||||||
repeated Restriction restriction = 0xb;
|
repeated Restriction restriction = 0xb;
|
||||||
repeated AudioFile file = 0xc;
|
repeated AudioFile file = 0xc;
|
||||||
repeated Track alternative = 0xd;
|
repeated Track alternative = 0xd;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ template int64_t PbReader::decodeFixed();
|
|||||||
|
|
||||||
template uint32_t PbReader::decodeVarInt();
|
template uint32_t PbReader::decodeVarInt();
|
||||||
template int64_t PbReader::decodeVarInt();
|
template int64_t PbReader::decodeVarInt();
|
||||||
|
template int32_t PbReader::decodeVarInt();
|
||||||
template bool PbReader::decodeVarInt();
|
template bool PbReader::decodeVarInt();
|
||||||
|
|
||||||
void PbReader::resetMaxPosition()
|
void PbReader::resetMaxPosition()
|
||||||
|
|||||||
@@ -91,6 +91,10 @@ void decodeField(std::shared_ptr<PbReader> reader, AnyRef any)
|
|||||||
{
|
{
|
||||||
*any.as<int64_t>() = reader->decodeVarInt<int64_t>();
|
*any.as<int64_t>() = reader->decodeVarInt<int64_t>();
|
||||||
}
|
}
|
||||||
|
else if (any.is<int32_t>())
|
||||||
|
{
|
||||||
|
*any.as<int32_t>() = reader->decodeVarInt<int32_t>();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
reader->skip();
|
reader->skip();
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ void SpotifyTrack::trackInformationCallback(std::unique_ptr<MercuryResponse> res
|
|||||||
trackInfo = decodePb<Track>(response->parts[0]);
|
trackInfo = decodePb<Track>(response->parts[0]);
|
||||||
|
|
||||||
CSPOT_LOG(info, "Track name: %s", trackInfo.name.value().c_str());
|
CSPOT_LOG(info, "Track name: %s", trackInfo.name.value().c_str());
|
||||||
|
CSPOT_LOG(info, "Track duration: %d", trackInfo.duration.value());
|
||||||
|
|
||||||
CSPOT_LOG(debug, "trackInfo.restriction.size() = %d", trackInfo.restriction.size());
|
CSPOT_LOG(debug, "trackInfo.restriction.size() = %d", trackInfo.restriction.size());
|
||||||
int altIndex = 0;
|
int altIndex = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user