DetlefM Posted March 28, 2020 Share Posted March 28, 2020 I noticed several things during my tests that make debugging api calls difficult. /api/epg.html The returned XML string is often (but not always) incorrect if the EPG entry is not found. <?xml version="1.0" encoding="utf-8" ?><!-- by DVBViewer Media Server --><epg Ver="1"> The end tag is missing. Here it would be nice (besides the return of a valid XML string) to get an error code included. For example: wrong channelid, epgid not found When searching for pdc with a wrong pdc value (in my case 'NOPDC') this filter is completely ignored and the EPG list of the channel is returned. I think also here an error message would be more helpful. Many other api calls have no return value at all - e.g. timeredit. Here it would be helpful if the changed timer (or an error code in case of problems) would be returned. Quote Link to comment
Griga Posted March 28, 2020 Share Posted March 28, 2020 7 hours ago, DetlefM said: The returned XML string is often (but not always) incorrect if the EPG entry is not found. <?xml version="1.0" encoding="utf-8" ?><!-- by DVBViewer Media Server --><epg Ver="1"> The end tag is missing. Firefox displays a xml file containing <?xml version="1.0" encoding="utf-8" ?><!-- by DVBViewer Media Server --><epg Ver="1"> without complaining about an error, though Firefox is quite picky in this respect. Anyway, an end tag is supposed to be present, and after looking at the code, the only reason for an omitted end tag I can think of is an exception (access violation etc). while collecting matching EPG entries. The Media Server catches such an exception, but does not log it, so it does not appear in the svcdebug.log. It's that old rule: No matter how much logging is added, you never get what you need. Investigating this will require a test version with additional logging. 7 hours ago, DetlefM said: I think also here an error message would be more helpful. Many other api calls have no return value at all I know, but currently I'm not able to look deeper into this matter, because I'm busy with another topic. When I inherited about 1.000.000 lines of undocumented and quite chaotic DVBViewer Pro and Media Server code in 2013, originating from a very creative "rapid prototyping" period, I knew that it would take years to get everything fixed. But I was wrong. It will take decades... provided I live that long. 1 Quote Link to comment
DetlefM Posted March 29, 2020 Author Share Posted March 29, 2020 15 hours ago, Griga said: Firefox displays a xml file containing <?xml version="1.0" encoding="utf-8" ?><!-- by DVBViewer Media Server --><epg Ver="1"> without complaining about an error, though Firefox is quite picky in this respect. I use c# using System.XML.Linq XDocument doc = XDocument.Parse(xmlString); and this throws an Exception. But, yes, I can test it in advance. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.