Skip to content

Commit

Permalink
Fixing advanced mode with hidden settings
Browse files Browse the repository at this point in the history
Files are perpetually added to the task queue if mode is set to advanced, but some the smart filters were previously applied
  • Loading branch information
Josh5 committed Sep 23, 2024
1 parent 4921b18 commit 8b264da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

**<span style="color:#56adda">0.1.6</span>**
- Fix bug causing files to be perpetually added to the task queue if mode is set to advanced, but the smart filters were previously applied

**<span style="color:#56adda">0.1.5</span>**
- Fix video scaling smart filter for videos that do not use a 16:9 aspect ratio

Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"on_worker_process": 1
},
"tags": "video,ffmpeg",
"version": "0.1.5"
"version": "0.1.6"
}
15 changes: 8 additions & 7 deletions lib/plugin_stream_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,15 @@ def test_stream_needs_processing(self, stream_info: dict):
if self.settings.get_setting('apply_smart_filters'):
# Video filters
if codec_type in ['video']:
# Check if autocrop filter needs to be applied
if self.settings.get_setting('autocrop_black_bars') and self.crop_value:
return True
# Check if scale filter needs to be applied
if self.settings.get_setting('target_resolution') not in ['source']:
vid_width, vid_height = self.scale_resolution(stream_info)
if vid_width:
if self.settings.get_setting('mode') == 'standard':
# Check if autocrop filter needs to be applied (standard mode only)
if self.settings.get_setting('autocrop_black_bars') and self.crop_value:
return True
# Check if scale filter needs to be applied (standard mode only)
if self.settings.get_setting('target_resolution') not in ['source']:
vid_width, vid_height = self.scale_resolution(stream_info)
if vid_width:
return True
# Data/Attachment filters
if codec_type in ['data', 'attachment']:
# Enable removal of data and attachment streams
Expand Down

0 comments on commit 8b264da

Please sign in to comment.