domenic 33 Posted September 23, 2016 Share Posted September 23, 2016 Hi, I have been playing with the VDR Plugin and noticed that after loading the Guide from "Refresh Guide Data" it is not all showing up when using LiveTV. First off it looks like the Guide is stuck on UTC as it only populates data starting 5 hours ahead (I am CDT). And some of the data does not show up at all. The Guide is also not displaying channel names. I have added some debug information to the Plugin and dumped out the data being collected and it appears to be ok. I would like to verify that the data is being send to the server, but I can not determine where it is being stored. What database or files can I take a look at to verify the information is getting to Emby? I want to verify the Plugin is actually sending the information correctly. I am running on a Debian build and have tried versions 3.0.7200-77, 3.1.159-beta-1651 and 3.1.6106. Domenic 1 Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 23, 2016 Share Posted September 23, 2016 Hi Domenic, If you use the ILogger interface it will write to the regular Emby Server log. We have lots of examples in our plugin repo: https://github.com/MediaBrowser/Emby.Plugins Also, are you using the latest version of Vu+? Some other users have reported that the Emby plugin doesn't work with the latest version and they're using an older version of Vu+. If you'd like to help debug the Emby plugin that would be fantastic. Thanks ! 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted September 23, 2016 Author Share Posted September 23, 2016 I am a bit of a "hack" but have the ability of update the code... The plugin uses VDR and LiveTV is working fantastically with the plugin https://emby.media/community/index.php?/topic/21231-vdr-plugin-development/ (I am not using Vu+ but a different provider) and would like to help out the community. I will take a look at the TVHeadEnd Plugin, as this is very similar to what the VDR plugin is doing... First thing I noticed is that the VDR plugin does not pass ILogger into the GetEventsResponseHandler like TVHeadEnd does, and it would appear this is how to generate the log information! Let me start with this little piece of work and see what I can do to generate log information on the ProgramInfo updates that appears to be failing. Just so I know, which version of Emby should I be working with, stable, beta or dev? I have seen other people with issues around the Guide and not presenting ProgramInfo data and I want to make sure the issue is related to the plugin and not to the Guide itself. 1 Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 23, 2016 Share Posted September 23, 2016 Emby Server version shouldn't matter as beta and dev don't really have any changes that would affect this. So whatever you have installed is fine. 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted September 23, 2016 Author Share Posted September 23, 2016 (edited) So I can create Log Entries!!! I can produce the log file with all the event data. What I see is all the event data being added, but not all of it displayed in the Guide or Channels. The first item that is displayed is in the 5th hour forward, the actual event time and data is correct, I just can see the data until I scroll 5 hours forward. Some of the data is missing completely, but in the log I see the data. The code below is how it is created: public async Task<List<ProgramInfo>> GetEventAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, ILogger logger) { List<ProgramInfo> events = new List<ProgramInfo>(); string inchannelId = channelId; GetEventsResponse response = await client.GetAsync(new GetEventsRequest() { channel = channelId + ".json", timespan = (endDateUtc - startDateUtc).TotalSeconds.ToString() }); if (response.Events != null) { logger.Info("[VDR LiveTV] GetProgramImageAsync ProgramInfo --- START --- "); foreach (VdrEvent ev in response.Events) { logger.Info("[VDR LiveTV] GetProgramImageAsync data | CHANNELID {0} | NAME {1} | STARTDATE {2} | ENDDATE {3} | EPTITLE {4} | OVERVIEW {5} | HASIMAGE {6} | IMAGEURL {7} ...", ev.channel, ev.title, Utils.UnixTimeStampToDateTime(ev.start_time), Utils.UnixTimeStampToDateTime(ev.start_time + ev.duration), ev.short_text, ev.description, ev.images, ev.id); events.Add(new ProgramInfo() { Id = ev.id.ToString(), ChannelId = ev.channel, Name = ev.title, EpisodeTitle = ev.short_text, Overview = ev.description, StartDate = Utils.UnixTimeStampToDateTime(ev.start_time), EndDate = Utils.UnixTimeStampToDateTime(ev.start_time + ev.duration), HasImage = (ev.images > 0), ImageUrl = (ev.images > 0) ? string.Format("{0}/events/image/{1}/0", baseUrl, ev.id) : null }); } logger.Info("[VDR LiveTV] GetProgramImageAsync ProgramInfo --- END --- "); } else { logger.Info("[VDR LiveTV] GetProgramImageAsync ProgramInfo No EVENTS for {0}", inchannelId); } return events; } How would I trap the "events.Add" to see if it fails? Domenic Edited September 23, 2016 by domenic Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 23, 2016 Share Posted September 23, 2016 It's not failing. The core server expects the dates to be in UTC, so I would double check that. If they're 5 hours off in the guide, that's probably the issue. Link to comment Share on other sites More sharing options...
domenic 33 Posted September 23, 2016 Author Share Posted September 23, 2016 The actual data in the guide is correct, so the startdate should be UTC? Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 23, 2016 Share Posted September 23, 2016 all dates Link to comment Share on other sites More sharing options...
domenic 33 Posted September 23, 2016 Author Share Posted September 23, 2016 wow that was easy just added. .ToUniversalTime() and it works! Now I am still missing some entries... shows in the log but not in the guide.... Will check the log for guide error messages... Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 23, 2016 Share Posted September 23, 2016 Well done 1 Link to comment Share on other sites More sharing options...
domenic 33 Posted September 24, 2016 Author Share Posted September 24, 2016 I have two log files for missing data. Note rather than focusing on the Guide I am looking at specific channels, one that has data and one that does not. Note in both cases I do not have any images associated with the channels so some errors are produced. Odd that it is checking for images though, as my channel information clearly states I do not have any images and I would believe Emby should not attempt to get them. In any case channel 196 does not have program informaton and channel 197 does. Here is how I ran the test. Browse to server, go to live tv and select a channel. Stop emby, erase log file, start emby and refresh the web page. Did this for both channels. Please take a look at the logs. server.with.data.txt server.with.no.data.txt Link to comment Share on other sites More sharing options...
domenic 33 Posted September 24, 2016 Author Share Posted September 24, 2016 you can ignore the errors in the logs the plugin was incorrectly adding the URL for images even when VDR said there were none. Still missing guide data, so I will generate more logs soon Link to comment Share on other sites More sharing options...
domenic 33 Posted September 25, 2016 Author Share Posted September 25, 2016 ok I have a log file and a screen shot for review server.example.txt.zip Link to comment Share on other sites More sharing options...
domenic 33 Posted September 28, 2016 Author Share Posted September 28, 2016 I have created a ticket on Git Hub to review this issue: https://github.com/MediaBrowser/Emby/issues/2190 Domenic Link to comment Share on other sites More sharing options...
Luke 37179 Posted September 28, 2016 Share Posted September 28, 2016 You can compare to here: https://github.com/MediaBrowser/Emby.Plugins/blob/master/MediaBrowser.Plugins.NextPvr/Responses/ListingsResponse.cs#L39 make sure you're filling in the properties and that the dates are utc. Link to comment Share on other sites More sharing options...
blade005 172 Posted September 28, 2016 Share Posted September 28, 2016 you can ignore the errors in the logs the plugin was incorrectly adding the URL for images even when VDR said there were none. Still missing guide data, so I will generate more logs soon Have you looked at guide data for these channels beyond today's date? I had some channels that I left out of my initial guide creation and then added them in later and mapped the channels in Emby. After running Guide Refresh task I would check the guide for these newly added channels and no information was present. After a few re-runs of the guide, restarts of Emby Server and re-runs of the Guide Refresh Task, I finally pulled up the Guide and checked the channels for information beyond today's date and they were all populated out for the next 2 weeks. For some reason, it just wasn't populating any data for today. May not be your issue, but just thought I would share that, in case it might be applicable. Link to comment Share on other sites More sharing options...
domenic 33 Posted September 29, 2016 Author Share Posted September 29, 2016 I have only been loading a day of data... I will try with more days and post my results... Link to comment Share on other sites More sharing options...
domenic 33 Posted September 29, 2016 Author Share Posted September 29, 2016 (edited) You can compare to here: https://github.com/MediaBrowser/Emby.Plugins/blob/master/MediaBrowser.Plugins.NextPvr/Responses/ListingsResponse.cs#L39 make sure you're filling in the properties and that the dates are utc. I am not filling in all the fields, but if I made the call incorrectly or with bad data shouldn't it generate an exception in the log? Note the call being made does contain data in the fields that are being populated. is there a flag to increase logging in emby for testing? Domenic Edited September 29, 2016 by domenic Link to comment Share on other sites More sharing options...
domenic 33 Posted October 3, 2016 Author Share Posted October 3, 2016 I have limited the number of channels down to 50, and did a Refresh Guide Data. The Emby log file shows the work has finished, but the Emby application has a progress bar still moving slowly along. What is Emby doing once it has "loaded" the program information? With a large channel list the progress bar never appears to fill up, so is there some background task that is working with the loaded program data that never completes with large channel lists? Even with this limited list, there were still 4 channels that never received any guide data. When I bring up Kodi (connecting to the same VDR system), it shows all of the guide information. How can I go about debugging this.... I know that it is working (mostly), and I know that the data is being sent correctly to Emby... what is the next step? Domenic Link to comment Share on other sites More sharing options...
Luke 37179 Posted October 3, 2016 Share Posted October 3, 2016 Progress bar where? Link to comment Share on other sites More sharing options...
domenic 33 Posted October 3, 2016 Author Share Posted October 3, 2016 in my web app it shows up after you click on "Refresh Guide Data", directly under the button, and progresses in green left to right. With a large channel list the bar never completes Link to comment Share on other sites More sharing options...
Luke 37179 Posted October 3, 2016 Share Posted October 3, 2016 Well of course it completes, it just may take a long time and you're associating that with never. Link to comment Share on other sites More sharing options...
domenic 33 Posted October 4, 2016 Author Share Posted October 4, 2016 so what is it doing during this time? I assume updating the sqllight database related to program information. Is there any way to query the database to verify if the data shown in the log file is pushed into the database? Link to comment Share on other sites More sharing options...
Luke 37179 Posted October 4, 2016 Share Posted October 4, 2016 Have you ensured dates are UTC? Have you set channel ID on each program? Link to comment Share on other sites More sharing options...
domenic 33 Posted October 4, 2016 Author Share Posted October 4, 2016 Dates are all good,and the channel id's are set, they show in the log... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now