diff --git a/mumbledj.gcfg b/mumbledj.gcfg index 54ba67a..e674c12 100644 --- a/mumbledj.gcfg +++ b/mumbledj.gcfg @@ -22,9 +22,9 @@ PlaylistSkipRatio = 0.5 # NOTE: If you do not want a comment by default, set the variable equal to an empty string (""). DefaultComment = "Hello! I am a bot. Type !help for a list of commands." -# Maximum song duration in seconds -# Default Value 600 -MaxSongDuration = 600 +# Maximum song duration in seconds (0 = unristrcted) +# Default Value: 0 +MaxSongDuration = 0 [Cache] diff --git a/song.go b/song.go index dde652a..f632334 100644 --- a/song.go +++ b/song.go @@ -60,7 +60,7 @@ func NewSong(user, id string, playlist *Playlist) (*Song, error) { duration, _ := jq.Int("data", "duration") videoDuration := fmt.Sprintf("%d:%02d", duration/60, duration%60) - if duration > dj.conf.General.MaxSongDuration { + if duration > dj.conf.General.MaxSongDuration && dj.conf.General.MaxSongDuration > 0 { return nil, errors.New("video exceeds the maximum allowed duration.") }