home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to read in mediaportal a value stored in tvlibrary?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bob987" data-source="post: 413056" data-attributes="member: 87778"><p>Hi,</p><p>I will try to rewrite my original post so it will be a bit clearer (and hope to get an answer <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />)</p><p></p><p>In short: </p><p>I’ve added a new value inside the TV-Server configuration. Now I wish to read this value inside MediaPortal but I don’t know how.</p><p>I searched for some example in the source code for the last days with out any luck.</p><p></p><p></p><p></p><p>The full story:</p><p>I’m living in Israel, and our weekdays are Sunday to Thursday, so I wish to change the advanced recording option of “Record Mon-Fri” to “Record Sun-Thu”.</p><p> </p><p>I managed to add a combo box to TV-Server Configuration (TvRecording,cs) that select the first working day. I store its value like all other values using: </p><p> setting = layer.GetSetting("FirstWorkingDay", "0"); //default is Monday=0</p><p> setting.Value = comboBoxFirstWorkingDay.SelectedIndex.ToString();</p><p> setting.Persist();</p><p></p><p>I can read this with no problem from inside the TvService (Scheduler.cs), using the layer.GetSetting.</p><p></p><p>Now, I wish to change the text shown in MediPortal-> Advanced recording (option 6 & 7) according to the selected option in the TV-Server configuration.</p><p></p><p>The problem is that I’m new to C#, and I didn’t find an example in the code of how to read this value.</p><p></p><p>I did found in GUISettingsRecordings.cs an example of reading from the MediaPortal.xml the values of “prerecord” and “postrecord”. But I don’t see where the MediaPortal.xml value is set to the value stored from the TV server config.</p><p></p><p>Could some one help me with how to export my “FirstWorkingDay” value from the tv server side to the mediaportal side?</p><p></p><p>Thanks,</p><p>bob</p></blockquote><p></p>
[QUOTE="bob987, post: 413056, member: 87778"] Hi, I will try to rewrite my original post so it will be a bit clearer (and hope to get an answer :)) In short: I’ve added a new value inside the TV-Server configuration. Now I wish to read this value inside MediaPortal but I don’t know how. I searched for some example in the source code for the last days with out any luck. The full story: I’m living in Israel, and our weekdays are Sunday to Thursday, so I wish to change the advanced recording option of “Record Mon-Fri” to “Record Sun-Thu”. I managed to add a combo box to TV-Server Configuration (TvRecording,cs) that select the first working day. I store its value like all other values using: setting = layer.GetSetting("FirstWorkingDay", "0"); //default is Monday=0 setting.Value = comboBoxFirstWorkingDay.SelectedIndex.ToString(); setting.Persist(); I can read this with no problem from inside the TvService (Scheduler.cs), using the layer.GetSetting. Now, I wish to change the text shown in MediPortal-> Advanced recording (option 6 & 7) according to the selected option in the TV-Server configuration. The problem is that I’m new to C#, and I didn’t find an example in the code of how to read this value. I did found in GUISettingsRecordings.cs an example of reading from the MediaPortal.xml the values of “prerecord” and “postrecord”. But I don’t see where the MediaPortal.xml value is set to the value stored from the TV server config. Could some one help me with how to export my “FirstWorkingDay” value from the tv server side to the mediaportal side? Thanks, bob [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to read in mediaportal a value stored in tvlibrary?
Contact us
RSS
Top
Bottom