mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-12 21:05:29 +01:00
Don't cache long videos
This commit is contained in:
parent
11246812a6
commit
b1895627db
|
@ -211,8 +211,10 @@ export default class {
|
|||
|
||||
youtubeStream.pipe(capacitor);
|
||||
|
||||
// Don't cache livestreams
|
||||
if (!info.player_response.videoDetails.isLiveContent) {
|
||||
// Don't cache livestreams or long videos
|
||||
const MAX_CACHE_LENGTH_SECONDS = 30 * 60; // 30 minutes
|
||||
|
||||
if (!info.player_response.videoDetails.isLiveContent && parseInt(info.length_seconds, 10) < MAX_CACHE_LENGTH_SECONDS) {
|
||||
const cacheTempPath = this.getCachedPathTemp(url);
|
||||
const cacheStream = createWriteStream(cacheTempPath);
|
||||
|
||||
|
|
Loading…
Reference in a new issue