[mythtv-commits] Ticket #12680: ThemeUpdateChecker accesses Videos storage group

MythTV noreply at mythtv.org
Tue Mar 15 17:53:45 UTC 2016


#12680: ThemeUpdateChecker accesses Videos storage group
----------------------------------+----------------------------
 Reporter:  thigger@…             |          Owner:
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  unknown
Component:  MythTV - General      |        Version:  0.27-fixes
 Severity:  medium                |     Resolution:
 Keywords:                        |  Ticket locked:  0
----------------------------------+----------------------------

Comment (by mdean):

 allowFallback defaults to true

 https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/storagegroup.h#L14

 Therefore, unless disabling fallback is explicitly requested, MythTV will
 always fall back to searching through all SGs.

 So, since ThemeUpdateChecker::checkForUpdate() uses RemoteFile::Exists():

 https://github.com/MythTV/mythtv/blob/master/mythtv/programs/mythfrontend/themechooser.cpp#L1090

 which creates a StorageGroup without specifying allowFallback:

 https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/remotefile.cpp#L493

 and RemoteFile::Exists() sends a QUERY_FILE_EXISTS, which is handled by
 MainServer::HandleQueryFileExists() which creates a StorageGroup without
 specifying allowFallback:

 https://code.mythtv.org/cgit/mythtv/tree/mythtv/programs/mythbackend/mainserver.cpp#n3513

 the ThemeUpdateChecker (and, actually, any use of RemoteFile) will always
 use allowFallback = true.

 Modifying RemoteFile to allow MythTV URLs that specify allowFallback (or
 even the quick and dirty approach of creating a new method for RemoteFile
 that doesn't do fallback--though this would still require modifying the
 QUERY_FILE_EXISTS backend protocol command to permit specifying
 allowFallback since adding a new backend protocol command would be
 extremely dirty) would allow code that doesn't desire fallback to do a
 quick check of only the specified SG's directories.

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12680#comment:6>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list