xmltv & Atlas Metabroadcast - replacing UK Radio Times

hucknallred

Portal Pro
February 21, 2012
75
8
54
Country flag
I read somewhere that the RT feed which Atlas provide is going at the end of Jan 15, this may or may not be true.
Seeing as the RT feed doesn't get new channels I decided to have a go with Atlas.

At present there is no grabber for xmltvgui AFAIAA, so this has to be done by the cli client, but it's not that difficult.

First off, you need an API key from Atlas, you can have up to 10 for free, get this from http://atlas.metabroadcast.com/

Once you have it you need to activate the PA feed with your key at http://atlas.metabroadcast.com/admin#/applications/hngc

The Atlas site is a bit quirky in how you set it all up, but you'll get there.

Install the cli xmltv if you haven't already (not xmltvgui)
Get the atlas grabber - https://github.com/honir/tv_grab_uk_atlas

Unzip the file tv_grab_uk_atlas into your xmltv directory.

Now the fun stuff.. text in red is what you do...

Open a command prompt in your XMLTV directory & do the following, this is for my setup, yours may vary.

C:\Program Files (x86)\xmltv>xmltv tv_grab_uk_atlas --configure
Timezone is +0000
tv_grab_uk_atlas uses a cache with files that it has already downloaded. Please specify a location for this cache.
Directory to store the cache: [C:\Users\ASUSUS/.xmltv/cache] This is my default, change this if you wish

tv_grab_uk_atlas requires an API key which you must obtain from MetaBroadcast.com
Enter your Atlas API key: paste your API key here

tv_grab_uk_atlas normally outputs an episode-num tag with brand.series.episode ids from the Atlas database.
Output brand/series/summary ids? (yes/no): [yes]

Enter the region code you want or leave blank to select from a list
Enter your viewing region: left blank to get list

Fetching platforms
tv_grab_uk_atlas selects channels to download based on your viewing platform.
Choose your viewing platform:
0: Sky HD (GB)(IE)
1: Sky SD (GB)(IE)
2: Freeview (GB)
3: Freesat (GB)
4: Virgin (GB)
5: Top Up TV (GB)
6: YouView (GB)
7: Saorsat (IE)
8: BT TV (GB)
9: TalkTalk YouView (GB)
Select one: [0,1,2,3,4,5,6,7,8,9 (default=0)] 2 (choose your own)
tv_grab_uk_atlas selects channels to download based on your TV region.
Choose your viewing region:
0: Channel Islands
1: West Midlands
2: Cumbria
3: Yorkshire
4: Cambridgeshire
5: Oxfordshire
6: Scotland (Borders)
7: Scotland (Central)
8: East Midlands
9: Wales
10: North West
11: Northern Ireland
12: East
13: North East
14: South West
15: South
16: Scotland (North)
17: Yorkshire & Lincolnshire
18: West
19: London
20: South East
Select one: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 (default=0)] 8 (choose your own)
Fetching channels
Select the channels that you want to receive data for.
BBC One East Midlands [yes,no,all,none (default=no)] all
ITV3 yes
BBC One HD yes
BBC Two HD yes
ITVHD Central yes
Channel 4 HD yes
BBC Three HD yes
BBC Four HD yes
BBC News Channel HD yes
Al Jazeera English HD yes
Community Channel HD yes
Pick yes
Channel 4 +1 HD yes
4seven HD yes
Dave yes
CBBC yes
CBeebies yes
CITV yes
CBBC HD yes
CBeebies HD yes
Pop yes
Channel 4 +1 yes
BBC News Channel yes
BBC Parliament yes
Sky News yes
Al Jazeera English yes
Al Jazeera Arabic yes
RT yes
More4 yes
Film4 yes
QVC yes
Really yes
Television X yes
4Music yes
Yesterday yes
BBC Two England yes
Drama yes
Viva yes
Ideal World Freeview yes
Shop at Bid yes
ITV4 yes
Motors TV yes
TVPlayer yes
Vintage TV yes
Dave ja vu yes
ITVBe yes
ITV2+1 yes
E4 yes
E4 +1 yes
ITV Central yes
5* yes
5USA yes
Movie Mix yes
ITV Central+1 yes
ITV3+1 Freeview yes
Create and Craft yes
Quest yes
Quest +1 yes
Channel 4 yes
Food Network yes
Travel Channel Freeview yes
Gems TV yes
Channel 5 +1 yes
Film4 +1 yes
Challenge yes
4seven yes
Movies4Men yes
Channel 5 yes
Channel 5+24 Freeview yes
ITV2 yes
BBC Red Button 1 yes
True Entertainment yes
Community Channel yes
CBS Reality yes
truTV yes
BBC Three yes
CBS Action yes
BBC Radio 1 yes
BBC Radio 1Xtra yes
BBC Radio 2 yes
BBC Radio 3 yes
BBC Radio 4 FM yes
BBC Radio 5 live yes
BBC Radio 5 live sports extra yes
BBC Radio 6 Music yes
BBC Radio 4 Extra yes
BBC Asian Network yes
Motors TV yes
BBC World Service yes
The Hits yes
Smash Hits yes
Kiss 100 yes
Magic 105.4 yes
Heat yes
Kerrang! yes
102.2 Smooth Radio yes
talkSPORT DAB yes
96-106 Capital FM yes
Premier Christian Radio yes
Absolute Radio yes
Heart London yes
Notts TV yes
BBC Four yes

