Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the 1299 DB upgrade (DeletedMaxAge update).
The 1299 upgrade modifies DeletedMaxAge for its new meaning, now that AutoExpireInsteadOfDelete is always enabled. Previously, 0 meant "expire when out of disk space" and was the default value; but after f78f999 , 0 means "expire immediately" and -1 means "expire when out of disk space." Both before and after f78f999, any positive value means to expire recording files that many days after deletion. However, the setting DeletedMaxAge was only ever written to the database if the user enabled AutoExpireInsteadOfDelete (triggering the DeletedExpireOptions TriggeredConfigurationGroup) and modified DeletedMaxAge to some value other than its default of 0. Therefore, most users did not actually have a value for DeletedMaxAge in their databases--whether they had enabled AutoExpireInsteadOfDelete or not. The DB upgrade needs to change DeletedMaxAge to -1 if and only if AutoExpireInsteadOfDelete is enabled and DeletedMaxAge has a value of 0 (or is still using the default). Because of the condition on the update, it did nothing for users with AutoExpireInsteadOfDelete enabled but without a value for DeletedMaxAge in the database. This resulted in their systems changing from "expire when out of space" to "expire immediately". Thanks to Thomas Boehm and Peter on the mythtv-users mailing list for noticing that their settings didn't carry over through the update. (cherry picked from commit abfced8)
- Loading branch information