NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Channel/ChannelMapping

 
  • 0 Vote(s) - 0 Average
Channel/ChannelMapping
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#1
2014-04-14, 07:15 AM
On the ChannelMapping(int captureSourceOID, int channelNumber, string tuning, int serviceType) constructor, what is channelNumber (in regards to QAM channels)? It seems to always be 0 in my list of channels.

If I call Channel.LoadForGroup("Clear QAM Channels"), modify the list and then save it back using Channel.SaveAll(), will that remove all other channels in NPVR (meaning I should call Channel.Save() for each individual channel instead)?

If I call Channel.SetChannelMapping(), is this only temporary until Channel.Save() is called or does it save the channel automatically?

Does Channel.SetChannelMapping() overwrite the current mapping for that captureSourceOID or do I need to call Channel.DeleteMapping() first?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2014-04-14, 07:29 AM
whurlston Wrote:On the ChannelMapping(int captureSourceOID, int channelNumber, string tuning, int serviceType) constructor, what is channelNumber (in regards to QAM channels)? It seems to always be 0 in my list of channels.
The channel number is only used for analog/hdpvr channels, as part of tuning. For digital and other tuner types, it uses tuning string. ie, can the number can be anything for your QAM channels

Quote:If I call Channel.LoadForGroup("Clear QAM Channels"), modify the list and then save it back using Channel.SaveAll(), will that remove all other channels in NPVR (meaning I should call Channel.Save() for each individual channel instead)?
Calling channel.Save() updates that channel's data in the database. Calling Channel.SaveAll(x) does exactly the same as channel.Save(), but does it on multiple channels for speed. ie, it's only saving those channels passed in, and doesn't effect any other channels you haven't called Save()/SaveAll() on.

Quote:If I call Channel.SetChannelMapping(), is this only temporary until Channel.Save() is called or does it save the channel automatically?
It's only temporary until it's saved....however, you may find that mapping is not usable until you saved it. ie, some code reloads the mappings rather than using a mapping passed in.

Quote:Does Channel.SetChannelMapping() overwrite the current mapping for that captureSourceOID or do I need to call Channel.DeleteMapping() first?
SetChannelMapping will replace any existing mapping for that CaptureSourceOID.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#3
2014-04-14, 08:08 AM
Awesome. I probably won't call SetChannelMapping() until I've ready to save the channel then (in case of any code that uses a mapping passed in) so as not to affect anything. Makes undo simpler too.

On a fresh setup, I'm able to automatically name/renumber 99 of 102 channels, and in the case of channels being moved, I'm able to automatically detect and remap 86 of 106 (more once I link my current channel names to the names given in the VirtualChannelMap).
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#4
2014-04-14, 04:58 PM
Great! That certainly looks like it'd take a lot of the pain out of QAM mapping.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2014-04-14, 06:26 PM
Yeah, it's not going to be perfect but it will help a lot.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  API channel.stream.start mvallevand 2 1,265 2023-05-07, 09:40 PM
Last Post: mvallevand
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,345 2021-03-11, 03:59 PM
Last Post: mvallevand
  What is being sent when using /live?channel=3.1 scJohn 2 1,882 2020-01-30, 04:51 PM
Last Post: sub
  Web command to create recurring any channel mvallevand 2 2,565 2019-02-04, 03:09 PM
Last Post: mvallevand
  XMLTV Channel Number Option gdogg371 12 6,662 2018-07-18, 04:32 PM
Last Post: sub
  Channels List by Channel Group Name scJohn 1 2,749 2018-01-05, 10:45 PM
Last Post: mvallevand
  Channel List (native controller) psycik 2 3,043 2017-06-19, 09:14 AM
Last Post: psycik
  Getting all channel listings - decimal channel numbers psycik 11 8,171 2015-12-13, 02:17 AM
Last Post: seejaydee
  What causes a new tuner to be used services/live?channel= psycik 2 2,263 2014-02-04, 05:32 PM
Last Post: psycik
  NEWA - using buffer file produced by /public/VLCService?Channel= bgowland 5 2,780 2014-01-02, 06:36 AM
Last Post: bgowland

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

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

Linear Mode
Threaded Mode