Remove duration property

This commit is contained in:
badaix 2021-06-04 11:25:35 +02:00
parent d90c3fc29c
commit 1fb80e81c4
2 changed files with 4 additions and 5 deletions

View file

@ -113,8 +113,8 @@ public:
boost::optional<int> volume; boost::optional<int> volume;
/// The current track position in seconds /// The current track position in seconds
boost::optional<float> position; boost::optional<float> position;
/// The current track duration in seconds // /// The current track duration in seconds
boost::optional<float> duration; // boost::optional<float> duration;
/// Whether the client can call the Next method on this interface and expect the current track to change /// Whether the client can call the Next method on this interface and expect the current track to change
boost::optional<bool> can_go_next; boost::optional<bool> can_go_next;
/// Whether the client can call the Previous method on this interface and expect the current track to change /// Whether the client can call the Previous method on this interface and expect the current track to change
@ -138,7 +138,7 @@ public:
addTag(j, "shuffle", shuffle); addTag(j, "shuffle", shuffle);
addTag(j, "volume", volume); addTag(j, "volume", volume);
addTag(j, "position", position); addTag(j, "position", position);
addTag(j, "duration", duration); // addTag(j, "duration", duration);
addTag(j, "canGoNext", can_go_next); addTag(j, "canGoNext", can_go_next);
addTag(j, "canGoPrevious", can_go_previous); addTag(j, "canGoPrevious", can_go_previous);
addTag(j, "canPlay", can_play); addTag(j, "canPlay", can_play);
@ -182,7 +182,7 @@ public:
readTag(j, "shuffle", shuffle); readTag(j, "shuffle", shuffle);
readTag(j, "volume", volume); readTag(j, "volume", volume);
readTag(j, "position", position); readTag(j, "position", position);
readTag(j, "duration", duration); // readTag(j, "duration", duration);
readTag(j, "canGoNext", can_go_next); readTag(j, "canGoNext", can_go_next);
readTag(j, "canGoPrevious", can_go_previous); readTag(j, "canGoPrevious", can_go_previous);
readTag(j, "canPlay", can_play); readTag(j, "canPlay", can_play);

View file

@ -548,7 +548,6 @@ class MPDWrapper(object):
except (ValueError, TypeError): except (ValueError, TypeError):
logger.warning( logger.warning(
f"Can't cast value {value} to {tag_mapping[key][1]}") f"Can't cast value {value} to {tag_mapping[key][1]}")
logger.debug(f'snapcast meta: {snapmeta}') logger.debug(f'snapcast meta: {snapmeta}')
# Hack for web radio: # Hack for web radio: