dave-p / TVHadmin

PHP-powered web front-end for TVHeadend, inspired by VDRadmin.
GNU General Public License v3.0
29 stars 6 forks source link

Timeline, telly, Favourite Channels empty #8

Closed flippz closed 4 years ago

flippz commented 4 years ago

Timeline, telly, Favourite Channels all show up empty. I can see the channel names but nothing more. What's On Now? works correct.

dave-p commented 4 years ago

Strange. Does the EPG in the TVHeadend GUI work? What is your TVH setup and where are you getting the EPG from?

flippz commented 4 years ago

Yes it works fine there and i Kodi. The source is epggrabber witch runs via crontab in linux. I haver taken 2 screens u can look at. I suspekt it might be with the Norwegian date format. Today is 09.03.2020 here but you would probably say its 03.09.2020 ... If that is the case the app tryes to get info for the wrong Date. (remove images)

dave-p commented 4 years ago

I don't think the problem is with the date format, though TVHadmin perhaps ought to show dates/times in the correct format for the locale. All of the time calculations are carried out on the web server which runs the PHP code. Are you sure that the clock is set correctly on that server? Are there any PHP error messages on the server (usually these appear in the web-server error log)? On your images there are several lines for each channel name. Is there any reason for that?

flippz commented 4 years ago

Ill check when i get home. The reason for there being duplicate channel names is becouse there are several sources for the same channel.

dave-p commented 4 years ago

That's not how TVHeadend is intended to be used. Multiple sources should all be mapped onto the same channel name, TVH will choose which source to use depending on which are available and their priority. The 'Map Services' dialog has a 'Merge same name' box which can achieve this.

I think this may be the cause of your problem. On my test TVH system, which receives from Astra 28.2E, I tried manually creating a channel "BBC One HD" as a duplicate of the existing one (but mapped to a different service). The EPG for that channel disappeared from TVHadmin though the TVH GUI still worked. When I directly queried the TVH server through the API I got the same result, showing that TVHadmin is not at fault.

The API filters EPG by channel name, and doesn't seem to work correctly if there are duplicates. The "What's On Now" screen works because there is no filter by channel name.

dave-p commented 4 years ago

Can you apply this patch to timeline.php? If the timeline screen starts working it will show that my theory about duplicate channel names is correct:

--- timeline.php        2019-12-29 09:38:38.059230545 +0000
+++ test/timeline.php   2020-03-11 08:12:07.703300336 +0000
@@ -119,7 +119,7 @@
                 continue;
            }
 good:
-           $e = get_epg($c["name"], $tstart, $tend);
+           $e = get_epg($c["uuid"], $tstart, $tend);
            if (!isset($e)) continue;
            $wd = 98 - count($e)/8;
            echo "

Unfortunately the other screens rely on the channel name being unique and are more difficult to change.

flippz commented 4 years ago

No timeline is still blank. But i may have done the edeting wrong...see screenshot: timeline1 timeline2

dave-p commented 4 years ago

Ah, I thought the channels list was displayed but no EPG; I see you don't have even the channel list.

Can you check that your settings are similar to those below. If you didn't have anything ticked against 'show in timeline' that would explain what you're seeing. screenshot

flippz commented 4 years ago

Still nothing: config

dave-p commented 4 years ago

Running out of ideas...

Can you try running these commands to check that you can access the TVH server. Ideally run them on the PHP/web server and use the same form of IP address as you entered into TVHadmin.

curl http://user:pass@ip.address:9981/api/channel/grid?limit=1
curl http://user:pass@ip.address:9981/api/epg/events/grid?limit=1
DominiqueRT commented 4 years ago

Helllo,

Same issue ! My configuration :

Answers from curl commands : {"entries":[{"uuid":"72a3588429506b9aedb1f4d5120079f6","enabled":true,"autoname":true,"name":"CSTAR","number":17,"icon":"file:///picons/cstar.png","icon_public_url":"imagecache/22","epgauto":true,"epglimit":0,"epggrab":[],"dvr_pre_time":0,"dvr_pst_time":0,"epg_running":-1,"services":["c2991833e53d4b5c9d190845c5e29a05"],"tags":["dc0aa30c5970619d095a6144b85044eb","66cc5c698d1bd6c2a9cb1b1d118b849e","2508f8e64550c560fb6ae3cb0f22889c","cd02cb70fa3f540d668406412fe03696"],"bouquet":""}],"total":27}

{"totalCount":2005,"entries":[{"eventId":50257,"channelName":"CSTAR","channelUuid":"72a3588429506b9aedb1f4d5120079f6","channelNumber":"17","channelIcon":"imagecache/22","start":1585458000,"stop":1585477800,"title":"Top clip","subtitle":"Clips.","description":"Dance, pop-rock, R'n'b, hip-hop, rap : «Top clip» offre une programmation éclectique.","widescreen":1,"hd":1,"genre":[96],"nextEventId":50281}]}

dave-p commented 4 years ago

OK a few questions:

dave-p commented 4 years ago

I think I might have found the problem. Could you update to the latest version and try again?

TVHadmin was not sending authentication with EPG queries. It worked if TVheadend allowed EPG access without auth (which mine does) but not otherwise.

(@flippz this should also fix your problem.)

DominiqueRT commented 4 years ago

It's solved now. Many thanks @dave-p . Regards

flippz commented 4 years ago

Works for me to now. Thanks!!