Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#10810 closed Patch - Bug Fix (fixed)

Commercial flagging on remote host

Reported by: fedora@… Owned by: sphery
Priority: minor Milestone: 0.25.2
Component: MythTV - Mythcommflag Version: 0.25-fixes
Severity: low Keywords:
Cc: Ticket locked: no

Description

I noticed that when mythcommflag is run on a host that does not have file access to the recording, it exists reporting that it is unable to find the recording. The following patch seems to have fixed the issue for me:

diff --git a/mythtv/programs/mythcommflag/main.cpp b/mythtv/programs/mythcommflag/main.cpp
index 74d161f..c9fb56a 100644
--- a/mythtv/programs/mythcommflag/main.cpp
+++ b/mythtv/programs/mythcommflag/main.cpp
@@ -627,12 +627,7 @@ static qint64 GetFileSize(ProgramInfo *program_info)
     if (filename.startsWith("myth://"))
     {
         RemoteFile remotefile(filename, false, false, 0);
-        struct stat filestat;
-
-        if (remotefile.Exists(filename, &filestat))
-        {
-            size = filestat.st_size;
-        }
+        size = remotefile.GetFileSize();                 
     }
     else
     {

Change History (5)

comment:1 by fedora@…, 14 years ago

One minor note, without modifying the code mythcommflag does work when run remotely for recordings stored in a master backend storage group. I think this is because the static "Exists" method queries the master backend for the file size.

comment:2 by sphery, 14 years ago

Owner: changed from cpinkham to sphery
Status: newaccepted

comment:3 by Michael T. Dean <mdean@…>, 14 years ago

Resolution: fixed
Status: acceptedclosed

In c5803f1dc6b1da7d77222c43ce074bb04d9bc983/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:4 by Michael T. Dean <mdean@…>, 14 years ago

In 648f0aec326c03b39091fda8ac64450d0f0e76e3/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:5 by sphery, 14 years ago

Milestone: unknown0.25.2
Note: See TracTickets for help on using tickets.