DetachedSong: use std::chrono::duration for start_ms and end_ms
This commit is contained in:
@@ -128,8 +128,8 @@ int main(int argc, char **argv)
|
||||
while ((song = playlist->NextSong()) != NULL) {
|
||||
printf("%s\n", song->GetURI());
|
||||
|
||||
const unsigned start_ms = song->GetStartMS();
|
||||
const unsigned end_ms = song->GetEndMS();
|
||||
const unsigned start_ms = song->GetStartTime().ToMS();
|
||||
const unsigned end_ms = song->GetEndTime().ToMS();
|
||||
|
||||
if (end_ms > 0)
|
||||
printf("range: %u:%02u..%u:%02u\n",
|
||||
|
@@ -185,15 +185,15 @@ ToString(const DetachedSong &song)
|
||||
|
||||
result.push_back('|');
|
||||
|
||||
if (song.GetStartMS() > 0) {
|
||||
sprintf(buffer, "%u", song.GetStartMS());
|
||||
if (song.GetStartTime().IsPositive()) {
|
||||
sprintf(buffer, "%u", song.GetStartTime().ToMS());
|
||||
result.append(buffer);
|
||||
}
|
||||
|
||||
result.push_back('-');
|
||||
|
||||
if (song.GetEndMS() > 0) {
|
||||
sprintf(buffer, "%u", song.GetEndMS());
|
||||
if (song.GetEndTime().IsPositive()) {
|
||||
sprintf(buffer, "%u", song.GetEndTime().ToMS());
|
||||
result.append(buffer);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user