Opened 12 years ago

Closed 12 years ago

Last modified 12 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 Changed 12 years ago by fedora@…

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 Changed 12 years ago by sphery

Owner: changed from cpinkham to sphery
Status: newaccepted

comment:3 Changed 12 years ago by Michael T. Dean <mdean@…>

Resolution: fixed
Status: acceptedclosed

In c5803f1dc6b1da7d77222c43ce074bb04d9bc983/mythtv:

Fix exists check in mythcommflag

for files that aren't visible to the master backend. Thanks to fedora a
ready2think for the patch. Fixes #10810.

comment:4 Changed 12 years ago by Michael T. Dean <mdean@…>

In 648f0aec326c03b39091fda8ac64450d0f0e76e3/mythtv:

Fix exists check in mythcommflag

for files that aren't visible to the master backend. Thanks to fedora a
ready2think for the patch. Fixes #10810.
(cherry picked from commit c5803f1dc6b1da7d77222c43ce074bb04d9bc983)

comment:5 Changed 12 years ago by sphery

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