In the SpellCheckWordLists class, the redundant XML load operation in the 'else' clause has been removed. This change simplifies the code by getting rid of an unnecessary operation that was adding complexity and potentially slowing down the application.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The condition check in the IfoParser class has been refactored for better readability and correctness. Proper grouping of conditions within parentheses has been added to ensure appropriate execution order.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
The GetAllLanguages function in IfoParser.cs has been updated to improve the calculation of the variable minCount. It now takes into consideration the count of three component lists - Subtitles, SubtitleIDs, and SubtitleTypes - ensuring that the loop operates on the smallest size among them. This modification prevents potential out-of-range errors.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit optimizes the GetAllLanguages method within the IfoParser class. Instead of checking bounds within the loop, we calculate the minimum count between SubtitleIDs and SubtitleTypes before starting the iteration. This simplifies the logic and could potentially improve performance.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
Several classes, particularly the ones related to translation services, have been modified to implement IDisposable interface. Additionally, all instances of HttpClient are being disposed properly now using "using" keyword. This will help ensure that system resources are promptly released when they're no longer required, potentially improving application performance and stability.
Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>