mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 21:57:06 +02:00
Implemented Maloja listen export
This commit is contained in:
parent
10590f9f67
commit
0bee8561e3
6 changed files with 217 additions and 5 deletions
|
@ -55,11 +55,11 @@ func (t Track) Duration() time.Duration {
|
|||
var duration time.Duration
|
||||
milliseconds, ok := t.AdditionalInfo["duration_ms"].(float64)
|
||||
if ok {
|
||||
duration = time.Duration(int(milliseconds) * int(time.Millisecond))
|
||||
duration = time.Duration(int64(milliseconds) * int64(time.Millisecond))
|
||||
} else {
|
||||
seconds, ok := t.AdditionalInfo["duration_ms"].(float64)
|
||||
if ok {
|
||||
duration = time.Duration(int(seconds) * int(time.Second))
|
||||
duration = time.Duration(int64(seconds) * int64(time.Second))
|
||||
}
|
||||
}
|
||||
return duration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue