Commit 62dfbc38 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: fix time format overflow if playlist duration is > 24h

parent 933b6875
......@@ -977,7 +977,11 @@ static const float f_min_window_height = 307.;
NSDate *date = [NSDate dateWithTimeIntervalSince1970:mt_duration];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"HH:mm:ss"];
if (mt_duration >= 86400) {
[formatter setDateFormat:@"dd:HH:mm:ss"];
} else {
[formatter setDateFormat:@"HH:mm:ss"];
}
[formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
return [NSString stringWithFormat:@" — %@",[formatter stringFromDate:date]];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment