Don't allow seeking in livestream

This commit is contained in:
Max Isom 2020-03-15 20:11:45 -05:00
parent 2875c6ceb8
commit 18e851821c
4 changed files with 39 additions and 5 deletions

View file

@ -72,7 +72,8 @@ export default class implements Command {
artist: videoDetails.snippet.channelTitle,
length: toSeconds(parse(videoDetails.contentDetails.duration)),
url: videoDetails.id,
playlist: null
playlist: null,
isLive: videoDetails.snippet.liveBroadcastContent === 'live'
});
};
@ -106,7 +107,8 @@ export default class implements Command {
artist: video.snippet.channelTitle,
length,
url: video.contentDetails.videoId,
playlist: queuedPlaylist
playlist: queuedPlaylist,
isLive: false
});
});
} else {
@ -190,7 +192,8 @@ export default class implements Command {
artist: track.artists[0].name,
length: track.duration_ms / 1000,
url: video.link,
playlist
playlist,
isLive: video.live
};
} catch (_) {
// TODO: handle error