Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: space cleanup: optimize the file deletion and load the log reten…
…tion timer
  • Loading branch information
perexg committed Dec 13, 2015
1 parent 4c73241 commit 1d8feb6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/dvr/dvr_vfsmgr.c
Expand Up @@ -261,9 +261,12 @@ dvr_disk_space_cleanup(dvr_config_t *cfg)
lang_str_get(oldest->de_title, NULL), tbuf, TOMIB(fileSize));

dvr_disk_space_config_lastdelete = dispatch_clock;
dvr_entry_delete(oldest, 1); // delete actual file
if (dvr_entry_get_retention_days(oldest) == DVR_RET_ONREMOVE)
if (dvr_entry_get_retention_days(oldest) == DVR_RET_ONREMOVE) {
dvr_entry_delete(oldest, 1); // delete actual file
dvr_entry_destroy(oldest, 1); // also delete database entry
} else {
dvr_entry_delete(oldest, 0); // delete actual file
}
} else {
tvhlog(LOG_WARNING, "dvr", "%s \"until space needed\" recordings found for config \"%s\", you are running out of disk space very soon!",
loops > 0 ? "Not enough" : "No", configName);
Expand Down

0 comments on commit 1d8feb6

Please sign in to comment.