[mythtv-users] mythepisode - mythweb unofficial addon

Chad Oppliger chadopp at gmail.com
Mon Aug 16 03:54:43 UTC 2010


On Sun, Aug 15, 2010 at 6:08 PM, Chad Oppliger <chadopp at gmail.com> wrote:
> On Sun, Aug 15, 2010 at 4:58 PM, Chris Kapp <chris.kapp at gmail.com> wrote:
>>
>>
>> On Sun, Aug 15, 2010 at 12:22 PM, Chad Oppliger <chadopp at gmail.com> wrote:
>>>
>>> On Sun, Aug 15, 2010 at 9:07 AM, Chris Kapp <chris.kapp at gmail.com> wrote:
>>> >
>>>
>>>
>>> Thanks for the feedback and update Chris.  I will update the code.
>>> Since my db was so small I wasn't running into the loading problem.
>>>
>>> Chad
>>>
>>
>> Hey Chad,
>> Thanks for making the changes Chad.  I was having an issue with the "All TV
>> Shows" after updating to your new version.  The following has made
>> an improvement.
>> Edit:  /usr/share/mythtv/mythweb/modules/episode/show.php
>> change line (50): $recordedshow[] = $row1['title'];
>> to be: $recordedshow[] = str_replace(' ', '', strtolower($row1['title']));
>> Edit:  /usr/share/mythtv/mythweb/modules/episode/tmpl/default/show.php
>> I changed the entire function:
>>         function in_array_cin($strItem, $arItems) {
>>             foreach ($arItems as $strValue)
>>                 if (str_replace(' ', '', strtolower($strItem)) ==
>> str_replace(' ', '', strtolower($strValue))) return TRUE;
>>                 return FALSE;
>>         }
>>
>> to be:
>> function in_array_cin($strItem, $arItems) {
>> return in_array(str_replace(' ', '', strtolower($strItem)), $arItems);
>> }
>> I believe these changes should accomplish the same thing.
>
> Thanks Dan,
>
> I implemented both pieces but the function seems to be about 5 seconds
> slower consistently on my system.  So I left your first part
>
>  change line (50): $recordedshow[] = $row1['title'];
>  to be: $recordedshow[] = str_replace(' ', '', strtolower($row1['title']));
>
> and modified my function slightly
>
>        function in_array_cin($strItem, $arItems) {
>            foreach ($arItems as $strValue)
>                if (str_replace(' ', '', strtolower($strItem)) ==
> $strValue) return TRUE;
>                return FALSE;
>        }
>
>
I did away with the function all together.  Uploaded a new version.


More information about the mythtv-users mailing list