From 0879c97ff47bdf1d4012178a623f49ea5230c3ae Mon Sep 17 00:00:00 2001 From: Max Isom Date: Mon, 8 Aug 2022 20:42:55 -0500 Subject: [PATCH] Fix cache condition (#767) --- CHANGELOG.md | 2 ++ src/services/player.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a31f1ae..e48a571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Cache files are now correctly created ## [2.1.2] - 2022-08-04 ### Fixed diff --git a/src/services/player.ts b/src/services/player.ts index 0af6fec..78f72b2 100644 --- a/src/services/player.ts +++ b/src/services/player.ts @@ -457,7 +457,7 @@ export default class { // Don't cache livestreams or long videos const MAX_CACHE_LENGTH_SECONDS = 30 * 60; // 30 minutes - shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.videoDetails.lengthSeconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek && !options.to; + shouldCacheVideo = !info.player_response.videoDetails.isLiveContent && parseInt(info.videoDetails.lengthSeconds, 10) < MAX_CACHE_LENGTH_SECONDS && !options.seek; ffmpegInputOptions.push(...[ '-reconnect',