DetlefM Posted March 26, 2020 Share Posted March 26, 2020 I wanted to check future timers via API and deactivate them if necessary. I found out that the EPGID / Eventid in timers is not reliable. Here my example: // get all timers http://192.168.0.110:8089/api/timerlist.html?utf8=2 Result: ... <Timer Type="1" ID="{358BC799-170B-4F0E-B141-8E2815590BD9}" Enabled="-1" Charset="255" Date="31.03.2020" Start="20:09:00" Dur="76" End="21:25:00" PreEPG="5" PostEPG="10" IntID="703" Priority="50" Action="0" EPGEventID="30401"> <Descr> Navy CIS - Operation Kuckucksnest Crime-Serie, USA 2018 Alter </Descr> <Options AdjustPAT="-1" AllAudio="-1"/> <Format>2</Format> <Folder>Auto</Folder> <NameScheme>%name_%year-%date_%time_%station</NameScheme> <Source>Search:Navy CIS - Sat 1</Source> <Channel ID="2359890960361473116|SAT.1" EPGID="577023706624377948"/> <Executeable>-1</Executeable> <Recording>0</Recording> <ID>703</ID> <GUID>{358BC799-170B-4F0E-B141-8E2815590BD9}</GUID> </Timer> .... // get epg for this timer http://192.168.0.110:8089/api/epg.html?channel=577023706624377948&eventid=30401 <!-- by DVBViewer Media Server --> <epg Ver="1"/> // get epg for the whole channel http://192.168.0.110:8089/api/epg.html?lvl=2&channel=577023706624377948 ... <programme start="20200331201400" stop="20200331211500" channel="577023706624377948"> <eventid>30512</eventid> <charset>255</charset> <titles> <title>Navy CIS</title> </titles> <events> <event> Operation Kuckucksnest Crime-Serie, USA 2018 Altersfreigabe: ab 12 </event> </events> <descriptions> <description> Der NCIS-Director Leon Vance ... </description> </descriptions> </programme> ... Different epgid / eventid Same session calls within 3 Minutes. Please inform me what I should provide to reproduce the error. I suspect that a change of the EPGID (for whatever reason) does not lead to a change of the timer database and thus an outdated value is returned. Side request: Would it be possible to provide the corresponding EPG with the timers on request? Quote Link to comment
Griga Posted March 27, 2020 Share Posted March 27, 2020 EPGID="577023706624377948" aka channel=577023706624377948 are reliable and consistent, as long as the Service ID, TransportstreamID, NetworkID and the tuner type of the channel don't change. That's just a way to identify the channel to which EPG data belongs. The Event ID is only reliable if the broadcaster handles it reliably. It should be unique and remain the same until the event has vanished from the EPG. Unfortunately some broadcasters don't give a damn about it. For example, they change the Event ID each time when the start time of a programme changes, even if it's only one minute, or on each EPG update. That completely defies the purpose of the Event ID and makes it unusable for finding an EPG data entry again that has been stored some time ago. That's why the DMS EPG monitoring function does not use the Event ID by default (it can be enabled by a tweak, though), but only PDC, if available. Quote Link to comment
DetlefM Posted March 27, 2020 Author Share Posted March 27, 2020 (edited) Thanks for the quick feedback. But I don't understand how the web interface manages to establish this broken connection (no epc, wrong epgid). The timer list shows the correct event at the mouse flyover. Is this information stored somewhere and can I access this information? Here are a few screenshots to illustrate this. 1. flyover web interface, display of a timer 2. XML result timer query 3. XML result epg query with the data from the timer. 4. XML result epg query of the entire channel. (sorry, wrong item marked) Btw: Is lvl=2 for epg queries still mandatory? Edited March 27, 2020 by DetlefM Quote Link to comment
DetlefM Posted March 28, 2020 Author Share Posted March 28, 2020 Here are some additional experiences I made with the api/epg function: Also the attempt to localize the entry in the EPG database via pdc often fails. What I haven't tested yet is: Delete all timers, let the media server recreate all timers and then fetch directly afterwards all EPG entries connected to the timers for an evaluation. I enclose a test program in Python (because of the simplicity) with a log of a run. The Python file is zipped. For my request it would be very helpful if the information of the EPG event would be made separately persistent when the timer is generated by the media server. In this case other searches within an updated epg would be possible, e.g. by title or event description. I am grateful for hints. t.txt ms_timercheck.zip Quote Link to comment
Griga Posted March 29, 2020 Share Posted March 29, 2020 On 3/27/2020 at 2:25 PM, DetlefM said: But I don't understand how the web interface manages to establish this broken connection (no epc, wrong epgid). The timer list shows the correct event at the mouse flyover. It stores a link containing a channel reference and a calculated time = (starttime_without_leadtime + endtime_withoutt_followup_time) / 2, yielding the time in the middle between start and end time (examine a timer list line with the development tools of your browser and you will see..). For displaying the EPG details the Web Interface performs EPGEntry := EPGBuffer.At(channel, time), which returns the EPG entry for the programme that is running at this time on the channel in question. However, this method delivers wrong results if the programme start time gets shifted more than half the programme's duration. (Hopefully) to be continued later... Quote Link to comment
DetlefM Posted March 29, 2020 Author Share Posted March 29, 2020 12 minutes ago, Griga said: It stores a link containing a channel reference and a calculated time = (starttime_without_leadtime + endtime_withoutt_followup_time) / 2, yielding the time in the middle between start and end time (examine a timer list line with the development tools of your browser and you will see..). For displaying the EPG details the Web Interface performs EPGEntry := EPGBuffer.At(channel, time), which returns the EPG entry for the programme that is running at this time on the channel in question. However, this method delivers wrong results if the programme start time gets shifted more than half the programme's duration. (Hopefully) to be continued later... That's a smart idea. It also solves my problem. I still have to see how I can get the EPG most easily.. But since my recordings are concentrated on few channels, I can certainly build up an EPG cache easily. So from my side, the case can be closed. 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.