[mythtv-commits] Ticket #3779: Rename all PNG previews after transcode

MythTV mythtv at cvs.mythtv.org
Mon Jul 30 20:32:00 UTC 2007


#3779: Rename all PNG previews after transcode
----------------------------------------------+-----------------------------
 Reporter:  sphery <mtdean at thirdcontact.com>  |       Owner:  ijr    
     Type:  patch                             |      Status:  new    
 Priority:  minor                             |   Milestone:  unknown
Component:  mythtranscode                     |     Version:  head   
 Severity:  medium                            |     Mlocked:  0      
----------------------------------------------+-----------------------------
 mythtranscode currently only renames the <basename>.png preview pixmap
 after a transcode from MPEG-2 to NUV.  Since MythWeb uses the UPnP code to
 create customized (sized) preview pixmaps that are also cached by the
 backend and whose filenames include dimensions, users who transcode to NUV
 end up with "orphaned" previews, as described in Otto's post at http://www
 .gossamer-threads.com/lists/mythtv/dev/275384#275384 .

 The attached patch, mythtv-mythtranscode_rename_png.patch, renames all
 preview pixmaps associated with the just-transcoded recording.  The patch
 contains two regex's, either of which would work.  The first (the one
 that's uncommented) will only match recordings of the format
 <basename>.100x0x155.png (i.e. with 3 dimensional numbers up to 4 digits
 for width and height and any number of digits for seconds in, all
 separated by "x"--I'm assuming the user will never create a preview whose
 size is greater than the recording's full resolution).  The second
 (commented) regex will match files with anything between "mpg" and ".png"
 (and is really more similar to the behavior of the code that deletes the
 files, which uses the shell glob "<basename>*.png", but the regex is
 slightly more permissive).  I'll let the reviewer decide which is more
 appropriate.

 I surrounded all the rename code in a check for jobArgs == "RENAME_TO_NUV"
 as that is the only situation I know of where the filename is changed.  If
 that assumption is not true, please let me know and I'll fix the patch.
 Also, by moving the preview renaming to the existing check for
 "RENAME_TO_NUV", the code could be slightly simpler, but I felt it was
 more appropriate to rename PNG's after renaming the recording.

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


More information about the mythtv-commits mailing list