Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use settings code to store mythfilldatabase HaveRepeats.

Modify mythfilldatabase to use the main settings code to store the
HaveRepeats setting data.  This will prevent scheduling issues that can
occur when users/scripts/packages/whatever break the MythTV settings
table data through direct DB editing or invalid partial database restore
procedures, or when users have extremely bad luck and that one
particular row is corrupted in the database binary data files and
"fixed" by mysqlcheck/REPAIR table by deleting the row.
  • Loading branch information...
commit f37917f9476aadf33f2eb35df5d423700a438c33 1 parent d27bedf
Michael T. Dean sphery authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 mythtv/programs/mythfilldatabase/main.cpp
14 mythtv/programs/mythfilldatabase/main.cpp
View
@@ -676,19 +676,9 @@ int main(int argc, char *argv[])
if (query.exec() && query.next())
{
if (query.value(0).toInt() != 0)
- {
- query.prepare("UPDATE settings SET data = '1' "
- "WHERE value = 'HaveRepeats';");
- if (!query.exec())
- MythDB::DBError("Setting HaveRepeats", query);
- }
+ gCoreContext->SaveSettingOnHost("HaveRepeats", "1", NULL);
else
- {
- query.prepare("UPDATE settings SET data = '0' "
- "WHERE value = 'HaveRepeats';");
- if (!query.exec())
- MythDB::DBError("Clearing HaveRepeats", query);
- }
+ gCoreContext->SaveSettingOnHost("HaveRepeats", "0", NULL);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.