Skip to content

Commit

Permalink
Fixed a bug with subtitles where some lines can be empty after filtering
Browse files Browse the repository at this point in the history
Updated version to 1.3.1
  • Loading branch information
ercanserteli committed May 25, 2022
1 parent 0584ae4 commit e791fd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Condenser v1.3.0 by Ercan Serteli
Condenser v1.3.1 by Ercan Serteli
---------------------------------


Expand All @@ -11,7 +11,7 @@ How to use - Simple
-------------------
* Unpack the archive to a folder and create a shortcut to condenser.exe if you want.
* Drag and drop a video or a folder with videos to the executable (or its shortcut).
* If there is an ambiguity, a pop up may ask you to make a choice. Answer accordingly.
* If there is an ambiguity, a pop-up may ask you to make a choice. Answer accordingly.
* When the processing is done, an audio file with the name "[video_name]_con.mp3" will be created next to the video.


Expand Down Expand Up @@ -57,6 +57,9 @@ Condenser uses ffmpeg for manipulating video and audio files.

Change log
----------
v1.3.1
* Fixed a bug with subtitles where some lines can be empty after filtering

v1.3.0
* Fixed a bug with external subtitles when condensing a folder
* Added the ability to filter certain characters and lines enclosed by parentheses in subtitles, set by config
Expand Down
2 changes: 2 additions & 0 deletions condenser.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def streams_to_options(streams):

def filter_text(text):
text = re.sub('<[^<]+?>', '', text) # strip xml tags
if len(text) == 0:
return ""
if filter_parentheses and \
((text[0] == "(" and text[-1] == ")") or \
(text[0] == "[" and text[-1] == "]") or \
Expand Down

0 comments on commit e791fd0

Please sign in to comment.