NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 9 10 11 12 13 … 93 Next »
Best way to load settings for NPVR?

 
  • 0 Vote(s) - 0 Average
Best way to load settings for NPVR?
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#1
2012-11-01, 12:24 AM
whats the best way to load settings like
- Default post/pre padding
- Recording directories

also for ScheduleHelperFactory.ScheduleRecording() what should I use for RecordingDirectoryId? Only thing I can see it might be is either the path or the name, but what happens when a user changes either of those (or both) to scheduled recordings?

also is there a way to use the "default" post/pre padding when scheduling? so when the user changes these in the config, the scheduled recordings use these new figures (ie determines them at record time) and not have them just use the default when the initially scheduled the recording.

is there any point to use anything other than RecordingQuality.QUALITY_DEFAULT ? any more (i think people use to use this when doing analog recordings in gbpvr....)

cheers
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2012-11-01, 12:37 AM
Code:
SettingsHelper settings = SettingsHelper.GetInstance();
            int prePadding = settings.GetSetting("/Settings/Recording/PrePadding", 1);
            int postPadding = settings.GetSetting("/Settings/Recording/PostPadding", 2);
;

Code:
string extraDirectories = settings.GetSetting("/Settings/Recording/ExtraRecordingDirectories", "none");
            if (extraDirectories != "none")
            {
                string[] parts = extraDirectories.Split(new char[] { '~' }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < parts.Length; i += 2)
                {
                    recordingDirectories.Add(parts[i]);

Quote:also for ScheduleHelperFactory.ScheduleRecording() what should I use for RecordingDirectoryId? Only thing I can see it might be is either the path or the name, but what happens when a user changes either of those (or both) to scheduled recordings?
The RecordingDirectoryId can be null to stop it in the default directory, or "[directoryid]" where directoryid is the identifer of one of the recordings. The value is only looked up at the time the recording is started. If they've since deleted that directory entry, then the default directory is used.

Quote:also is there a way to use the "default" post/pre padding when scheduling? so when the user changes these in the config, the scheduled recordings use these new figures (ie determines them at record time) and not have them just use the default when the initially scheduled the recording.
No, it stores a copy of the values with the recording.

I'd just schedule with RecordingQuality.QUALITY_DEFAULT. I had intentions of doing more with, but nearly everyone is using digital these days, and multiple analog quality profiles doesn't seem to be a big deal to anyone.
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#3
2012-11-01, 01:01 AM
cheers, thought there might have been a configuration class hidden away in the "api" somewhere.

have you ever thought about allowing "null" to be used for pre/post padding, and if its null, use the default set at schedule time? so users can keep it all to default and if needed to change it in the config which changes it for all their future recordings, this is how I assumed it worked before digging through the code Smile
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,839
Threads: 954
Joined: May 2006
#4
2012-11-01, 01:12 AM
+1 for allowing a default of -1 or something for padding. I was going to ask the same thing for the FTR import.

Martin
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#5
2012-11-01, 01:13 AM
i was thinking -1 but people sometimes to like to use negative padding, so would have to be null or "special number"
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,343 2021-03-11, 03:59 PM
Last Post: mvallevand
  Plugins and NPVR. Where do we start? sub 80 68,124 2020-11-26, 10:02 PM
Last Post: mandai
  Test/Development environment for npvr.db3 scJohn 10 4,238 2020-09-04, 09:14 PM
Last Post: scJohn
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,395 2018-10-23, 07:24 AM
Last Post: almightyj
  ios app to control npvr ui idea jnbooker15 4 3,567 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,448 2015-09-21, 06:39 PM
Last Post: jnbooker15
  Couple of questions about hacking npvr.db3 drmargarit 6 4,224 2014-09-08, 02:22 AM
Last Post: sub
  high res (256x256+) npvr icon? reven 15 5,786 2013-09-01, 05:13 AM
Last Post: psycik
  trying to fake npvr database for unit tests reven 3 2,248 2013-05-20, 08:53 AM
Last Post: reven
  Multiple genres in npvr.db3 bgowland 5 2,820 2013-04-16, 09:53 PM
Last Post: ACTCMS

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

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

Linear Mode
Threaded Mode