Modify

Ticket #10810 (closed Patch - Bug Fix: fixed)

Opened 13 months ago

Last modified 13 months ago

Commercial flagging on remote host

Reported by: fedora@… Owned by: mdean
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
     {

Attachments

Change History

comment:1 Changed 13 months 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 13 months ago by mdean

  • Owner changed from cpinkham to mdean
  • Status changed from new to accepted

comment:3 Changed 13 months ago by Michael T. Dean <mdean@…>

  • Status changed from accepted to closed
  • Resolution set to fixed

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 13 months 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 13 months ago by mdean

  • Milestone changed from unknown to 0.25.2
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.