Author Topic: Maybe found an issue with mythtv_setup.pl  (Read 3002 times)

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Maybe found an issue with mythtv_setup.pl
« on: March 26, 2010, 05:19:06 pm »

The part in the code below which adds FK_Device_ControlledVia = '$PK_Device' as a condition for the found storage devices means that only storage devices which are controlled by a core or MD are picked up by the script. I have some shares attached to a NAS which are not picked up, as this final constraint does not permit it.

Does anyone know why it's like this? I'm also surprised that nobody else has noticed this, as it would mean they could not record to NAS. Am I doing something odd here?

Thanks,

Chris



Code: [Select]
## Get a list of storage devices that use the pluto dir structure
if ($CommaSeparatedDeviceList eq '') {
        print 'Finding devices in DB';
        $sql="
                SELECT
                Device.PK_Device,
                Device.Description
        FROM
                Device
                JOIN Device_DeviceData ON FK_Device = PK_Device
        WHERE
                FK_DeviceTemplate IN (" . join(",",@TPL_STORAGE_DEVICES) . ")
                AND
                FK_DeviceData = $DD_USERS
                AND
                IK_DeviceData LIKE '%-1%'
                AND
                FK_Device_ControlledVia = '$PK_Device'
        ORDER BY PK_Device
        ";
        @results=RunSQL($sql);
        foreach $row (@results) {
    push(@Devices,$row);
  }

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Maybe found an issue with mythtv_setup.pl
« Reply #1 on: March 27, 2010, 05:34:29 pm »
yes, the shares must be controlled my lmce, thats kinda the point. unless I am missing what you are saying.
how are these storage devices configured that are not being used?
it is a nas device, on the internal network correct?
it was detected by lmce and you chose to use lmce dir structure correct?

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Maybe found an issue with mythtv_setup.pl
« Reply #2 on: March 28, 2010, 09:58:13 pm »
Yes, it was detected automatically, and I chose to use automatically and use lmce's dir structure. All the links etc are made.

The script simply does not pick that up as a valid share. I wondered if it is because the parent device of the share is the NAS itself, and not LMCE? If I remove the check on ControlledVia then it works fine.

Is this your script btw? I found another issue ;-)

Chris

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Maybe found an issue with mythtv_setup.pl
« Reply #3 on: March 29, 2010, 07:24:58 pm »
I suppose it probably is now. I ported it from a bash version and then pretty much rewrote the whole thing.
if you find problems, please create trac tickets.