Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ?

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


jk90090 at gmail

May 28, 2012, 3:10 PM

Post #1 of 7 (669 views)
Permalink
Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ?

So I was noticing that NCIS: Los Angeles would not show up in 'Upcoming
Recordings'. After a little investigative work, I've found the source
of the problem but don't know why.

Snippet of function causing the problem:
/var/www/localhost/htdocs/mythweb/modules/tv/classes/Schedule.php

public static function &findScheduled() {
if (is_null(self::$scheduledRecordings))
self::$scheduledRecordings =&
Cache::get('Schedule::findScheduled');

if (is_null(self::$scheduledRecordings)) {
foreach
(MythBackend::find()->queryProgramRows('QUERY_GETALLPENDING', 2) as $key
=> $program) {
if ($key === 'offset')
continue;
if ($program[21] == 6) <--------------------- THIS IS
THE FAILURE POINT
continue;
// Normal entry:
$scheduledRecordings[callsign][starttime][]
self::$scheduledRecordings[$program[8]][$program[12]][]
=& new Program($program);
#printf('
}
Cache::set('Schedule::findScheduled',
self::$scheduledRecordings);
}
return self::$scheduledRecordings;
}


$program[21] related to RECORDID value coming from the RECORD table.
Checking the table, indeed the NCIS:Los Angeles does have a value of 6
for the recordid column.

Why would it be choosing to ignore any recordings where RECORDID equals
a value of 6?
Is the code above wrong?

-JK//


mtdean at thirdcontact

May 28, 2012, 5:36 PM

Post #2 of 7 (644 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On 05/28/2012 06:10 PM, jk90090 wrote:
> So I was noticing that NCIS: Los Angeles would not show up in
> 'Upcoming Recordings'. After a little investigative work, I've found
> the source of the problem but don't know why.
>
> Snippet of function causing the problem:
> /var/www/localhost/htdocs/mythweb/modules/tv/classes/Schedule.php
>
> public static function &findScheduled() {
> if (is_null(self::$scheduledRecordings))
> self::$scheduledRecordings =&
> Cache::get('Schedule::findScheduled');
>
> if (is_null(self::$scheduledRecordings)) {
> foreach
> (MythBackend::find()->queryProgramRows('QUERY_GETALLPENDING', 2) as
> $key => $program) {
> if ($key === 'offset')
> continue;
> if ($program[21] == 6) <--------------------- THIS IS
> THE FAILURE POINT
> continue;
> // Normal entry:
> $scheduledRecordings[callsign][starttime][]
>
> self::$scheduledRecordings[$program[8]][$program[12]][] =& new
> Program($program);
> #printf('
> }
> Cache::set('Schedule::findScheduled',
> self::$scheduledRecordings);
> }
> return self::$scheduledRecordings;
> }
>
>
> $program[21] related to RECORDID value coming from the RECORD table.
> Checking the table, indeed the NCIS:Los Angeles does have a value of 6
> for the recordid column.
>
> Why would it be choosing to ignore any recordings where RECORDID
> equals a value of 6?
> Is the code above wrong?

Hehe, you seem to have found another remnant of the reorganization of
the programinfo stringlist that happened just over 2 years ago. The commit

https://github.com/MythTV/mythtv/commit/25fdd6d1

shows that before the refactor, programinfo[21] was recstatus, where
recstatus of 6 is "Not Listed", meaning that the program is for a
"timeslot" recording rule, but the requested show is not airing in the
given timeslot (i.e. does not exist in the program listings). These
entries were removed from Upcoming Recordings in
https://github.com/MythTV/mythweb/commit/e728aea5 and
https://github.com/MythTV/mythweb/commit/508103511 as a fix for
http://code.mythtv.org/trac/ticket/8457 .

So, if you change that "program[21]" to "program[18]", all should work
(and since MythWeb isn't compiled, you can just edit the file
directly). Feel free to make a ticket, and I'll get it committed and
pushed for you.

Thanks for tracking down that straggler... :)

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 28, 2012, 5:51 PM

Post #3 of 7 (640 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On 05/28/2012 08:36 PM, Michael T. Dean wrote:
> On 05/28/2012 06:10 PM, jk90090 wrote:
>> So I was noticing that NCIS: Los Angeles would not show up in
>> 'Upcoming Recordings'. After a little investigative work, I've found
>> the source of the problem but don't know why.
...
> Thanks for tracking down that straggler... :)

And especially for the months of patient investigation:

http://www.gossamer-threads.com/lists/mythtv/users/506379#506379

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


jk90090 at gmail

