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!)
Help with a patch
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="mcraenz" data-source="post: 184197" data-attributes="member: 54136"><p>As per the this thread I started:</p><p><a href="https://forum.team-mediaportal.com/tuning_details_driving_me_crazy-t28389.html" target="_blank">https://forum.team-mediaportal.com/tuning_details_driving_me_crazy-t28389.html</a></p><p></p><p>I've dug into the code; I've dabbled in c# a little so please bare with me.</p><p>I've SVN'd the latest TV3 code and found where the issue is. As it stands the decision as to whether to update the tuning details or create new ones is based on whether tuning details for the channels exist or not. </p><p></p><p>I've created a patch for CardDvbS.cs so that it not only checks whether the tuning details exist but whether they are of the same type or not (dvbs, dvbt etc). </p><p></p><p>patch looks like this:</p><p></p><p>[CODE]Index: CardDvbS.cs</p><p>===================================================================</p><p>--- CardDvbS.cs (revision 16000)</p><p>+++ CardDvbS.cs (working copy)</p><p>@@ -816,7 +816,7 @@</p><p> Channel dbChannel;</p><p> DVBSChannel channel = (DVBSChannel)channels[i];</p><p> TuningDetail currentDetail = layer.GetChannel(channel);</p><p>- if (currentDetail == null)</p><p>+ if (currentDetail == null || currentDetail.ChannelType != 3)</p><p> {</p><p> //add new channel</p><p> exists = false;</p><p>@@ -827,6 +827,7 @@</p><p> dbChannel.SortOrder = channel.LogicalChannelNumber;</p><p> }</p><p> }</p><p>+ </p><p> else</p><p> {</p><p> exists = true;</p><p>@@ -850,7 +851,7 @@</p><p> {</p><p> layer.AddChannelToGroup(dbChannel, channel.Provider);</p><p> }</p><p>- if (currentDetail == null)</p><p>+ if (currentDetail == null || currentDetail.ChannelType != 3 )</p><p> {</p><p> channel.SatelliteIndex = position;// context.Satelite.IdSatellite;</p><p> layer.AddTuningDetails(dbChannel, channel);</p><p>[/CODE]</p><p></p><p>So now it will not update the tuning details if the channel type is different.</p><p></p><p>I've compiled setuptv and tested.ok</p><p></p><p>Now my questions are these:</p><p>1.Where do I look to find all the channel types so that I can create patches for CardDvbt.cs, CardDvbC.cs etc.?</p><p>2.How do I submit my patch?</p><p>3.Will any one implement my patch?</p><p>4.Do I not know what I'm doing and should I just go back to what I know (watching the TV<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" />!!)?</p><p></p><p>Regards,</p><p>mcraenz</p></blockquote><p></p>
[QUOTE="mcraenz, post: 184197, member: 54136"] As per the this thread I started: [url]https://forum.team-mediaportal.com/tuning_details_driving_me_crazy-t28389.html[/url] I've dug into the code; I've dabbled in c# a little so please bare with me. I've SVN'd the latest TV3 code and found where the issue is. As it stands the decision as to whether to update the tuning details or create new ones is based on whether tuning details for the channels exist or not. I've created a patch for CardDvbS.cs so that it not only checks whether the tuning details exist but whether they are of the same type or not (dvbs, dvbt etc). patch looks like this: [CODE]Index: CardDvbS.cs =================================================================== --- CardDvbS.cs (revision 16000) +++ CardDvbS.cs (working copy) @@ -816,7 +816,7 @@ Channel dbChannel; DVBSChannel channel = (DVBSChannel)channels[i]; TuningDetail currentDetail = layer.GetChannel(channel); - if (currentDetail == null) + if (currentDetail == null || currentDetail.ChannelType != 3) { //add new channel exists = false; @@ -827,6 +827,7 @@ dbChannel.SortOrder = channel.LogicalChannelNumber; } } + else { exists = true; @@ -850,7 +851,7 @@ { layer.AddChannelToGroup(dbChannel, channel.Provider); } - if (currentDetail == null) + if (currentDetail == null || currentDetail.ChannelType != 3 ) { channel.SatelliteIndex = position;// context.Satelite.IdSatellite; layer.AddTuningDetails(dbChannel, channel); [/CODE] So now it will not update the tuning details if the channel type is different. I've compiled setuptv and tested.ok Now my questions are these: 1.Where do I look to find all the channel types so that I can create patches for CardDvbt.cs, CardDvbC.cs etc.? 2.How do I submit my patch? 3.Will any one implement my patch? 4.Do I not know what I'm doing and should I just go back to what I know (watching the TV:(!!)? Regards, mcraenz [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Help with a patch
Contact us
RSS
Top
Bottom