mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
patch type
This commit is contained in:
@@ -86,6 +86,8 @@ export class TorrentEntriesService implements ITorrentEntriesService {
|
|||||||
contents: fileCollection.contents,
|
contents: fileCollection.contents,
|
||||||
subtitles: fileCollection.subtitles
|
subtitles: fileCollection.subtitles
|
||||||
});
|
});
|
||||||
|
|
||||||
|
newTorrent.type = newTorrent.type.toLowerCase();
|
||||||
|
|
||||||
return this.repository.createTorrent(newTorrent)
|
return this.repository.createTorrent(newTorrent)
|
||||||
.then(() => PromiseHelpers.sequence(fileCollection.videos!.map(video => () => {
|
.then(() => PromiseHelpers.sequence(fileCollection.videos!.map(video => () => {
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ export class TorrentFileService implements ITorrentFileService {
|
|||||||
return Promise.reject(new Error('Failed to retrieve metadata'));
|
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 ||
|
if (torrent.type === TorrentType.Movie && (!parsedTorrentName.seasons ||
|
||||||
parsedTorrentName.season === 5 && [1, 5].includes(parsedTorrentName.episode || 0))) {
|
parsedTorrentName.season === 5 && [1, 5].includes(parsedTorrentName.episode || 0))) {
|
||||||
return this.parseMovieFiles(torrent, metadata);
|
return this.parseMovieFiles(torrent, metadata);
|
||||||
|
|||||||
Reference in New Issue
Block a user