jirim100 Posted August 1, 2021 Posted August 1, 2021 (edited) When I delete EPG (all: external + DVB + MHW) then sometimes EPG for channels with imported EPG is not deleted, but for all others channels the EPG is deleted. It seems the problem happens when api for delete EPG is performed during executing "Task after recording" and this task is for recorded video from channel with imported EPG: Spoiler 01.08.21 06:54:01.875 TRecording ($09BF7E70) W:\For The Record\Pinocchiova dobrodružství (9. díl); vysíláno 2021-08-01; HD.ts Discontinuities: 0 - Total size: 1,74 GB - Device: Professional DVB Digital TV DVB-T2 (17) 01.08.21 06:54:01.876 SendUpdate DVBVUPDATE REC 01.08.21 06:54:01.892 TRecording Release Professional DVB Digital TV DVB-T2 (17) 01.08.21 06:54:01.892 TProcessTimer Process Params 40 45 0 0 0 "W:\For The Record\Pinocchiova dobrodružství (9. díl); vysíláno 2021-08-01; HD.ts" 2076 1176 -55 -55 01.08.21 06:54:01.892 TWinApp Execute C:\Users\troji\Documents\Visual Studio Projects\MyPDC_2017\x64\Release\MyPDC_2015.exe 01.08.21 06:54:01.892 TWinApp Working Directory C:\Users\troji\Documents\Visual Studio Projects\MyPDC_2017\x64\Release\ 01.08.21 06:54:01.894 TProcessTimer StartRecord VPS_PDC started <- here start "Task after recording" 01.08.21 06:54:01.894 SendUpdate DVBVUPDATE TMR 01.08.21 06:54:01.896 SendUpdate DVBVUPDATE RST -5452 01.08.21 06:55:00.442 TWinApp Execute C:\Users\troji\Documents\Visual Studio Projects\MyDeleteEPG\bin\Release\netcoreapp3.1\MyDeleteEPG.exe 01.08.21 06:55:00.442 TWinApp Working Directory C:\Users\troji\Documents\Visual Studio Projects\MyDeleteEPG\bin\Release\netcoreapp3.1\ 01.08.21 06:55:00.479 TProcessTimer StartRecord My Delete EPG started 01.08.21 06:55:01.640 TBaseProcess epgclear epgclear.html <- here was performed api "epgclear.html?source=7" 01.08.21 06:55:02.471 TProcessTimer NeedsEnding My Delete EPG finished 01.08.21 06:57:02.842 SendUpdate DVBVUPDATE REC 01.08.21 06:57:04.158 TProcessTimer NeedsEnding VPS_PDC finished <- here stop "Task after recording" I use this api: http://localhost:8089/api/epgclear.html?source=7 DMS 3.0.1.3 Edited August 1, 2021 by jirim100 Quote
jirim100 Posted August 1, 2021 Author Posted August 1, 2021 (edited) Processing recorded file and at the end delete one recording from database (with http://localhost:8089/api/recdelete.html?recid=XXX&delfile=0) and then delete physically file on disk. Edited August 1, 2021 by jirim100 Quote
jirim100 Posted August 1, 2021 Author Posted August 1, 2021 (edited) For this concrete situation there was done two recordings (same start and end time, but different channel, first one was recorded from CT 1 HD T2, second one from CT 1 HD, VPS_PDC runs only for .ts file) - 01.08.21 06:54:00.845 TRecording ($07C4B5C0) W:\For The Record\Pinocchiova dobrodružství (9. díl); vysíláno 2021-08-01; HD T2.aac Discontinuities: 0 - Total size: 40,23 MB - Device: Digital Devices DVB-T2 Tuner 1 (11) - 01.08.21 06:54:01.875 TRecording ($09BF7E70) W:\For The Record\Pinocchiova dobrodružství (9. díl); vysíláno 2021-08-01; HD.ts Discontinuities: 0 - Total size: 1,74 GB - Device: Professional DVB Digital TV DVB-T2 (17) VPS_PDC processed logs of boths recordings plus processed second .ts file -> VPS_PDC found exactly in video data start and end of program -> VPS_PDC created .Vprj file for video editor sw "VideoRedo TV Suite". Then VPS_PDC waited until first .aac file was not locked by DMS and after it VPS_PDC obtained recid for the recorded .aac file by the api "http://localhost:8089/api/sql.html?rec=1&query=SELECT idRecord FROM recordings WHERE Filename = \"" + System.Web.HttpUtility.UrlEncode(file, Encoding.UTF8) + "\"" -> Then VPS_PDC deleted .aac file from the database (with success) by the api http://localhost:8089/api/recdelete.html?recid=XXX&delfile=0 (with the obtained recid) -> Then VPS_PDC deleted .aac file on the disk (with success). Edited August 1, 2021 by jirim100 Quote
Griga Posted August 2, 2021 Posted August 2, 2021 On 8/1/2021 at 8:41 AM, jirim100 said: When I delete EPG (all: external + DVB + MHW) then sometimes EPG for channels with imported EPG is not deleted, but for all others channels the EPG is deleted. It seems the problem happens when api for delete EPG is performed during executing "Task after recording" and this task is for recorded video from channel with imported EPG: I've checked the code, and I can see no evidence for an interrelation between deleting EPG data and after-recording tasks (as long as they don't influence EPG data). According to the code the only things that potentially can prevent deletion are: EPG data without source indication (neither DVB nor MHW nor external). It would not be deleted. However, I can't imagine in which way such EPG data could come in. EPG data is added again a short time after deletion. The code for deletion is quite straight forward: It's a loop that simply removes all EPG objects from EPGObjectsCount-1 downto 0. In the meantime it locks the EPG database, so no data can be added during this time. I just don't know what's going on there... Quote
jirim100 Posted August 3, 2021 Author Posted August 3, 2021 (edited) 14 hours ago, Griga said: EPG data without source indication I checked this day EPG by the application XgrabDMS.exe and one EPG was External and one was DVB. 14 hours ago, Griga said: EPG data is added again a short time after deletion. Every Thursday and Sunday I do the following: - 6:55-6:56 External task for deleting completelly all EPG. - 7:00-7:20: Tasks for tuning all frequency muxes (for loading the new DVB EPG). - 7:21-7:24: External task for: export DVB EPG from DMS, then adjusting exported EPG, then import (by the application Xepg) adjusted EPG back to DMS. - 7:25-7:26: Internal task "Create timers automatically" - 7:27-7:28: External task which some of the created timers disable (this task reads some information from EPG database (by the api), analyze it and then disable some planned recording timers) - 18:00-18:01: External task which reads some informations by the appropriate api from EPG database and do the following: for some recording timers adjusting "File Naming Scheme" and set "Final Action" to "Nothing"; create some new recording timers (by the api/timeradd.html); for some recording timers change EPGEventID to value which is in DVB EPG (because external EPG don't have this) - it guarantees in recording log files will be epg present/following lines. Between deleting all EPG data and importing the new one is about 26 minutes. And this concrete morning between 6:10-6:54 was recorded one .ts file and one .aac file and at 6:54 started task for .ts file. Hypothesis: during time 6:10-6:54 DMS added or tried to add some new DVB EPG records and after short time later the new EPG was imported. Hypothesis 2: DMS can't/or failed with identifying EPGObjectsCount and it was zero. Edited August 3, 2021 by jirim100 Quote
jirim100 Posted August 3, 2021 Author Posted August 3, 2021 15 hours ago, Griga said: EPG data without source indication When I checked this day (immediatelly after deleting EPG failed) the EPG by the application XgrabDMS.exe I noticed the following: - This day was "Sunday 1. August 2021" and both DVB EPG and External EPG ends on "Thursday 5. August 2021" - both EPG has only 5 full days - for External EPG it was correct because External EPG was lastly imported on "Thursday 29. July 2021", but DVB EPG should continue to "Sunday 8. August 2021". I am recording every day from these channels about 10 recordings and DMS on background didn't grab new DVB EPG records between "Thursday 29. July 2021" and "Sunday 1. August 2021" from channels on which was recorded. I checked this morning (Sunday 1. August 2021) immediatelly in DVBViewer whether my broadcast provider broadcasting 8 days DVB EPG up to "Sunday 8. August 2021" and this check was success. It seems as in DMS something broke and maybe it then was manifested when overlapped "Task after recording" with "Task for deleting all EPG data". Later this day (Sunday 1. August 2021) I run task for deleting all EPG data and it was successful and DMS again successfully grabed DVB EPG. For all devices which I use is enabled EPG reception. And for all channels is enabled DVB EPG, MHW EPG, External EPG. Quote
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.