Browse Source

Update serbur thingy to just pass a wildcard extension, shell gl0bbing will resolve the file if it exists but it might affect both .srt and .ass (if you have multiple subs with the same base name) xd

Wazakindjes 8 months ago
parent
commit
51b9c42a45
1 changed files with 3 additions and 3 deletions
  1. 3 3
      serbur/srthax_serbur.pl

+ 3 - 3
serbur/srthax_serbur.pl

@@ -13,7 +13,7 @@ use IO::Socket::INET;
 use IO::Socket::SSL;
 
 # Better not touch these niQQa ;]
-my $MUHVERSION = '1.0';
+my $MUHVERSION = '1.0.1';
 my $PING_NOAUTH = -3;
 my $PING_DED = -2;
 my $PING_EXIT = -1;
@@ -232,9 +232,9 @@ sub srthaxem {
 	my $subname = ($args->{subname});
 	my $tabs = $args->{tabs} || 0;
 
-	$subname =~ s/\.[A-Za-z0-9]+$/.srt/;
+	$subname =~ s/\.[A-Za-z0-9]+$//;
 
-	my $haxout = trimmem(`$srthax $srthax_opts --start $start -- $timeshift "$subtitle_dir/$subname" 2>&1`);
+	my $haxout = trimmem(`$srthax $srthax_opts --start $start -- $timeshift "$subtitle_dir/$subname".* 2>&1`);
 	if($haxout =~ /\[(ERROR|WARN)\]/) {
 		printem("Got an error from srthax: $haxout", $tabs);
 		return { err => 1, msg => $haxout };