Commit Graph

19504 Commits

Author SHA1 Message Date
Ivandro Jao
042dfa14e5 Add DimensionTest to test project
A new test class, DimensionTest, is created and added to the test project. This class specifically tests the functionality of the Dimension object's validity and equality methods, thus enhancing our suite of unit tests.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 13:10:10 +01:00
Ivandro Jao
6323937c30 Refactor video dimension validation in GenerateVideoWithHardSubs
This commit refactors the validation of video dimensions in GenerateVideoWithHardSubs class. Instead of checking width and height separately, a new Dimension object is created and validated with IsValid(). This simplifies the code and improves readability.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 12:41:32 +01:00
Ivandro Jao
93c9e9947a Refactor video and subtitle batch creation code
Code for creating and validating batch video and subtitle entities has been extracted into separate methods, improving the readability of the main method. These changes also include a rectification in the logic for handling invalid video dimensions.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 12:35:53 +01:00
Ivandro Jao
3d24cdcbb6 Add Dimension struct to manage object sizes
The struct, Dimension which represents the dimensions of an object, is created. This contains basic properties for height and width, and methods for checking equality, validity and providing a string representation. The Dimension can later be used throughout the project for managing sizes of different objects.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 12:35:42 +01:00
Ivandro Jao
3e1fabac30 Refactor FfmpegMediaInfo to use Dimension for dimensions
The properties VideoWidth and VideoHeight in FfmpegMediaInfo class have been replaced with a Dimension object. This modification leads to simpler and more readable code by encapsulating width and height information within the Dimension class. Any resolution information extracted is now directly assigned to the Dimension property.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 12:35:28 +01:00
Ivandro Jao
f256b59691 Refactor subtitle file location code in FileUtil
This commit simplifies the subtitle file location code in FileUtil by removing unnecessary nested functions. It changes the way the search is done in known subtitle directories and handles the case if a video file is sent with a full path. This results in cleaner and more manageable code.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-30 12:35:19 +01:00
Ivandro Jao
82ac6dec92 Fix typo in code comment
A typo in the comment for the subtitle file location function was corrected. Previously, the comment read "try locate subtitle file for the input vide file", and now it reads "try to locate subtitle file for the input vide file". Other changes include removal of an unused variable "fileNameNoExt".

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-29 16:17:36 +01:00
Ivandro Jao
c3af5f22ca Refactor TryLocateSubtitleFile method parameters
The method TryLocateSubtitleFile in FileUtil.cs was refactored to receive the complete video file name, rather than just the file name without its extension. This change should enhance file locating accuracy as it now considers the file's full name, including its extension.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-29 16:11:14 +01:00
Ivandro Jao
7a96e1c40a Add method to locate subtitle files for video
A method 'TryLocateSubtitleFile' was implemented in FileUtil. It attempts to locate matching subtitle files for video files in known directories. The method was integrated into 'AddInputFile' of 'GenerateVideoWithHardSubs' and simplifies the earlier implementation for finding subtitles. This change will make the process of matching video files to subtitles more efficient and cleaner.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-29 16:09:24 +01:00
Nikolaj Olsson
7b15d11cc1
Merge pull request #8271 from Gzushgshsh/patch-1
Correct a detail
2024-04-29 06:46:08 +02:00
Nikolaj Olsson
f8db47dba6 Skip audio files - thx Leon :)
Work on #8272
2024-04-29 06:43:30 +02:00
Nikolaj Olsson
6947faeba2 Work on #8272 2024-04-29 06:35:25 +02:00
Nikolaj Olsson
2ffed9b2b9 Move video info to context menu - thx rRobis/Leon :)
Work on #8273
2024-04-29 06:17:12 +02:00
Nikolaj Olsson
f6399cf63e Work on #8257 2024-04-29 06:02:52 +02:00
Lucas
8b8db9001d
Correct a detail
Currently you should use the call “bash build.sh” with this you can just use “./build.sh”
2024-04-28 20:19:12 -03:00
Nikolaj Olsson
d6add13334 A few language fixes 2024-04-28 21:14:50 +02:00
Nikolaj Olsson
fd03b2e447 Update dk/sv translations 2024-04-28 21:10:46 +02:00
Nikolaj Olsson
965dc3554e Minor refact 2024-04-28 20:40:49 +02:00
Nikolaj Olsson
59ab0fca5b More work on #8257 2024-04-28 20:36:47 +02:00
Nikolaj Olsson
6a3ddce7dd Add video res to ffmpeg info 2024-04-28 19:09:20 +02:00
Nikolaj Olsson
0c28e8a0ec Add sort mark to join subs - thx Leon :)
Work on #8257
2024-04-28 19:09:03 +02:00
Nikolaj Olsson
443d88d195 Allow sort/move for "Add end time of prev" in "Join subtitles" - thx Leon :)
Work on  #8257
2024-04-28 18:33:49 +02:00
Nikolaj Olsson
2122a8dc30 Add some missing translations for tts 2024-04-28 17:25:29 +02:00
Nikolaj Olsson
156513f453 Add delete key action for "unknown words" in OCR - thx RedSoxFan04 :)
Fix #8227
2024-04-28 10:27:25 +02:00
Nikolaj Olsson
82b070b0b7 Merge branch 'main' of https://github.com/SubtitleEdit/subtitleedit 2024-04-28 10:16:31 +02:00
Nikolaj Olsson
ba41510171 Update change log 2024-04-28 10:16:25 +02:00
Nikolaj Olsson
b512178dc5
Merge pull request #8269 from nkh0472/patch-108
Update zh-Hans.xml
2024-04-28 09:48:55 +02:00
nkh0472
b57d744e8c
Update zh-Hans.xml
for commit ecdcb7fe7e
2024-04-28 10:07:36 +08:00
Nikolaj Olsson
bc3f369e90 Do not auto-set assa style for existing ASSA files
Fix  #8249
2024-04-27 20:10:27 +02:00
Nikolaj Olsson
1946176eef Add new subtitle format - thx lererledd :)
Fix #8247
2024-04-27 19:48:20 +02:00
Nikolaj Olsson
1500ab3bb0 Fix crash in traslate - thx lambdacore12 :)
Fix #8263
2024-04-27 19:28:12 +02:00
Nikolaj Olsson
bb9b53a995
Merge pull request #8251 from ivandrofly/feature/listview-operators
Refactor list view item checking actions
2024-04-27 19:09:30 +02:00
Nikolaj Olsson
33735920fe
Merge pull request #8255 from diomed/main
Update hrv_OCRFixReplaceList.xml
2024-04-27 19:07:57 +02:00
Nikolaj Olsson
a19201b194
Merge pull request #8261 from bovirus/main
Update Itlian language
2024-04-27 19:07:41 +02:00
Nikolaj Olsson
0c6e8fb10f Add "refresh voices" context menu for Piper/ElevenLabs 2024-04-27 19:07:14 +02:00
bovirus
0143e60c24
Update Itlian language 2024-04-26 16:24:22 +02:00
Nikolaj Olsson
ecdcb7fe7e Add CPS option to modify selection - thx uckthis :)
Work on #8148
2024-04-26 06:53:15 +02:00
May Kittens Devour Your Soul
890c6af3e6
Update hrv_OCRFixReplaceList.xml 2024-04-25 10:57:54 +02:00
Nikolaj Olsson
c9ba8b7873 Merge branch 'main' of https://github.com/SubtitleEdit/subtitleedit 2024-04-24 18:27:27 +02:00
Nikolaj Olsson
9d39d1c9aa Add new format (LRC with ms) - thx eadmaster :)
Work on #8240
2024-04-24 18:27:21 +02:00
Ivandro Jao
3892288695 Refactor list view item checking actions
The list view item checking actions, such as "Select All" and "Invert Selection", have been refactored to their own methods (CheckAll, InvertCheck) to reduce repetition. These methods have been implemented in numerous forms across the code. This makes the codebase cleaner and more maintainable as the operations are abstracted out to separate methods.

Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
2024-04-24 11:02:26 +01:00
niksedk
88fa93fef8 Improve "Cancel" in batch burn-in - thx Leon :)
Fix  #8248
2024-04-24 07:34:58 +02:00
Nikolaj Olsson
452504a5cb Disable OK on tts is done 2024-04-23 07:13:48 +02:00
Nikolaj Olsson
63e6c96cad Handle .mp4 specially for gen video 2024-04-22 20:57:47 +02:00
Nikolaj Olsson
1854a38ca3 Minor burn-in ui fix 2024-04-22 20:14:31 +02:00
Nikolaj Olsson
c85c3556d9 Improve clean 2024-04-22 19:44:07 +02:00
Nikolaj Olsson
8615c0a126 Minor tts ui fix 2024-04-22 19:36:47 +02:00
Nikolaj Olsson
1aa8688c5c Minor tts fix 2024-04-22 19:14:59 +02:00
Nikolaj Olsson
12f66ed874
Merge pull request #8236 from diomed/main
srp ocr fixes
2024-04-22 15:53:52 +02:00
Nikolaj Olsson
40d40a4037 Minor ui fixes 2024-04-22 15:52:10 +02:00