[mythtv] Ticket #7916: Automatically save cutlist during editing

Michael T. Dean mtdean at thirdcontact.com
Thu Sep 16 18:06:00 UTC 2010


  On 09/16/2010 01:04 PM, Jim Stichnoth wrote:
> On Thu, Sep 16, 2010 at 2:47 AM, MythTV<mythtv at cvs.mythtv.org>  wrote:
>> #7916: Automatically save cutlist during editing
>>
>> Comment:
>>
>>   Michael, can this be closed now?
> I agree that with Mike's new code that offers an explicit save
> operation during editing, there's far less of a need for my patch,
> which by the way is out of date.
>
> But I'm still committed to the idea of auto-saving cutlist changes as
> they are made, since I still have the occasional system lockup during
> editing and I'm too lazy to press a SAVE key once in a while.
>
> Can anyone think of an acceptable way to pass an auto-save option into
> the editing session?  Clearly, introducing a new setting is not
> acceptable.  I can think of a few options:
>
> 1. A new menu item in the TV Playback context, "Edit with auto-save".
> This clutters the menu, but currently the Jobs menu (which contains
> the Edit item) has only 3 items.
>
> 2. A key binding in the TV Playback context that enters the editor
> with auto-save enabled.  This might be a problem for me, as I think
> all my remote control buttons are in use for the TV Playback context.
>
> 3. A new menu somewhere in the TV Editing context that
> enables/disables auto-save.  This clutters the menus.
>
> 4. A key binding in the TV Editing context that toggles autosave.  My
> remote control has lots of buttons available in this context.

I don't like the idea of the user's having to decide.

I think if auto-save is implemented using a new "temporary" mark type 
that's not an actual cut list mark type (not MARK_CUT_START/END), but 
that gets converted to a real cut list when the user (explicitly) saves, 
it provides the best of both worlds.  It always auto-saves as the user 
works, but doesn't ever save a partial/incorrect cut list to the database.

It should be relatively straightforward--even if you work with actual 
cut list marks in memory using DeleteMap, and just add a new function, 
such as DeleteMap::SaveInProgressMap() (better name highly appreciated), 
that converts MARK_CUT_START/END to MARK_EDIT_START/END (again, better 
name appreciated) and saves the in-progress cut list using the temporary 
mark types.  Then, just make sure that the places that currently 
DeleteMap::SaveMap() don't convert types.  And have 
MythPlayer::EnableEdit() load the in-progress marks, if they exist, or 
keep the cut list marks, if not.  And, have the REVERT actions clear the 
temporary marks.  (I'm sure some modifications to the plan will be 
necessary as you dig into the details, but that's my high-level view of 
my initial plan.)

This would also fit well with my planned changes to allow seeing/seeking 
using different mark types--so much so that if you'd prefer to start 
down that path, first, or just wait for those changes, it may make it 
easier to work with temporary types and make the auto-save functionality 
fit well with the design.

In the meantime, since the patch on #7916 won't apply and will require 
reworking, I'll close the ticket.  If you decide to reimplement it 
(using the above approach, or any better approach someone offers), you 
can reopen the ticket or create a new one.

Thanks,
Mike


More information about the mythtv-dev mailing list