Automatically assign consecutive LCNs

Post your great ideas and suggestions here
Post Reply
c128
Posts: 81
Joined: Wed Aug 15, 2012 8:41 pm

Automatically assign consecutive LCNs

Post by c128 » Tue Feb 04, 2014 10:51 pm

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...

RedRat
Posts: 29
Joined: Mon Nov 08, 2010 9:38 am
Location: Schöenck(Hessen)/Germany

Re: Automatically assign consecutive LCNs

Post by RedRat » Tue Feb 04, 2014 11:46 pm

I created a little SQL script donig this

Are you interested ?

Grettz Alex

c128
Posts: 81
Joined: Wed Aug 15, 2012 8:41 pm

Re: Automatically assign consecutive LCNs

Post by c128 » Wed Feb 05, 2014 9:03 pm

Yes I am.

Thanks :)

c128
Posts: 81
Joined: Wed Aug 15, 2012 8:41 pm

Re: Automatically assign consecutive LCNs

Post by c128 » Sun Feb 15, 2015 11:20 am

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?

hanandyn
Posts: 52
Joined: Sat May 01, 2010 8:36 pm

Re: Automatically assign consecutive LCNs

Post by hanandyn » Mon Mar 09, 2015 9:11 am

can you share the script?

RedRat
Posts: 29
Joined: Mon Nov 08, 2010 9:38 am
Location: Schöenck(Hessen)/Germany

Re: Automatically assign consecutive LCNs

Post by RedRat » Mon Mar 09, 2015 10:52 am

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

hanandyn
Posts: 52
Joined: Sat May 01, 2010 8:36 pm

Re: Automatically assign consecutive LCNs

Post by hanandyn » Fri Apr 03, 2015 9:50 am

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

RedRat
Posts: 29
Joined: Mon Nov 08, 2010 9:38 am
Location: Schöenck(Hessen)/Germany

Re: Automatically assign consecutive LCNs

Post by RedRat » Mon Apr 06, 2015 3:24 pm

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

hanandyn
Posts: 52
Joined: Sat May 01, 2010 8:36 pm

Re: Automatically assign consecutive LCNs

Post by hanandyn » Tue Apr 07, 2015 5:31 pm

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

User avatar
tripkip
Posts: 29
Joined: Mon Feb 09, 2015 4:28 pm

Re: Automatically assign consecutive LCNs

Post by tripkip » Thu May 07, 2015 3:28 pm


Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests