Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cpadil committed Mar 15, 2024
1 parent 1f0b96f commit 326c492
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Community/Tdarr_Plugin_cp92_clean_audio_subtitles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-await-in-loop */
module.exports.dependencies = ['axios@0.27.2', '@cospired/i18n-iso-languages'];
module.exports.dependencies = ['axios@1.6.8', '@cospired/i18n-iso-languages'];
// tdarrSkipTest
const details = () => ({
id: 'Tdarr_Plugin_cp92_clean_audio_subtitles',
Expand Down Expand Up @@ -308,6 +308,7 @@ const plugin = async (file, librarySettings, inputs, otherArguments) => {
if (file.ffProbeData.streams.filter((stream) => stream.codec_type.toLowerCase() === 'audio').length > 1){

if (inputs.priority) {
response.infoLog += `API priority (${inputs.priority}) \n `;
if (inputs.priority === 'sonarr') {
prio = ['sonarr', 'radarr'];
}
Expand Down Expand Up @@ -360,11 +361,12 @@ const plugin = async (file, librarySettings, inputs, otherArguments) => {
if (sonarrResult) {
imdbId = sonarrResult.imdbId;
response.infoLog += `Grabbed ID (${imdbId}) from Sonarr \n `;
const languages = require('@cospired/i18n-iso-languages');
tmdbResult = { original_language: languages.getAlpha2Code(sonarrResult.originalLanguage.name, 'en') };
} else {
response.infoLog += "Couldn't grab ID from Sonarr \n ";
imdbId = fileNameEncoded;
}
tmdbResult = await tmdbApi(imdbId, inputs.api_key, axios);
}
}
}
Expand Down

0 comments on commit 326c492

Please sign in to comment.