That's it configured, now you need to grab. I use Argus for tuning & scheduling, but it uses an identical tvguide.xml file to the MP one.

C:\Program Files (x86)\xmltv>xmltv tv_grab_uk_atlas --days 14 --output tvguide.xml
Timezone is +0000
Fetching listings
Filtering duplicates

That's it, all done, the xml file was pulled in by Argus with no problems.

If you want to edit the channels that are grabbed you can do this with the help of a spreadsheet.

in the xmltv\.xmltv folder you will find the config file called tv_grab_uk_atlas.conf, open it in a text editor & it will be like this:

cachedir=C:\Users\ASUSUS/.xmltv/cache
api-key=************************
writeids=yes
lineupcode=
platform=cbg2
region=cbhh
channel=cbbq
channel=cbWw
& so on with all your channels.

But what code relates to what channel?? Easy, copy all the channel codes & paste into a spreadsheet, then scroll back to your list of grabbed channels from when you did the config, copy & paste these into the next column, so you end up with a list like this:

cbbp BBC One East Midlands
cbd2 ITV3
cbbq BBC One HD
cbWw BBC Two HD
cbDG ITVHD Central
cbfg Channel 4 HD
cbZc BBC Three HD
cbZd BBC Four HD
cbZh BBC News Channel HD
cbZm Al Jazeera English HD


Cut the ones you don't want to grab, copy the edited list of codes & paste back into the conf file.
This would be useful if you have a mix of Freeview & Freesat channels like I do.

Hope this helps & I'll try to answer any queries!
 
Last edited:

lisag

