NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 8 9 10 11 12 … 93 Next »
Scan for channels programmatically or via command prompt?

 
  • 0 Vote(s) - 0 Average
Scan for channels programmatically or via command prompt?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2013-03-07, 08:45 AM
Hi Sub/Others,

I'm pretty sure there isnt currently a way to do this, but is there a way to trigger a channel scan for a device programmatically or via command prompt?

Maybe a hack around a import/export channels or something?

If there isn't please consider adding an API call to do this.

Trying to add this to the web console.

Cheers
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#2
2013-03-07, 10:58 PM
I reverse-engineered QAM scanning for WebRadio but can't imagine supporting all the tuner types that sub does (plus tuner addons) with the risk that I'd need to keep all of them current. During the 2.5.x life cycle hdpvr scanning changed enough to require a change.

Martin
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#3
2013-03-07, 11:32 PM
There isn't currently an API for scanning.

At the moment each recording plugin (those included in the app and external ones) provide their own scanning or channel setup UI, collecting the different types parameters that each requires.

I'm not against adding an API for it, but it'd have to be a relatively complicated API, covering the different data requirements of each (LNB settings, satellite selection, diseqc setting, country and video standards, importing channels list for set top boxes connected to analog/hdpvr/colossus, frequencies, symbol rates).
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#4
2013-03-07, 11:37 PM
I suspect reven would want a browser interface for web console so you'd also have to detangle the UI components from the api

Martin
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#5
2013-03-07, 11:43 PM
mvallevand Wrote:I suspect reven would want a browser interface for web console so you'd also have to detangle the UI components from the api
Yeah, he wants an API he can call from his pages.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#6
2013-03-08, 12:01 AM
yeah I can take care of all the GUI stuff on the web console, just want some way to call this.

It can be complicated, that doesnt put me off Smile
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#7
2013-03-08, 12:11 AM
reven Wrote:It can be complicated, that doesnt put me off Smile
It puts me off a bit Big Grin Sounds like lots of work.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,940
Threads: 956
Joined: May 2006
#8
2013-03-08, 12:28 AM
On top of scanning I'm thinking about all the pieces involved in implementing a web ui like d/ling and presenting the sd.xml file

Martin
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#9
2013-03-08, 12:50 AM
i do this kinda stuff at work all the time.

big complicated web interfaces, lots of AJAX, lots of querying long running processes, exporting xml configuration files, importing xml configuration files.

really doesn't bother me, I enjoy making interfaces, call me crazy Smile

the only thing I hate doing is reports Smile

so sub if you're willing to make it accessible via the API, I'll handle the web gui Smile
sub
Online

Administrator

NextPVR HQ, New Zealand
Posts: 106,708
Threads: 767
Joined: Nov 2003
#10
2013-03-08, 01:24 AM
I've added a basic framework for scanning in the next release, which should be generic enough to support all types devices (and recorder plugins), but initially I'll only provide an implementation for DVB-T so you can develop with it. I'll flesh out the other implementations later.

Basically, on a CaptureSource object you can call:
Code:
IChannelScanner GetChannelScanner(Dictionary<string, object> scanningParameters, out string reason);

The scanning parameters will vary depending type of device. If the CaptureSource supports scanning, you'll get back an IChannelScanner. If the device doesn't yet support scanning, or you haven't supplied enough paramaters, you'll get back an a null, along with some readable reason why.

You can then use the IChannelScanner to perform the scan:

Code:
public interface IChannelScanner
    {
        bool StartScan(out string reason);        
        void StopScan();

        bool IsScanComplete();
        List<Channel> CheckForChannels();
        string GetStatus();
    }
To use it you'd call StartScan(), then be required to regularly call CheckForChannels() and IsScanComplete().

You can show the Channels in a list, and if the user hits 'ok' to save them, then you can call channel.Save();
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  is there a service?method which returns listings for multiple channels? reven 16 6,997 2022-04-11, 04:30 PM
Last Post: mandai
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,394 2021-03-11, 03:59 PM
Last Post: mvallevand
  Web command to create recurring any channel mvallevand 2 2,599 2019-02-04, 03:09 PM
Last Post: mvallevand
  Command Line Arguments for Executable gdogg371 29 13,369 2018-08-09, 01:35 PM
Last Post: jcole998
  Channels List by Channel Group Name scJohn 1 2,778 2018-01-05, 10:45 PM
Last Post: mvallevand
  Switching Audio Channels spitefulgod 0 2,012 2016-12-15, 08:42 PM
Last Post: spitefulgod
  Change recording filename programmatically immediately before recording starts? craigrs84 5 6,093 2015-07-13, 09:28 PM
Last Post: patco444
  Merged channels mvallevand 3 2,638 2014-04-11, 04:55 AM
Last Post: mvallevand
  Plugin problems with started from the command line mvallevand 11 5,008 2012-08-12, 07:56 PM
Last Post: sub
  Non-broadcasting channels imilne 16 6,193 2011-07-02, 04:31 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode