[Fix] Handle invalid data-episode-count #1

Merged
bivashy merged 1 commits from fix/episode-range-parse into main 2025-09-14 13:46:43 +00:00
Showing only changes of commit faaa8c60bd - Show all commits

View File

@ -100,6 +100,9 @@ public class KodikHtmlParserService {
private static int parseIntSafely(String value) { private static int parseIntSafely(String value) {
try { try {
if (value.contains("~")) {
return Integer.parseInt(value.split("~")[1]);
}
return Integer.parseInt(value); return Integer.parseInt(value);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
log.error(String.format("invalid number format %s", value), e); log.error(String.format("invalid number format %s", value), e);