Qosmio Posted December 7, 2022 Posted December 7, 2022 Hi, I have troubles to fully automate importing IP TV Channels list into Media server, i have windows tasks setup to download channel list with powershell script with wget and importing it into DVBViewer but i need to quit DVBViewer after import and restart media server to have the up to date list available. how can i do that automatically? Cheers Quote
Griga Posted December 7, 2022 Posted December 7, 2022 For letting DVBViewer save the channel list you need to get the handle for the DVBViewer main window with the FindWindow API - something like Handle = FindWindow('TfrmMain','DVB Viewer') and then post a message to it PostMessage(Handle, 0xB2C2, 0x1032, 0) I hope your script language supports using these API calls. Media Server versions since 3.0.0 automatically reload the channel list within 2 seconds if the file channels.dat has been changed. Please note that you may have to reload the web interface page in the browser (by using F5) for seeing new channels. Quote
Griga Posted December 7, 2022 Posted December 7, 2022 P.S. 3 hours ago, Qosmio said: i have windows tasks setup to download channel list with powershell script with wget You are not using this method? It is available since DVBViewer 7.2.0.0. Quote
Qosmio Posted December 8, 2022 Author Posted December 8, 2022 Yes i do but i need to download the channel list before i can import it to DVBViewer because the provider uses this as a link http://provider/get.php?username=1234567&password=123456&output=mpegts&type=m3u_plus and DVBViewer does not accept that so i download the file with a task and wget with a other task i import it to DVBViewer, that works fine but i need to exit DVBViewer and restart media server before its available for my clients. this command i use for importing it to DVBViewer with a windows task scheduler in windows server 2022 C:\Program Files (x86)\DVBViewer\DVBViewer.exe -l c:\iptv.m3u -r "IP TV" DVBViewer starts up import it but does not quit after importing and stays open, the channels are imported but not updated to my clients (also after a client restart, downloading channels when starting is enabled) after restart media server and quitting DVBViewer its available for the clients. Quote
Griga Posted December 8, 2022 Posted December 8, 2022 24 minutes ago, Qosmio said: the provider uses this as a link http://provider/get.php?username=1234567&password=123456&output=mpegts&type=m3u_plus and DVBViewer does not accept that As far as I can see, DVBViewer accepts URLs like this and processes them correctly, after receiving them as commandline parameter with -l. But no download is taking place? I would need the original URL for investigating what goes wrong. 37 minutes ago, Qosmio said: DVBViewer starts up import it but does not quit after importing and stays open, You can send a WM_CLOSE message to the DVBViewer main window (see my post above). Or use the attached program. Here is the Delphi source code: program CloseDVBViewer; uses Windows, Messages; var Handle: HWND; begin Handle := FindWindow('TfrmMain','DVB Viewer'); if Handle <> 0 then PostMessage(Handle,WM_CLOSE,0,0); end. CloseDVBViewer.zip Closing DVBViewer includes saving the channel list. As already said, the Media Server will reload it without having to be restarted. However, I don't know if the clients (which ones?) require a Media Server restart for updating themselves. 1 Quote
Qosmio Posted December 8, 2022 Author Posted December 8, 2022 Thanks Griga, the closedvbviewer works like a charm, i have it all running with a ps script and one scheduler task (downloading, importing and closing DVBViewer) i guess i did not wait long enough for media server to reload channels so after a new try and waiting a bit the clients did pickup the new channel list. Thanks again and Happy Holidays and best wishes for the New Year to you and the team. 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.