Jump to content


Photo

service number


  • Please log in to reply
30 replies to this topic

Re: service number #21 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 09:46

But with this patch in theory I could put #CHANNEL before every entry so I could have channel 1, then 9 then 47, then 99 if I wanted, or have I understood this incorrectly?

Re: service number #22 awx

  • Senior Member
  • 297 posts

+17
Neutral

Posted 8 August 2012 - 09:51

But with this patch in theory I could put #CHANNEL before every entry so I could have channel 1, then 9 then 47, then 99 if I wanted, or have I understood this incorrectly?

Yes, that is the way that patch was meant to work. It still counts sequentially but you choose to interrupt the counting sequence and have it start at the number you like.
It allows you to number channels as mentioned and if you have channels say 47 through 99, you only need to number 47 and the rest are numbered to 99.
However as I havent looked that the source recently and littlesat has mentioned there was a change, I am not sure how this will fit.

Re: service number #23 littlesat

  • PLi® Core member
  • 57,063 posts

+698
Excellent

Posted 8 August 2012 - 10:47

Yes... but you cannot guarantee that numbers are unique, so e.g. numbers are used twice. So therefore it is not done... I think these numbers should be uniq... By "countring" this the services in the userbouquets this is guaranteed. And with the empty markers we can obtain that the numbers are going through.

And also a big risk as far I can see that settingseditors do not work (they are not aware of any numbering field) and plugins could do not understand something...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: service number #24 awx

  • Senior Member
  • 297 posts

+17
Neutral

Posted 8 August 2012 - 10:57

Yes... but you cannot guarantee that numbers are unique, so e.g. numbers are used twice. So therefore it is not done... I think these numbers should be uniq... By "countring" this the services in the userbouquets this is guaranteed. And with the empty markers we can obtain that the numbers are going through.

And also a big risk as far I can see that settingseditors do not work (they are not aware of any numbering field) and plugins could do not understand something...


I agree with all of that.
Although, I do think that the internal counting mechanism (that is if it hasn't changed) itself should be updated and only done once and not on every input and then updated on an as needed basis, but that not really a big deal as it work as is.

Only I would add that the patch doesn't really allow the normal end user to change this it is more of an advanced feature because you have to hand edit, but that being said introducing it without changing other tools will undoubtedly cause pain as errors are reported on tools that do not correctly ignore the add channel number description.

Re: service number #25 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 11:37

I agree that it would be beneficial to add this feature for advanced users, and while it is a concern that using it may break functionality in plugins - the plugins will not be able to support it until there is something in core to support (chick & egg etc.).

Once those who are using the service number feature also want the benefit of plugins that do not support it, we will start providing patches.

Re: service number #26 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 11:45

Perhaps in order to prevent duplicate numbers it should be enforced that the #CHANNEL number is higher than the current count so that the channels still need to be in order?

Re: service number #27 littlesat

  • PLi® Core member
  • 57,063 posts

+698
Excellent

Posted 8 August 2012 - 13:50

Perhaps in order to prevent duplicate numbers it should be enforced that the #CHANNEL number is higher than the current count so that the channels still need to be in order?

This is extreme tricky...

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: service number #28 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 14:31

I might not be reading it right but this looks like the bit that does the renumbering (lines: 226-228 of the patch)

+   eDebug("Current number '%d' renumbering to '%d' channel '%s'", tmp.channel_num, startChannelNum, tmp.getName().c_str());
+   tmp.channel_num = startChannelNum++;
+   eDebug("Updated number to '%d' channel '%s'", tmp.channel_num, tmp.getName().c_str());

Would this sort of thing work?

if( startChannelNum > tmp.channel_num )
{
   eDebug("Current number '%d' renumbering to '%d' channel '%s'", tmp.channel_num, startChannelNum, tmp.getName().c_str());
   tmp.channel_num = startChannelNum++;
   eDebug("Updated number to '%d' channel '%s'", tmp.channel_num, tmp.getName().c_str());
}
else
{
   eDebug("Current number '%d' not renumbered to '%d' channel '%s'. Number out of sequence.", tmp.channel_num, startChannelNum, tmp.getName().c_str());
   startChannelNum = tmp.channel_num;
}


Re: service number #29 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 14:42

Although even without it - on the understanding that it is an advanced feature the OP seems to have done a good job of handling duplicate numbers and their use by checking the current bouquet first. This could be used for example by having a bouquet of Freesat channels and use their EPG numbers and a bouquet of Sky channels and use their numbers.

Edited by silid, 8 August 2012 - 14:43.


Re: service number #30 awx

  • Senior Member
  • 297 posts

+17
Neutral

Posted 8 August 2012 - 15:12

I might not be reading it right but this looks like the bit that does the renumbering (lines: 226-228 of the patch)

+   eDebug("Current number '%d' renumbering to '%d' channel '%s'", tmp.channel_num, startChannelNum, tmp.getName().c_str());
+   tmp.channel_num = startChannelNum++;
+   eDebug("Updated number to '%d' channel '%s'", tmp.channel_num, tmp.getName().c_str());

Would this sort of thing work?

if( startChannelNum > tmp.channel_num )
{
   eDebug("Current number '%d' renumbering to '%d' channel '%s'", tmp.channel_num, startChannelNum, tmp.getName().c_str());
   tmp.channel_num = startChannelNum++;
   eDebug("Updated number to '%d' channel '%s'", tmp.channel_num, tmp.getName().c_str());
}
else
{
   eDebug("Current number '%d' not renumbered to '%d' channel '%s'. Number out of sequence.", tmp.channel_num, startChannelNum, tmp.getName().c_str());
   startChannelNum = tmp.channel_num;
}

There are two places something like that would be needed, the loading of the service list and that portiion which is used for updating when a channel is added/moved/deleted.
However there is a problem to doing a check like that, if you want to start the next bouquet at say 1, then it wont be possible anymore and the check would than need to be more complex, obviously not impossible to do but as I havent look at that in sometime I wouldnt be able to say how complex a task it would be.

Re: service number #31 silid

  • Member
  • 15 posts

0
Neutral

Posted 8 August 2012 - 15:29

I don't mind either way about having duplicate service numbers. I'd just like to get the feature that enables service numbers to be specified in the bouquet lists added so whatever it takes to do that is fine by me.


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users