patch type

This commit is contained in:
iPromKnight
2024-03-10 22:28:06 +00:00
parent 6f4bc10f5a
commit 500dd0d725
2 changed files with 2 additions and 5 deletions

View File

@@ -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 => () => {

View File

@@ -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);