Skip to content

Commit

Permalink
Trying to improve linting again
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Oct 4, 2023
1 parent 7f6f210 commit 3cf7c9c
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const details = () => ({
type: 'text',
},
tooltip:
`Enter values of the stream codec type to process. Nothing/empty input means all types of streams will be inspected for processing.
For example, if removing by codec_name on video streams, enter video:
`Enter values of the stream codec type to process. Nothing/empty input means all types of streams will
be inspected for processing. For example, if removing by codec_name on video streams, enter video:
\\nExample:\\n
video,subtitle,audio
Expand Down Expand Up @@ -61,8 +61,9 @@ const details = () => ({
type: 'text',
},
tooltip:
`Enter one or more properties to check for its existance. If the property is missing or null, the stream will be removed.
Useful for fixing corrupt streams. For example, if codec_name is missing, the stream will be removed:
`Enter one or more properties to check for its existance. If the property is missing or null,
the stream will be removed. Useful for fixing corrupt streams. For example, if codec_name
is missing, the stream will be removed:
\\nExample:\\n
codec_name
Expand Down Expand Up @@ -115,7 +116,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
for (let i = 0; i < file.ffProbeData.streams.length; i += 1) {
try {
// Skip if the codec_type is filtered out
if(codecTypeFilter.length != 0 && !codecTypeFilter.includes(String(file.ffProbeData.streams[i]['codec_type']))) {
if(

Check failure on line 119 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

Expected space(s) after "if"
codecTypeFilter.length !== 0 &&

Check failure on line 120 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

'&&' should be placed at the beginning of the line

Check failure on line 120 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

Trailing spaces not allowed
!codecTypeFilter.includes(String(file.ffProbeData.streams[i].codec_type))
) {
continue;

Check failure on line 123 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

Unexpected use of continue statement
}

Expand All @@ -129,7 +133,7 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
if (file.ffProbeData.streams[i][removeIfPropertyMissing[j]] === 'undefined' || file.ffProbeData.streams[i][removeIfPropertyMissing[j]] === null) {

Check failure on line 133 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

This line has a length of 156. Maximum allowed is 120
emptyValue = true;
response.infoLog += ` Removing stream ${i} which is has ${removeIfPropertyMissing[j]} missing`;
break
break;
}
}

Expand All @@ -139,11 +143,10 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
response.preset += ` -map -0:${i} `;

// Log the old message if the reason is not empty values
if(!emptyValue) {
if (!emptyValue) {
response.infoLog += ` Removing stream ${i} which is has ${propertyToCheck} or`
+ ` of ${file.ffProbeData.streams[i][propertyToCheck]} \n`;
}

streamToRemove = true;

Check failure on line 150 in Community/Tdarr_Plugin_00td_action_remove_stream_by_specified_property.js

View workflow job for this annotation

GitHub Actions / build (18.x, ubuntu-20.04)

Block must not be padded by blank lines

}
Expand Down

0 comments on commit 3cf7c9c

Please sign in to comment.