[mythtv-commits] Ticket #4058: Perl bindings: allow disabling illegal character replacement in format_name()

MythTV mythtv at cvs.mythtv.org
Sun Oct 7 00:29:08 UTC 2007


#4058: Perl bindings: allow disabling illegal character replacement in
format_name()
----------------------------------------------+-----------------------------
 Reporter:  sphery <mtdean at thirdcontact.com>  |       Owner:  xris   
     Type:  enhancement                       |      Status:  new    
 Priority:  minor                             |   Milestone:  unknown
Component:  perl / nuvexport                  |     Version:  head   
 Severity:  medium                            |     Mlocked:  0      
----------------------------------------------+-----------------------------
 The attached trivial patch, mythtv-perl_bindings-
 disable_replacements_in_format_name.patch , allows a user to specify that
 replacement of illegal characters should not be performed in the
 format_name() method of MythTV::Program.  It simply adds a new parameter
 to the method ($no_replace) which defaults to 0 (false--replacements occur
 by default, as before).

 The patch allows the use of format_name() for "general-purpose" formatting
 (even for non-filename uses).

 To disable illegal character replacement, use:

 my $name =
 $show->format_name($format,$separator,$replacement,$allow_dirs,$underscores,1);

 To enable illegal character replacement, specify a 0 or simply do not
 specify a value for $no_replace (so the above would be identical, but the
 ",1" would be changed to ",0" or removed from the method call).

 This patch was tested with mythrename.pl, the only place in the current
 mythtv distribution where format_name() is used, and it works without
 modification even after this patch is applied.  I've also written my own
 scripts and specified only one parameter (the format) and illegal
 character replacement worked the same as before the patch.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/4058>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list