Strip leading zeroes while preserving a real numeric zero (for example, S00 specials). (#160)

I always forget the regex syntax, so I can't really review the changes, but if it works…
This commit is contained in:
Brett Pynn authored and GitHub committed 2026-10-01 08:08:49 +02:00
1 parent d930bdb0a6
commit a48cb77aac
1 file changed
+1 -1
@@ -337,7 +337,7 @@ sub new {
# Cosmetics # Cosmetics
for my $key (qw(dvd season episode endep part)) { for my $key (qw(dvd season episode endep part)) {
$self->{$key} =~ s/^0+// if defined $self->{$key}; $self->{$key} =~ s/^0+(?=\d)// if defined $self->{$key};
} }
$self->{endep} = undef if $self->{endep} == $self->{episode}; $self->{endep} = undef if $self->{endep} == $self->{episode};