-
Notifications
You must be signed in to change notification settings - Fork 17
/
GetChannelCount.cs
41 lines (33 loc) · 962 Bytes
/
GetChannelCount.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using System.Text;
using TVServerKodi;
namespace TVServerKodi.Commands
{
class GetChannelCount : CommandHandler
{
public GetChannelCount(ConnectionHandler connection) : base(connection)
{
}
public override void handleCommand(string command, string[] arguments, ref TvControl.IUser me)
{
String group;
int count = 0;
if (arguments != null)
{ //we want to list all channels in group arg[0]
group = arguments[0];
}
else
{
group = "";
}
count = TVServerConnection.getChannelCount(group);
Console.WriteLine("GetChannelCount: " + count);
writer.write(count.ToString());
}
public override string getCommandToHandle()
{
return "GetChannelCount";
}
}
}