[mythtv-users] re-recording after hard drive crash
Michael T. Dean
mtdean at thirdcontact.com
Thu Oct 22 05:18:19 UTC 2009
On 10/22/2009 01:06 AM, Curtis Porter wrote:
> Nevermind, I figured it out -- it's not bad at all. In case it can
> help someone else:
> Go to the "Watch Recordings" screen, highlight "All Programs", hit "m"
> for the menu, and choose "Add to playlist". Then hit "m" again and
> choose "Playlist options" and then "Delete and Re-Record".
Yep. That's definitely the best way.
> You just have to touched all the files first so it will delete
> successfully.
Right, but /only/ do this if all your recordings files are in the same
directory or if you've actually lost /every/ single file (as you
did--just mentioning for anyone else reading/finding this in the archive).
> I did that with the following script (modified from a posting by
> kfitzpatrick):
>
> #!/bin/bash
> #
> RECORDINGDIR="/mnt/mythtv/store"
> MYSQLUSER="mythtv"
> MYSQLPASS="mythtv"
> #
> # Create a list of filenames from the database
> #
> for filename in `mysql -u $MYSQLUSER -p$MYSQLPASS --batch -e "SELECT
> basename FROM recorded ORDER BY basename" mythconverg`
> do
> echo "record is $RECORDINGDIR/$filename"
> touch "$RECORDINGDIR/$filename"
> done
I always liked:
mysql -umythtv -p mythconverg \
-e "SELECT CONCAT('touch ', basename) FROM recorded;" |
tail -n+2 > $HOME/touch_recordings_files
to make a nice script you can just run from the shell:
cd /path/to/recordings_dir
sh $HOME/touch_recordings_files
(but either way works)
Again, though, only do this if all your recordings are in the same
directory or if you've really lost all your recordings.
Mike
More information about the mythtv-users
mailing list