[mythtv] [mythtv-commits] Ticket #3522: Deleting a video doesn't delete the .png in the data directory

Nick Morrott knowledgejunkie at gmail.com
Thu Aug 9 08:29:05 UTC 2007


On 09/08/07, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> On 08/09/2007 03:21 AM, Nick Morrott wrote:
> > On 09/08/07, Michael T. Dean <mtdean at thirdcontact.com> wrote:
> >> Did the PNG's have the old name still?  If so, see
> >> http://svn.mythtv.org/trac/ticket/3779 .
> >>
> >
> > No. This was after new thumbnails had been created using the new
> > recorded.basename value after I had manually deleted the old
> > thumbnails which had not been renamed. I refreshed the recorded
> > programs page in MythWeb and the new files were created. I then
> > deleted the files via MythWeb, and the thumbnails were left behind. I
> > shall try and test this more with your new patch in place to avoid
> > having to have the thumbnails regenerated.
>
> UTF or some kind of special characters in the filenames?

Nope.

> In theory, they should all be deleted.  See

I just repeated the deletion/recreation process - renamed files had
their thumbnails deleted, forced them to be recreated via MythWeb's
Recorded Programs listing, and then deleted them. Same outcome.

> programs/mythbackend/mainserver.cpp around line 1534, specifically:
>
>     QDir      dir  ( fInfo.dirPath(), fInfo.fileName() + "*.png" );
>
> So, the only way I could see them sticking around is a) if there's
> something "wrong" with the filename or b) if the PNG's happened to be in
> the wrong directory (i.e. you moved the recordings--which Storage Groups
> allows--and forgot to move the PNG's, so others may have been created in
> the new directory and were properly deleted, leaving the old PNG's in
> the old directory).  Since you ran mythrename.pl (and renamed the files
> instead of using links), either is possible.

a) I'll post the filenames below in case you can see anything untoward.

After recreation of PNGs and before deletion of the recording:

-rw-r--r--  1 root   root   3262152124 Aug  4 22:42 Rush Hour 2
(Untitled) - CH4 - 2007-08-04-2059.mpg
-rw-r--r--  1 root   root         8540 Aug  9 08:11 Rush Hour 2
(Untitled) - CH4 - 2007-08-04-2059.mpg.100x0x390.png
-rw-rw-rw-  1 root   root        19294 Aug  9 08:07 Rush Hour 2
(Untitled) - CH4 - 2007-08-04-2059.mpg.png

Note the current timestamps of the recreated PNG via MythWeb earlier.
I have not watched the movie, so there's been no other updating of the
thumbnails.

After deletion of the recording via via MythWeb:

-rw-r--r--  1 root   root         8540 Aug  9 08:11 Rush Hour 2
(Untitled) - CH4 - 2007-08-04-2059.mpg.100x0x390.png
-rw-rw-rw-  1 root   root        19294 Aug  9 08:07 Rush Hour 2
(Untitled) - CH4 - 2007-08-04-2059.mpg.png

The PNGs are left behind...


b) PNGs were created in the same directory as the recordings file, as
per usual on my system. There is only 1 storage directory configured.

I shall look at the code you kindly pointed out (and maybe add some
debug output) and see if I can see anything odd happening.

Cheers,
-- 
Nick

MythTV Official wiki:
http://mythtv.org/wiki/
MythTV users list archive:
http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-dev mailing list