Automatically assign consecutive LCNs
Automatically assign consecutive LCNs
I think I'm right in saying that Argus provides no support for assigning LCNs in a scan?
Would it be possible to have a button in the Scheduler Consoles -> Channels view that automatically assigned LCNs from 1 onwards based on the current list and ordering?
I really make no use of LCNs, but as they dictate the ordering for XBMC it would be useful if you could assign them in a lump for the current set of channels...
Would it be possible to have a button in the Scheduler Consoles -> Channels view that automatically assigned LCNs from 1 onwards based on the current list and ordering?
I really make no use of LCNs, but as they dictate the ordering for XBMC it would be useful if you could assign them in a lump for the current set of channels...
Re: Automatically assign consecutive LCNs
I created a little SQL script donig this
Are you interested ?
Grettz Alex
Are you interested ?
Grettz Alex
Re: Automatically assign consecutive LCNs
Yes I am.
Thanks
Thanks
Re: Automatically assign consecutive LCNs
This still seems like a bit of an issue with the use of Argus + XBMC/Kodi .
Dunno how complicated this might be but, from the face of it, a relatively relatively straightforward bit of functionality to include?
Dunno how complicated this might be but, from the face of it, a relatively relatively straightforward bit of functionality to include?
Re: Automatically assign consecutive LCNs
can you share the script?
Re: Automatically assign consecutive LCNs
Hi,
try this one. It is for SQLServer !
update channel set logicalchannelnumber = lcn
from
(select row_number () over (partition by groupname order by
channelgroup.sequence,channelgroup.version desc,channelgroup.id,channelgroupchannel.sequence ) as lcn,
groupname,displayname,logicalchannelnumber,channel.channelid
from channelgroup,channelgroupchannel,channel
where channelgroup.channelgroupid = channelgroupchannel.channelgroupid
and channel.channelid = channelgroupchannel.channelid ) AS C
where c.channelid = channel.channelid;
Greetz
Alex
try this one. It is for SQLServer !
update channel set logicalchannelnumber = lcn
from
(select row_number () over (partition by groupname order by
channelgroup.sequence,channelgroup.version desc,channelgroup.id,channelgroupchannel.sequence ) as lcn,
groupname,displayname,logicalchannelnumber,channel.channelid
from channelgroup,channelgroupchannel,channel
where channelgroup.channelgroupid = channelgroupchannel.channelgroupid
and channel.channelid = channelgroupchannel.channelid ) AS C
where c.channelid = channel.channelid;
Greetz
Alex
Re: Automatically assign consecutive LCNs
RedRat wrote:Hi,
try this one. It is for SQLServer !
update channel set logicalchannelnumber = lcn
from
(select row_number () over (partition by groupname order by
channelgroup.sequence,channelgroup.version desc,channelgroup.id,channelgroupchannel.sequence ) as lcn,
groupname,displayname,logicalchannelnumber,channel.channelid
from channelgroup,channelgroupchannel,channel
where channelgroup.channelgroupid = channelgroupchannel.channelgroupid
and channel.channelid = channelgroupchannel.channelid ) AS C
where c.channelid = channel.channelid;
Greetz
Alex
what should i do with this? i am using mysql
Re: Automatically assign consecutive LCNs
Hm ,
you will need an SQL frontend. I use HeidiSQL. Connect to the database and run the script. For I am using SQLSerevr im not shure it will work with mySQL.
Basically the script generates LCNs depending on the groups and channel you have in the database.
Maybe some MySQL user will get the script to run !
I don't have a running MySQl database, so I cannot test it. Sorry
Regards,
Alex
you will need an SQL frontend. I use HeidiSQL. Connect to the database and run the script. For I am using SQLSerevr im not shure it will work with mySQL.
Basically the script generates LCNs depending on the groups and channel you have in the database.
Maybe some MySQL user will get the script to run !
I don't have a running MySQl database, so I cannot test it. Sorry
Regards,
Alex
Re: Automatically assign consecutive LCNs
Hi Alex,
thank you for your reply.
I have zero knowledge on SQL, I connected to mysql and tried to run the script but received the following:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'from
(select row_number () over (partition by groupname order by
channelgroup.s' at line 3
thank you for your reply.
I have zero knowledge on SQL, I connected to mysql and tried to run the script but received the following:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'from
(select row_number () over (partition by groupname order by
channelgroup.s' at line 3
Who is online
Users browsing this forum: No registered users and 12 guests