Fixing build errors
This commit is contained in:
parent
dc5741cf86
commit
df35d03ebe
|
@ -37,7 +37,7 @@ type Song interface {
|
|||
Title() string
|
||||
ID() string
|
||||
Filename() string
|
||||
Duration() string
|
||||
DurationString() string
|
||||
Thumbnail() string
|
||||
Playlist() Playlist
|
||||
DontSkip() bool
|
||||
|
|
|
@ -13,7 +13,6 @@ import (
|
|||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/jmoiron/jsonq"
|
||||
"github.com/layeh/gumble/gumble"
|
||||
|
@ -115,7 +114,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, offs
|
|||
url: url,
|
||||
thumbnail: thumbnail,
|
||||
submitter: user,
|
||||
duration: durationMS / 1000,
|
||||
Duration: durationMS / 1000,
|
||||
offset: offset,
|
||||
format: "mp3",
|
||||
playlist: playlist,
|
||||
|
|
|
@ -91,7 +91,7 @@ func (yt YouTube) NewSong(user *gumble.User, id, offset string, playlist Playlis
|
|||
id: id,
|
||||
url: "https://youtu.be/" + id,
|
||||
offset: int(yt.parseTime(offset).Seconds()),
|
||||
duration: int(yt.parseTime(duration).Seconds()),
|
||||
Duration: int(yt.parseTime(duration).Seconds()),
|
||||
thumbnail: thumbnail,
|
||||
format: "m4a",
|
||||
skippers: make([]string, 0),
|
||||
|
@ -132,11 +132,11 @@ func (yt YouTube) parseTime(duration string) time.Duration {
|
|||
seconds, _ = strconv.ParseInt(strings.TrimSuffix(timestampResult["seconds"], "S"), 10, 32)
|
||||
}
|
||||
|
||||
totalSeconds = int((days * 86400) + (hours * 3600) + (minutes * 60) + seconds)
|
||||
totalSeconds = int64((days * 86400) + (hours * 3600) + (minutes * 60) + seconds)
|
||||
} else {
|
||||
totalSeconds = 0
|
||||
}
|
||||
return time.ParseDuration(totalSeconds + "s")
|
||||
return time.ParseDuration(strconv.Itoa(totalSeconds) + "s")
|
||||
}
|
||||
|
||||
// NewPlaylist gathers the metadata for a YouTube playlist and returns it.
|
||||
|
|
|
@ -15,9 +15,9 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/jmoiron/jsonq"
|
||||
"github.com/layeh/gumble/gumble"
|
||||
"github.com/layeh/gumble/gumble_ffmpeg"
|
||||
)
|
||||
|
|
Reference in a new issue