[mythtv] FIX "do not autoexpire" Flag made persistent
Chris Pinkham
cpinkham at bc2va.org
Tue Oct 5 01:24:15 UTC 2004
> for the ones who need it I have made this Patch to prevent recordings with
> the Flag "do not autoexpire" to also not being deleted when they are the
> oldest recording in a "don't record if this would exceed the max episode" task.
> The recordings which have the "do not expire" Flag are also not counted as
> one of the episodes.
>
> For example:
> Max episodes set to 5
> 2 flagged as "do not expire"
> Maximal 7 episodes in this group
>
> Now I need a little help for the other way around "don't record when max":
> I think I found the checking routine but my changes seems not to work,
> maybe someone could help me or lead me to find the right place.
>
> Thanks in advance for all your help.
>
> Marcel
I've had a few of the emails on this subject saved off so I could reply to
them and haven't had a chance yet, but figured I should go ahead since
someone is actually coding on this.
I think that "Max Episodes" should mean "Max Episodes", not "Max Episodes
except when blah."
I also think the two settings (Max Episodes and Auto-Expire) should be kept
independent of each other as they function now and as they were intended
to function by the original author (me). :)
The best way I see to accomplish what you and others want is to add a
column to the recorded table which allows the user to flag a recording as
UnDeletable. This has been discussed several times on the list but no-one
has stepped up to code it and it hasn't been a itched me enough for me to
scratch it. The new "undeletable" field should apply in all delete
situations:
- If the user tried to delete the recording in mythfrontend, a "nice"
popup would let them know it was undeletable (and preferably, don't
even show them the delete button on the popup menu).
- The Delete code in mythbackend would check the undeletable field before
deleting a recording (to make sure no other process other than
mythfrontend/mythweb can delete a recording)
- The max episodes code would skip items marked as undeletable when
searching for a recording to delete. It would still not allow more
than X recordings if Max Episodes was set to X, but would only delete
things not marked as undeletable.
- Auto-Expire would honor the undeletable flag and would exclude
undeletable recordings from the auto-expire ordered list when it tried
to determine what recording to delete if necessary.
- MythWeb should check the undeleteable field and not display the Delete
button for a recording.
Auto-expire means Auto-Expire and Max Episodes means Max Episodes and hacking
in a few special cases will only make things more confusing for the user and
make the code harder to follow. If there is some form of UnDeletable field,
it's easy to understand and would/should be globally applied. I think this
would cover all the situations that people have presented and be clearer.
This also gives people protection from things like kids accidentally deleting
that movie you've been waiting 2 months to see that just recorded last week
but you haven't had a chance to watch yet. :)
> here the Diff for the "don't record if this would exceed the max episode" part :
Actually, I think that was the diff for the "don't delete recordings that
aren't set to auto-expire when you're looking to delete recordings over the
max episodes limit" part. :)
--
Chris
More information about the mythtv-dev
mailing list