Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Cleaning up /var/lib/mythtv

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


sjackman at gmail

Nov 26, 2004, 10:41 AM

Post #1 of 3 (3640 views)
Permalink
Cleaning up /var/lib/mythtv

Hello all,

I have 17 shows recorded (acording to MythTV), but I have 26 nuv files
in /var/lib/mythtv. It seems there's a few files in there that MythTV
has forgotten about. Is there an automated tool to clean this
directory up? That is to say, remove all the files that aren't known
to MythTV.

Please cc me in your reply. Thanks,
Shaun


amp1ron at gmail

Nov 26, 2004, 11:35 AM

Post #2 of 3 (3491 views)
Permalink
Re: Cleaning up /var/lib/mythtv [In reply to]

On Fri, 26 Nov 2004 10:41:50 -0800, Shaun Jackman <sjackman [at] gmail> wrote:
> I have 17 shows recorded (acording to MythTV), but I have 26 nuv files
> in /var/lib/mythtv. It seems there's a few files in there that MythTV
> has forgotten about. Is there an automated tool to clean this
> directory up? That is to say, remove all the files that aren't known
> to MythTV.
>
> Please cc me in your reply. Thanks,
> Shaun

I don't know of a tool to do that, but what I've done in the past is
delete the .png
files from the recordings directory, then go back into mythfrontend and arrow
down through all of the know recordings. That recreates a new .png file for
each known recording. I then deleted all of the .nuv files that didn't have a
corresponding .png file. By the way, I did this with mythfrontend set up to
have the browser show a frame from the start of the movie, not a clip.

--
Ron Pool <amp1ron [at] gmail>


sjackman at gmail

Nov 26, 2004, 2:24 PM

Post #3 of 3 (3463 views)
Permalink
Re: Cleaning up /var/lib/mythtv [In reply to]

Thanks Ron, your trick worked very well. For a lark I also wrote a
short shell script to list the nuv files that mythtv has forgotten
about:

[mythforgotten]
#!/bin/sh
cd /var/lib/mythtv
for i in `mysql -u mythtv --password=mythtv mythconverg -e \
'select chanid, starttime, endtime from recorded' |
perl -wne 'next if $. == 1; s/|//g; s/-//g; s/://g; @_ = split;
print join( '_', $_[0], $_[1].$_[2], $_[3].$_[4]) . ".nuv\n";'` \
`ls *.nuv`;
do echo $i; done | sort | uniq -u | xargs du -sh | grep nuv$

and if you like, here's the companion script, which lists the nuv
files that myth does know about:

[mythls]
#!/bin/sh
cd /var/lib/mythtv
mysql -u mythtv --password=mythtv mythconverg -e \
'select chanid, starttime, endtime from recorded' |
perl -wne 'next if $. == 1; s/|//g; s/-//g; s/://g; @_ = split;
print join( '_', $_[0], $_[1].$_[2], $_[3].$_[4]) . ".nuv\n";' |
sort | xargs du -sh

Cheers,
Shaun


On Fri, 26 Nov 2004 14:35:35 -0500, Ron Pool <amp1ron [at] gmail> wrote:
> I don't know of a tool to do that, but what I've done in the past is
> delete the .png
> files from the recordings directory, then go back into mythfrontend and arrow
> down through all of the know recordings. That recreates a new .png file for
> each known recording. I then deleted all of the .nuv files that didn't have a
> corresponding .png file. By the way, I did this with mythfrontend set up to
> have the browser show a frame from the start of the movie, not a clip.

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.