Jump to content

Fully Automate importing IP TV channels


Qosmio

Recommended Posts

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

Link to comment

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.

 

Link to comment

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.

 

Link to comment
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.

 

  • Thanks 1
Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...