[mythtv-users] Remove an entire storage group and delete all recordings in it

Brent Bolin brent.bolin at gmail.com
Fri Dec 24 21:44:27 UTC 2010

On Fri, Dec 24, 2010 at 12:28 PM, Michael T. Dean
<mtdean at thirdcontact.com> wrote:
>  On 12/24/2010 11:11 AM, George Nassas wrote:
>> On 2010-12-24, at 9:57 AM, Brent Bolin wrote:
>>> Example:
>>> /var/lib/mythtv/recordings
>>> /some/other/location (want to remove this one)
>> Of course it's easy enough to remove the directory/storage group using
>> mythtv-setup but the trick is to get myth to isolate the recordings in that
>> dir so they can be deleted.
>> I think you have to resort to sql
> No.  (And the SQL has some issues, anyway.)
> Your best bet is to remove the Storage Group from mythtv-setup (
> http://www.gossamer-threads.com/lists/mythtv/users/443159#443159 --so on the
> mythtv master backend, run mythtv-setup (with all backends shut down) and
> highlight the other storage group and hit Delete***).  Then, assuming that
> there are no other storage groups that include the directory
> /some/other/location (if not, see the *** below), start all your mythbackend
> processes on all hosts, run find_orphans.py (
> http://www.mythtv.org/wiki/Find_orphans.py , and see
> http://www.mythtv.org/wiki/Category:Scripts for how to download it), and
> tell it to remove the recording metadata for the "Recordings with missing
> files".
> From this point, you can do what you want with the /some/other/location
> directory and its contents.
> Mike
> ***And, if you--like most users--don't get the difference between a Storage
> Group (list of directories) and a directory (something you put into one or
> more Storage Groups), and you really meant that you want to delete a
> directory from a Storage Group and remove all the files in that directory
> (or if /some/other/location exists in multiple Storage Groups), you would
> still use the above procedure, except you must go into mythtv-setup on each
> backend on which you've specified directory lists for storage groups, find
> /some/other/location in any Storage Group in which it exists, highlight that
> directory, and hit D to delete.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

A little confused about http://www.mythtv.org/wiki/Find_orphans.py(.24 version)

I just ran this script about a week ago and it found all kinds of
orphaned mpeg files.  But the script Only shows discrepancies.  I
manually deleted the mpeg files.

Created this by copy and pasting because I had no idea that
/usr/bin/mythwikiscripts existed.

When I use the download script or copy and past from the web page
today the Find_orphans.py are different sizes.  Was this updated to do
more then just Display Discrepancies?

Also I'm getting errors when trying to run the new script -

root at myth:/home/mythtv/bin# ./find_orphans.py
Traceback (most recent call last):
  File "./find_orphans.py", line 225, in <module>
  File "./find_orphans.py", line 161, in main
    recs, zerorecs, orphvids, orphimgs, dbbackup, unfiltered = populate(host)
  File "./find_orphans.py", line 84, in populate
    recs = list(DB.searchRecorded(**kwargs))
  File "/usr/lib/pymodules/python2.6/MythTV/utility.py", line 139, in __call__
    where,fields,joinbit = self.parseInp(kwargs)
  File "/usr/lib/pymodules/python2.6/MythTV/utility.py", line 176, in parseInp
    raise TypeError(errstr % (self.__name__, key))
TypeError: searchRecorded got an unexpected keyword argument 'livetv'

I still have the old script and it works just fine.

Mythtv .24
Mythbuntu Ubuntu 10.04.1 LTS

More information about the mythtv-users mailing list