[mythtv] MythArchive extension - request for discussion

Peter Schachte schachte at csse.unimelb.edu.au
Sun Mar 30 13:58:36 UTC 2008


Shawn C. Powell wrote:
> On Friday 28 March 2008 09:37, Peter Schachte wrote:
>> ... my script compares the DVD version of the file with
>> the on disk version, and then deletes the on-disk version if they're
>> identical. That seems simpler.
> 
> I agree its simpler.  I thought of that too.  I guess my paranoia prompted the 
> uncertainty that it might be possible to have an unplayable disk despite a 
> successful binary verification.  You're pretty satisfied thats sufficient? :)

I can't see why it wouldn't be.  If you've got the data and metadata, you
could always just put it back in myth (which is the point of native format),
so it's safe to delete it from the HD.  Of course, there's no guarantee you
won't accidentally skate the disk across the floor the minute you take it out
of the drive :-)

>> At the time you create 
>> the archive, you could tick a box saying you want the original files
>> deleted if the DVD burn is successfully verified, 
> 
> I agree.
> 
>> and another tick box 
>> saying you want the metadata kept around so you can still select the
>> videos/recordings from within myth.
> 
> Wouldn't it be rare that one would want to delete the meta-data?  If so, one 
> could just delete the recording from MythTV in the usual way.

Sure, but that's a separate action requiring you to go to different parts of
myth and find and select the same files; it would definitely be harder and
more error prone than selecting a tick box.  I'm not sure whether or not it
would be rare to delete the metadata.  My myth listings are pretty
overwhelming and slow to navigate already; when I have a few dozen more DVDs
of archived content, I just might start deleting the metadata (since I can
always put it back).

>> I found the tricky parts of the whole thing are popping up an
>> appropriate-looking dialog asking the user to insert a particular disk
> 
> Would we really need to prompt for a particular disk?  Presumably the archive 
> disk would be labelled appropriately

I'd need it.  If I had to flip through all my disks to find the one that has
what I want to watch, I wouldn't bother to keep the metadata around.  I'd
rather just find the disk I want to play, stick it in the drive and play it.
 Why should I have to find the file twice:  once in myth, and then again
among my archive collection?

> and MythTV already indicates that files 
> are not present on disk by dimming the recording title. (I think there's also 
> a message indicating "file not found".)

I mostly archive myth videos, not recordings.  And when the video manager
can't find the media for a video, it wants to delete the metadata (though I
don't know whether it would consider a dangling symlink to be a missing video).

> This holds true btw for symlinks;  
> If the archive is not mounted the recording is dimmed.  Perhaps a 
> simple "Please  insert the archive containing 'Stargate SG-1 Children of the 
> Gods' and press OK" would be sufficient?

It wouldn't be that hard for myth archive to have a text box (defaulting to
"Myth Archive") for a name for the disk you're going to burn and use that as
the disk label.  If you've used that label before, it could automatically add
a number to the end, like "Myth Archive 7."  All that would take is a
'mytharchive_label' table with 'label' and 'highest_number' columns. That
would make it all pretty automatic for the user; she'd just have to write the
disk name/number on the disk and store it where she could find it when asked
for it.  Myth would take care of the rest.

> Whereupon the DVD would be mounted 
> and the player could continue normally.  Unmounting would have to be handled.

I've got a script that pops up the prompt, waits for the disk to be inserted
(no need to hit return, which is difficult with a remote), plays the file,
and unmounts the disk.

> And there's a possible conflict with the CD/DVD monitoring functionality.

Good point.  I don't use that, so I haven't had to think about it.

> However, if we do decide to track disk labels, should that be implemented in 
> the database?

I replace the media file with a small text file containing the name of disk,
and update the database to refer to that file instead. My script reads the
file to construct the prompt.

> Could get messy.  What if you had multiple archives of the 
> same recording?

That wouldn't be a problem anyway; if that happens, any disk that has the
file would do.

> I still kind of favor the symlink approach but am willing to be convinced 
> otherwise. :)

AFICS, the advantage of the symlink approach is that the player just runs
once you've inserted and mounted the disk.  The disadvantage is that until
you find the right disk and insert it and somehow get it mounted, nothing
will happen when you try to play the file in myth.  There's nothing to tell
you what the problem is and what to do about it.  Not good for the WAF and KAF.

I'm not sure how well my approach would work for recordings, though.  I don't
know what myth would do if I replaced a recording file with a file with an
extension it doesn't know.  That might require some patches to myth proper
(or see my comment at the bottom).

> I agree that in home use it wouldn't be a large issue.  Do you suppose MythTV 
> has or will have many business/multi-user use?

I suppose multi-user use is an issue.  Two people on two different frontends
could be trying to archive the same file at the same time.  If so, probably
what they really want is to be told about it *before* they start burning the
disk, not just before they delete the files.

> Sounds like a fun and useful project to me too. :)

I've  already got more than a dozen archive disks I use this way.  And my 11
year old uses them all the time.

There has been some discussion on this list of using storage groups to handle
offline storage.  That's probably the nicest solution, if we can tie into it.
 See the thread on this list with the subject "mythvideo DB enhancement."  As
of a few minutes ago, George Nassas says he's working on it, though I'm not
sure exactly how it will work.

-- 
Peter Schachte              I worry that 10 or 15 years from now, [my child]
schachte at cs.mu.OZ.AU        will come to me and say 'Daddy, where were you
www.cs.mu.oz.au/~schachte/  when they took freedom of the press away from
Phone: +61 3 8344 1338      the Internet?' -- Mike Godwin


More information about the mythtv-dev mailing list