Skip to content

Commit

Permalink
fix test on replace channel_layout str -> int
Browse files Browse the repository at this point in the history
  • Loading branch information
yajrendrag committed Oct 5, 2024
1 parent 7fd7518 commit 044c032
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions source/rename_file/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

**<span style="color:#56adda">0.0.11</span>**
- fix error in channels test - should be int not str

**<span style="color:#56adda">0.0.10</span>**
- fix error in replace function variable - vrezh->vrez_height

Expand Down
2 changes: 1 addition & 1 deletion source/rename_file/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"on_postprocessor_task_results": 0
},
"tags": "rename, postprocessor",
"version": "0.0.10"
"version": "0.0.11"
}
7 changes: 5 additions & 2 deletions source/rename_file/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ def append(data, settings, abspath, streams):
channel_layout = ''
logger.info("Not including channel layout - could not extract channel layout from file: '{}'".format(abspath))
else:
if "(side)" in channel_layout: channel_layout = channel_layout.replace("(side)","")
if "(side)" in channel_layout:
channel_layout = channel_layout.replace("(side)","")
elif: channel_layout == "stereo":
channel_layout = "2.0"
else:
channel_layout = ''

Expand Down Expand Up @@ -293,7 +296,7 @@ def replace(data, settings, abspath, streams):
audio_codec = streams[astream]["codec_name"]
channel_layout = streams[astream]["channel_layout"]
channels = streams[astream]["channels"]
if channel_layout == "stereo" and channels == '2':
if channel_layout == "stereo" and channels == 2:
acodec = audio_codec + ' ' + str(channels) + '.0'
elif channels > 4:
acodec = audio_codec + ' ' + str(channel_layout).replace('(side)','')
Expand Down

0 comments on commit 044c032

Please sign in to comment.