Page 1 of 1

how do i get an output of the channel names and numbers

PostPosted: Thu Feb 02, 2017 3:10 pm
by gonesuper
im editing an m3u file for emby and cant get my head around the numbering that Schedules Direct uses. is there any way to get an output as a table. i know emby gets thsi into as when i manual map a channel i can see the correct numbering. but in the UK it differes a lot.

an example being BskyB uses 101 for bbc 1 and 104 for channel 4 but giving the channel-id tag of 104 for channel 4 matches up with bbc four.

all i really need is a command to out put my choosen line up so i can manually do it

Re: how do i get an output of the channel names and numbers

PostPosted: Thu Feb 02, 2017 11:59 pm
by rmeden
Does Emby get an XMLTV file (I think it does). Just look at the file, should be readable.

If Emby doesn't use the XMLTV tools (tv_grab_zz_sdjson or tv_grab_zz_sdjson_sqlite) to get an xmltv file and look that way. You may be able to even use the --list-channels option with the grabbers.

Re: how do i get an output of the channel names and numbers

PostPosted: Sun Feb 05, 2017 6:43 pm
by pete318
gonesuper wrote:an example being BskyB uses 101 for bbc 1 and 104 for channel 4 but giving the channel-id tag of 104 for channel 4 matches up with bbc four.
SD is actually correct, and I wonder if whatever tool you're using is turning the channel number (which is a string) into an integer, or other numeric and as such dropping the leading zero. Look on a sky box and you'll see radio channels begin with "0".

I have BBC Radio 4 FM as 0104 (station ID 24437)
I have Channel 4 as 104. (station ID 17155)
There is also Channel 4 HD as 227. (station ID 50716)

Now there IS a numbering issue for the Sky lineup regarding HD and non HD channels, which I keep meaning to report, once I get the full list. I've just not gotten round to it yet.

But in the case you provide, it's as I've posted.

EDIT: If you're using the SD-JSON interface and want to see the channel listings in your lineups, maybe try grabbing my project. It's still very much WIP but, you should be able to at least use the UI enough to see the channel list and get channel numbers/ID by name. It doesn't work with the SD-DD interface though.

https://github.com/M0OPK/SDJSharp note, if you're running linux, under mono I've seen problems with the xmltv mapping side. But, again if you just want to see channel list per lineup.. I think you'll be able to use it on that too.

Re: how do i get an output of the channel names and numbers

PostPosted: Fri Feb 17, 2017 12:58 am
by gonesuper
thanks for the info. your tools looks to be exactly what i want. its Emby that im using and yes its seeing 104 and 0104 as the same. it also orders incorrectly based on the same error. ill pass this on to their support now as correcting the difference between integer and number would go a long way to having a fully automated epg line up.

i have both linux with mono running and windows. can u give me a rough step by step to get ur app up and running. im on the 7 day trial so i assume i have both json and xml. emby uses json and i can manually map channels but with my channel links changing id rather map it at the m3u end.

Re: how do i get an output of the channel names and numbers

PostPosted: Fri Feb 17, 2017 4:34 am
by pete318
For mono, be aware that the XML mapping screen sometimes has problems. I haven't really debugged the why yet because for my own uses I use windows to configure and command line in mono, on linux to fetch.

The step by step guide would be to either:

1: Pull source, build in windows/visual studio (2015 community free edition will work fine). Then ship the binaries to the linux machine and then run with latest mono.
2: Pull latest release (I think there is a very recent correction I made, which isn't yet in the latest release, I'll update it when I can). Unzip the UI files into a folder, and then just do "mono SDGrabSharp.UI.exe" in the folder you unzipped to. It should load up and run.

Like I say, if you want to use it to actually map channels and generate an xmltv file. Well, I'd suggest running the UI side in windows, to map channels etc and then run the CLI version (with the xml config file) in linux. Since that's how I do it, and I know it works.

One thing to note, is to make sure you add the mono repo, then get latest (for ubuntu/debian), so you have the latest version. For reference purposes I run "Mono JIT compiler version 4.6.2 (Stable 4.6.2.16/ac9e222 Tue Jan 3 11:48:26 UTC 2017)"

The standard version I had on ubuntu was quite ancient and will generally not run anything like this, built against .NET 4.5+

EDIT: Since this is pre-release, please submit either on github, or via PM any issues you might find.