From 500dd0d7256256c2b56d709d8b8cda75bd9eb54e Mon Sep 17 00:00:00 2001 From: iPromKnight Date: Sun, 10 Mar 2024 22:28:06 +0000 Subject: [PATCH] patch type --- .../consumer/src/lib/services/torrent_entries_service.ts | 2 ++ src/node/consumer/src/lib/services/torrent_file_service.ts | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/node/consumer/src/lib/services/torrent_entries_service.ts b/src/node/consumer/src/lib/services/torrent_entries_service.ts index 72e6fea..3958e7e 100644 --- a/src/node/consumer/src/lib/services/torrent_entries_service.ts +++ b/src/node/consumer/src/lib/services/torrent_entries_service.ts @@ -86,6 +86,8 @@ export class TorrentEntriesService implements ITorrentEntriesService { contents: fileCollection.contents, subtitles: fileCollection.subtitles }); + + newTorrent.type = newTorrent.type.toLowerCase(); return this.repository.createTorrent(newTorrent) .then(() => PromiseHelpers.sequence(fileCollection.videos!.map(video => () => { diff --git a/src/node/consumer/src/lib/services/torrent_file_service.ts b/src/node/consumer/src/lib/services/torrent_file_service.ts index 3b29d5e..0e0bd06 100644 --- a/src/node/consumer/src/lib/services/torrent_file_service.ts +++ b/src/node/consumer/src/lib/services/torrent_file_service.ts @@ -57,11 +57,6 @@ export class TorrentFileService implements ITorrentFileService { return Promise.reject(new Error('Failed to retrieve metadata')); } - if (torrent.type !== TorrentType.Anime && metadata && metadata.type && metadata.type !== torrent.type) { - // it's actually a movie/series - torrent.type = metadata.type; - } - if (torrent.type === TorrentType.Movie && (!parsedTorrentName.seasons || parsedTorrentName.season === 5 && [1, 5].includes(parsedTorrentName.episode || 0))) { return this.parseMovieFiles(torrent, metadata);