[mythtv] tv.com perl script

Peter Kornhuld Webmaaschter at gmx.de
Tue Mar 14 15:54:35 UTC 2006


Am Dienstag, 14. März 2006 16:43 schrieb Webmaaschter at gmx.de:
> Your script didnt Work if the Title begins with an big S like in "Desperate
> Housewifes.SxxEyy.Silly.avi". your script tought the S of Silly is part of
> the (SxxEyy). Here my Patch:
>
> At ~Line 250 (dont know exactly, because i changed a lot to suit my needs)
>
> if ( $fileNameType == 1 ) {
> #Show.Name.S01E01.Episode Name.avi
> <$filename =~ s/[sS]([0-9]+)[eE]([0-9]+)/S\1E\2/g; #uppercase
> <my $strPos1 = rindex( $filename, ".S" );
>
> >$filename =~ s/[sS]([0-9]+)[eE]([0-9]+)/\.S\1E\2/g; #uppercase
> >my $strPos1 = rindex( $filename, "..S" );
>
> Greets
> Christoph
Hey Christoph.... if you steal my patches... take the hole one... :) See you 
at work!
  
	#Show Name
	$returnData[0] = substr( $filename, 0, $strPos1);
	#Season
<	$returnData[1] = substr( $filename, $strPos1 + 2, $strPos2 - $strPos1 - 2 );
>	$returnData[1] = substr( $filename, $strPos1 + 3, $strPos2 - $strPos1 - 3 );
	#Episode
	$returnData[2] = substr( $filename, $strPos2 + 1, $strPos3 - $strPos2 - 1 );
Bye
Peter

 _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


More information about the mythtv-dev mailing list