May 29, 2012, 7:32 AM

Post #4 of 7 (631 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On May 28, 2012, at 5:36 PM, "Michael T. Dean" <mtdean [at] thirdcontact> wrote:

>
> Hehe, you seem to have found another remnant of the reorganization of the programinfo stringlist that happened just over 2 years ago. The commit
>
> https://github.com/MythTV/mythtv/commit/25fdd6d1
>
> shows that before the refactor, programinfo[21] was recstatus, where recstatus of 6 is "Not Listed", meaning that the program is for a "timeslot" recording rule, but the requested show is not airing in the given timeslot (i.e. does not exist in the program listings). These entries were removed from Upcoming Recordings in https://github.com/MythTV/mythweb/commit/e728aea5 and https://github.com/MythTV/mythweb/commit/508103511 as a fix for http://code.mythtv.org/trac/ticket/8457 .
>
> So, if you change that "program[21]" to "program[18]", all should work (and since MythWeb isn't compiled, you can just edit the file directly). Feel free to make a ticket, and I'll get it committed and pushed for you.
>
> Thanks for tracking down that straggler... :)
>
> Mike
> _______________________________________________
>
Awesome, thanks Mike. I will file a ticket today.

-JK
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


jk90090 at gmail

May 29, 2012, 7:34 AM

Post #5 of 7 (631 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On May 28, 2012, at 5:51 PM, "Michael T. Dean" <mtdean [at] thirdcontact> wrote:

> On 05/28/2012 08:36 PM, Michael T. Dean wrote:
>> On 05/28/2012 06:10 PM, jk90090 wrote:
>>> So I was noticing that NCIS: Los Angeles would not show up in 'Upcoming Recordings'. After a little investigative work, I've found the source of the problem but don't know why.
> ...
>> Thanks for tracking down that straggler... :)
>
> And especially for the months of patient investigation:
>
> http://www.gossamer-threads.com/lists/mythtv/users/506379#506379
>
> Mike

Finally found time to look into it ;-). No worries, thanks for the quick reply and solution.

-JK
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 30, 2012, 2:33 PM

Post #6 of 7 (621 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On 05/29/2012 10:32 AM, Jk90090 wrote:
> On May 28, 2012, at 5:36 PM, "Michael T. Dean" wrote:
>> Hehe, you seem to have found another remnant of the reorganization of the programinfo stringlist that happened just over 2 years ago. The commit
>>
>> https://github.com/MythTV/mythtv/commit/25fdd6d1
>>
>> shows that before the refactor, programinfo[21] was recstatus, where recstatus of 6 is "Not Listed", meaning that the program is for a "timeslot" recording rule, but the requested show is not airing in the given timeslot (i.e. does not exist in the program listings). These entries were removed from Upcoming Recordings in https://github.com/MythTV/mythweb/commit/e728aea5 and https://github.com/MythTV/mythweb/commit/508103511 as a fix for http://code.mythtv.org/trac/ticket/8457 .
>>
>> So, if you change that "program[21]" to "program[18]", all should work (and since MythWeb isn't compiled, you can just edit the file directly). Feel free to make a ticket, and I'll get it committed and pushed for you.
>>
>> Thanks for tracking down that straggler... :)
> Awesome, thanks Mike. I will file a ticket today.

I didn't see a ticket, but actually got to fixing it, today, anyway, so
it can make it into 0.25.1.

Note, also, that I found out that another reorder happened since the one
I mentioned above, so in 0.25-fixes and above, the proper index is 20
and in 0.24-fixes it's 18. I've backported the change to both affected
fixes branches, so you'll pick up the proper order next time you pull an
updated package.

Thanks, again.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


mikep at randomtraveller

May 31, 2012, 1:49 AM

Post #7 of 7 (616 views)
Permalink
Re: Program not showing up in 'Upcoming Recordings' in Mythweb , RECORDID=6 ? [In reply to]

On 30/05/12 22:33, Michael T. Dean wrote:
>
> Note, also, that I found out that another reorder happened since the one I
> mentioned above, so in 0.25-fixes and above, the proper index is 20 and in
> 0.24-fixes it's 18. I've backported the change to both affected fixes branches,
> so you'll pick up the proper order next time you pull an updated package.
>
As a programmer (albeit semi-retired) I've always understood it to be
non-optimal to have "magic numbers" in one's code to avoid precisely the problem
Mike is fixing above.

Shouldn't these values be put in a release-dependant header file somewhere, so
that any changes like this become transparent?

Or can't this kind of substitution be done for web source?

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.