mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Check title is string (#300)
* Check title is string * Fix lint and brackets
This commit is contained in:
parent
d593eb312d
commit
764afced49
1 changed files with 3 additions and 1 deletions
|
|
@ -98,7 +98,9 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|||
const { index } = subStream;
|
||||
if (fs.existsSync(`${subsFile}`)) {
|
||||
response.infoLog += `${lang}.srt already exists. Skipping!\n`;
|
||||
} else if (title.toLowerCase().includes('commentary') || title.toLowerCase().includes('description')) {
|
||||
} else if (typeof title === 'string'
|
||||
&& (title.toLowerCase().includes('commentary')
|
||||
|| title.toLowerCase().includes('description'))) {
|
||||
response.infoLog += `Stream ${i} ${lang}.srt is a ${title} track. Skipping!\n`;
|
||||
} else {
|
||||
response.infoLog += `Extracting ${lang}.srt\n`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue