mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-14 13:55:55 -07:00
fix(launcher): find previous season when current dir is missing
- findLastEpisodeInPreviousSeason now falls back to matching by season number when the current season dir isn't in the listed seasons (e.g. deleted file's season folder) - test: delete season-2 dir contents so the fallback path is exercised
This commit is contained in:
@@ -240,6 +240,7 @@ test('findPreviousEpisode falls back to prior season when a deleted file was the
|
||||
try {
|
||||
const season1 = path.join(seriesRoot, 'Season-1');
|
||||
const season2 = path.join(seriesRoot, 'Season-2');
|
||||
fs.rmSync(path.join(season2, 'Show - S02E01.mkv'));
|
||||
const missing = path.join(season2, 'Show - S02E01 - Deleted Cut.mkv');
|
||||
assert.equal(findPreviousEpisode(missing), path.join(season1, 'Show - S01E03.mkv'));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user