Retired Team Member
  • Premium Supporter
  • March 3, 2012
    457
    43
    Essex
    Country flag
    Thanks, I use RT via XMLTV GUI and Argus. If I get no data at the end of the month, looks like I'll need this!

    Is there a way to automate the process for daily grabs?

    @karl10247 - this may help you too.
     

    hucknallred

    Portal Pro
    February 21, 2012
    75
    8
    54
    Country flag
    One thing to add that I found out was you need to treat radio channels separately in Argus, not sure about MP.
    The RT feed doesn't contain radio channels despite being called Radio Times :confused:
    Atlas has Radio Channels in it's feed, but Argus will add these as TV Channels which can't be linked to your radio channels.
    My solution is to duplicate my xmltv folder so I have 2 versions, with different .conf files, one for TV & the other for radio. Your radio .xml file needs to drop into the Radio subfolder in the Argus xmltv folder to get the radio treatment.
     

    lisag

    Retired Team Member
  • Premium Supporter
  • March 3, 2012
    457
    43
    Essex
    Country flag
    Hi, I have just been experimenting with this on a test machine using just one spare USB DVB-T tuner.

    Thanks so much for your instructions, I don't think I would have got anywhere without them!

    I had one error though, when using this command:

    xmltv tv_grab_uk_atlas --days 14 --output C:\ProgramData\ARGUS TV\XMLTV\tvguide.xml

    I got this error message:

    readline<> on unopened filehandle DATA at /<c:\XMLTV\xmltv.exe>Pod/Simple.pm line 454.

    Using this command worked fine:

    xmltv tv_grab_uk_atlas --days 14 --output tvguide.xml

    So, I did that then moved the tvguide.xml myself into the Argus TV xmltv folder. And I could add a move command to the end of the bach file if I were to automate it. However.. I am really disappointed with the quality of the data from Atlas, in regard to there seemingly is no repeat flags, and the season / episode numbers is sketchy to non-existent. So now I am really hoping that RT XMLTV does not go!

    I may explore some other options whilst I have a test system going, but what is your experience of repeat flags and season / episode info from Atlas?

    lisa
     

    karl10247

    Portal Pro
    November 8, 2011
    135
    18
    48
    @lisag thanks for the tag and the good work experimenting with this (I know just how time consuming it can be)

    Lets hope RT doesn't go otherwise we can kiss goodbye to the "Check episode of already recorded programs to prevent duplicate recording of repeated broadcasts" feature
     

    hucknallred

    Portal Pro
    February 21, 2012
    75
    8
    54
    Country flag
    Hi, I have just been experimenting with this on a test machine using just one spare USB DVB-T tuner.

    Thanks so much for your instructions, I don't think I would have got anywhere without them!


    xmltv tv_grab_uk_atlas --days 14 --output C:\ProgramData\ARGUS TV\XMLTV\tvguide.xml

    I got this error message:

    readline<> on unopened filehandle DATA at /<c:\XMLTV\xmltv.exe>Pod/Simple.pm line 454.

    Using this command worked fine:

    xmltv tv_grab_uk_atlas --days 14 --output tvguide.xml
    I don't think I actually used the full path myself in reality. I'll edit the OP
    However.. I am really disappointed with the quality of the data from Atlas, in regard to there seemingly is no repeat flags, and the season / episode numbers is sketchy to non-existent. So now I am really hoping that RT XMLTV does not go!

    I may explore some other options whilst I have a test system going, but what is your experience of repeat flags and season / episode info from Atlas?

    lisa
    Still early days for me, but the Atlas people seem to be very supportive of the xmltv community, may be worth asking them?
    I'll have a look myself later. I'm currently having database issues with Argus 2.3, I get an error in the Scheduler console channels view documented here http://www.argus-tv.com/forum/viewtopic.php?f=52&t=5636
    I completely wiped the database, rescanned & merged all my services which fixed it. Now the error is back after all this Atlas fettling has thrown in a load of new guide channels. It's certainly not as robust as it was & support seems to have dropped off for it, the creator seldom posts on there now.
     

    lisag

    Retired Team Member
  • Premium Supporter
  • March 3, 2012
    457
    43
    Essex
    Country flag
    I just had that too whilst messing around on this test system!

    I managed to clear it by deleting all the guide channels in the TV Scheduler Console.

    I also remember when I first installed Argus, I got confused about extra channels appearing in my line up, which hadn't been found during a tuner scan. Apparently it is 'known behaviour'. They appear from guide data, but should be removable, or hideable, I think.

    It is a shame that the support / activity over on the Argus forums is so thin on the ground, but I really love the software with the notifier and scheduler consoles which I use on multiple devices in the house...
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    1,734
    113
    Southampton
    Country flag
    I had one error though, when using this command:
    xmltv tv_grab_uk_atlas --days 14 --output C:\ProgramData\ARGUS TV\XMLTV\tvguide.xml
    I have never used XMLTV, but I notice that the filespec has a blank in it, between "ARGUS" and "TV". The usual convention is to enclose filespecs in quotes if they contain blanks, e.g. "file spec"; this allows the program to parse the parameters correctly. Note that this is only a convention; it is up to the author of XMLTV to decide how he wants to parse the parameters.

    -- from CyberSimian in the UK
     

    hucknallred

    Portal Pro
    February 21, 2012
    75
    8
    54
    Country flag
    I just had that too whilst messing around on this test system!

    I managed to clear it by deleting all the guide channels in the TV Scheduler Console.

    I also remember when I first installed Argus, I got confused about extra channels appearing in my line up, which hadn't been found during a tuner scan. Apparently it is 'known behaviour'. They appear from guide data, but should be removable, or hideable, I think.
    What happens is it creates new channels when you import XML guide data if there is no exact match on a service name - I think.
    I doing an experiment now, have deleted all my channels, but have kept the scanned services. I'm now fetching a fresh set of listings with just my channels that should match my services & I'll link them one at a time.
    This is instead of doing "create channel in" in the recorder console.
    I suspect this will break a few scheduled recordings that I'll need to fix manually.

    I knew I should have taken a backup before I started messing.. As I'll go back to RT if the data is not as good..
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom