Opened 18 years ago

Closed 18 years ago

#622 closed defect (fixed)

mythweb won't delete renamed recordings

Reported by: anonymous Owned by: xris
Priority: minor Milestone: 0.19
Component: mythweb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

If you have renamed recordings (using mythrename) then mythweb has trouble deleting them. I would guess, without having looked at the code, because it doesn't escape the spaces introduced to the file name.

Attachments (2)

mythweb_delete.log (8.7 KB) - added by anonymous 18 years ago.
Log produced using mythbackend -v important,general,network,file when deleting renamed file in mythweb
mythweb_deletion.diff (4.9 KB) - added by stuart@… 18 years ago.
Patch changing mythweb deletion to use chanid & starttime instead of filename

Download all attachments as: .zip

Change History (15)

comment:1 Changed 18 years ago by xris

Owner: changed from xris to Isaac Richards

It's definitely the spaces causing the issue... Isaac, if it's something I need to do, let me know and send the ticket back. Otherwise, I'll leave it up to you to fix at your leisure.

comment:2 Changed 18 years ago by cpinkham

If you can reproduce while running "mythbackend -v network,file,important,general" and attach the part of the log from around the delete, it would help solve this.

comment:3 Changed 18 years ago by cpinkham

Actually, make that "mythbackend -v important,general,network,file" since the important would override the network and file since important is explicit so it needs to be first in the list.

comment:4 Changed 18 years ago by anonymous

Just to acknowledge the request for logs. Will provide them when time & opportunity allow.

comment:5 Changed 18 years ago by anonymous

Log attached. I can't actually see anything there relating to the actual deletion of the recording, which was named "Little Women - 2005-07-16, 6-59 AM.mpg".

Changed 18 years ago by anonymous

Attachment: mythweb_delete.log added

Log produced using mythbackend -v important,general,network,file when deleting renamed file in mythweb

comment:6 Changed 18 years ago by anonymous

Owner: changed from Isaac Richards to xris

I don't think this has anything to do with the spaces, your log shows that MythWeb isn't even sending the DELETE_RECORDING request to the backend. I think the issue is with lines like the ones below in recorded_programs.php. I'm passing the ticket back to xris since I think this is a MythWeb issue.

if ($_GETdelete? && preg_match('/
d+_
d+/', $_GETfile?)) { ... preg_match('/\/(\d+)_(\d+)_\d+\.nuv$/', $_GETfile?, $matches);

The first one is the one causing the problem I think, but the second one needs to be fixed also since we now have .mpg files and we also let people rename them via mythrename.pl.

comment:7 Changed 18 years ago by anonymous

That was me, didn't realize I wasn't logged in.

comment:8 Changed 18 years ago by cpinkham

/me debates the embarassment of sending a third message in a row. :)

I was logged in that time, but didn't reload this particular tab before posting. :(

comment:9 Changed 18 years ago by anonymous

When I summized that the problem was due to the spaces in the filename, I meant that it was mythweb and not mythbackend that was having problems. It seems that is the case.

If Xris doesn't beat me to it I'll have a patch written in a minute (just need to grab breakfast first).

Changed 18 years ago by stuart@…

Attachment: mythweb_deletion.diff added

Patch changing mythweb deletion to use chanid & starttime instead of filename

comment:10 Changed 18 years ago by anonymous

Patched attached which changes mythweb to use chanid and starttime as the identifier in deletes instead of filename.

N.B. I've commented out an unrelated line which won't work under current SVN because it assumes all recordings use the nuv extension, I couldn't see what meant to be doing anyway. It can be uncommented if I was wrong.

comment:11 Changed 18 years ago by anonymous

I'm probably not understanding what y'all are saying, but thought I'd chime in. I've been using SVN mythweb and mythtv for the past couple months and had no problem using mythweb to delete files that end in .mpg, not .nuv.

comment:12 Changed 18 years ago by anonymous

The deletion problem has nothing to do with the file extension, but how the file is named. Mythweb expects it to follow the default chanid_starttime(_endtime) format. It doesn't allow deletion of recordings which have been renamed such as "Little Women - 2005-07-16, 6-59 AM.mpg"

comment:13 Changed 18 years ago by xris

Resolution: fixed
Status: newclosed

(In [8051]) My bad. I didn't notice that Isaac found the part in mythweb's code that I missed. This commit should close #622 and end the silly arguments.

(I may still take the chanid/starttime patch, but this is an easy quick fix)

Note: See TracTickets for help on using tickets.