Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#171 closed patch (fixed)

Add "lowest priority first" auto-expire policy

Reported by: Robert Tsai <rtsai1111> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords: auto-expire
Cc: Ticket locked: no

Description

Currently, the only auto-expire policies are "none" and "oldest show first".

This patch adds a new "lowest priority first" policy that orders by recpriority (from the schedule's recpriority value) before ordering by starttime.

I'm not 100% confident in my LEFT JOINs, but they appear to be doing the right thing, according to "mythbackend --printexpire" .

Attachments (4)

mythtv.autoexpire.priority.diff (4.0 KB) - added by Robert Tsai <rtsai1111> 14 years ago.
mythtv.autoexpire.priority.2.diff (7.6 KB) - added by Robert Tsai <rtsai> 14 years ago.
mythtv.autoexpire.priority.3.diff (8.8 KB) - added by Robert Tsai <rtsai1111> 14 years ago.
mythtv.autoexpire-priority.171.diff (8.8 KB) - added by Robert Tsai <rtsai1111> 14 years ago.

Download all attachments as: .zip

Change History (11)

Changed 14 years ago by Robert Tsai <rtsai1111>

comment:1 Changed 14 years ago by Robert Tsai <rtsai1111>

Oops. I just re-read the thread discussing this topic:

http://www.gossamer-threads.com/lists/mythtv/users/135759

I did not implement the suggestion to copy over the recpriority from record to recorded. This means that one-time recordings will be given a default recpriority of 0 (due to the LEFT JOIN), which means they will be auto-expired first (even if the one-time recording was originally scheduled with a high priority).

I will work on that later.

Changed 14 years ago by Robert Tsai <rtsai>

comment:2 Changed 14 years ago by Robert Tsai <rtsai>

This second patch implements copying of the recpriority value from the "record" table to the "recorded" table, so that recpriority is preserved for one-time recordings.

Changed 14 years ago by Robert Tsai <rtsai1111>

comment:3 Changed 14 years ago by Robert Tsai <rtsai1111>

This last (final) patch (#3) adds recpriority information to the output of "mythbackend --printexpire".

Changed 14 years ago by Robert Tsai <rtsai1111>

comment:4 Changed 14 years ago by Robert Tsai <rtsai1111>

Latest diff is updated against SVN#7004 for dbcheck.cpp

comment:5 Changed 14 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7223]) Closes #171.

Adds a new autoexpire policy.

It sorts by priority then age so that lower priority shows are deleted first.

This updates the DB schema and I recommend anyone with a remote backends upgrade them at the same time if they want this functionality in the future. If you don't any new recordings on the remote backend will be considered to have the default priority for the new auto-expire method.

comment:6 Changed 14 years ago by cpinkham

(In [7234]) Patch by Robert Tsai to update recpriority on recorded programs when the recpriority on the Scheduled Recording for that program is changed. References #171, Closes #311.

comment:7 Changed 14 years ago by cpinkham

(In [7756]) Apply the rest of Robert Tsai's "Update metadata of recorded programs when adjusting recording schedules" patch. This updates the recpriority, recgroup, transcoder, and timestretch values on recorded programs when their corresponding scheduled recording entry is updated.

References #171, Closes #311.

Note: See TracTickets for help on using tickets.