Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
fix: Fix that file for subs was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Sep 14, 2020
1 parent 37ce8f9 commit 48333a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/shared/subtitles/subtitles.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class SubtitlesService {
this.client = new OpenSubtitles({
useragent: 'Popcorn Time',
username,
password,
password
})

} else {
Expand Down Expand Up @@ -70,7 +70,7 @@ export class SubtitlesService {
const subtitles = await this.client.search({
sublanguageid: 'all',
filesize: torrent.length,
path: `${location}/${filename}`,
path: `${location}/${torrent.path}`,
imdbid,
filename,
season,
Expand Down Expand Up @@ -115,6 +115,7 @@ export class SubtitlesService {
} catch (e) {
if (e.message.includes('no such file or directory') && retry) {
this.searchForSubtitles(download, torrent, false)

} else {
this.logger.error(`[${download._id}]: Could not search for subtitles`, e)
}
Expand Down

0 comments on commit 48333a9

Please sign in to comment.