[mythtv-commits] Ticket #10778: getTagger holds file open after use

MythTV noreply at mythtv.org
Thu May 31 08:16:38 UTC 2012


#10778: getTagger holds file open after use
----------------------------------+----------------------------
 Reporter:  mayfields@…           |          Owner:
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  unknown
Component:  Plugin - MythMusic    |        Version:  0.25-fixes
 Severity:  low                   |     Resolution:
 Keywords:                        |  Ticket locked:  0
----------------------------------+----------------------------

Comment (by mayfields@…):

 2 patches attached. Each addresses the issue in a different way.

 patch.lastopenfile.1 calls MetaIOID3::read() with a NULL argument after
 each use of the tagger, once the tagger is no longer required. This forces
 the file closed.

 patch.lastopenfile.2 is a partial re-write of MetaIOID3 to close file
 immediately after use each time. This more closely matches the other
 metaIO classes which all close the file each time.

 Each patch has been tested with file import using FLAC and mp3 files in
 various scenarios. Other aspects have not been tested. Beyond that case no
 further testing conducted. Written and compiled against 0.25-fixes but
 should also compile against mythtv-master.

 I do not know whether it is desirable to fix this behaviour or whether it
 is intended. There may be a reason I am not aware of to keep the file
 open, beyond the elegance of preventing the opening and closing of a file
 multiple times to read or write metadata details.

 Use cases where this may be a problem is with users who may plug in a
 portable music player or other external storage device or network storage
 containing music and scan this in order to play music, intending to
 unmount it after use. Keeping the file open may either prevent unmounting
 or lead to filesystem errors due to unmounting (or simply unplugging) with
 files in use. There may be a reasonable assumption that no files are in
 use after exiting the music screens. However, as the file is only finally
 closed at mythfrontend exit this assumption would be incorrect.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/10778#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list