MozillaZine

[EXT] UK TV, and Radio, Guide and Search

Announce and Discuss the Latest Theme and Extension Releases.
Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 27th, 2016, 2:59 pm

Just knocked up a script (quickly) for doing multiple mc2xml calls. It might not be of much use to most people, but it might come in handy for others in the future.

Code: Select all
#!/usr/bin/env bash

# mc2xml is REQUIRED for this script to work
# If you don't have it already, it can be obtained from
# http://mc2xml.hosterbox.net/
# The script requires that the 'first run' of mc2xml that writes the
# settings for each data provider to disk has already been done

####################################################
# Variables - Change these to suit yourself
# The format is fairly self explanatory
SCHEDDIR="/home/brad/Data/xmltv/SchedulesDirect"
MICROSOFT="/home/brad/Data/xmltv/MicroSoft"
####################################################

# The escape codes in the print statements change the text colour to make
# it more easily detected amongst the output from mc2xml

echo -e "\e[91mGetting\e[0m TV Guide \e[91mdata from Microsoft\e[0m"
cd $MICROSOFT
mc2xml

echo -e "\e[91mGetting\e[0m TV Guide \e[91mdata from Schedules Direct\e[0m"
cd $SCHEDDIR
mc2xml

# end of script


Mostly of use to Linux users. Save it as xmltv.sh in /home/username/bin and don't forget to set the 'executable' bit!
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

keithy397

User avatar
 
Posts: 2345
Joined: August 29th, 2004, 6:49 pm
Location: North Wales, UK.

Post Posted May 28th, 2016, 3:14 am

I'm not as good as you chaps with all this coding and general PC stuff, way over my head. Any chance you can give me an idiot install lesson please? I've installed the new extension but got nothing. Guessing I have some work to do?!!
Cheers,
Keith

Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 28th, 2016, 4:16 am

keithy397 wrote:I'm not as good as you chaps with all this coding and general PC stuff, way over my head. Any chance you can give me an idiot install lesson please? I've installed the new extension but got nothing. Guessing I have some work to do?!!

Do you have mc2xml installed? I'm guessing not, based on what you say above.

Start by visiting http://mc2xml.hosterbox.net/, scrolling to the download section, and 'pick your poison'. Based on browser string, you'll be after the Windows version.

Read the web page for use instructions, and run mc2xml. For a first run, you 'll have to decide on which provider you're going to use. Microsoft is the default and requires no registration Other providers will need you to create an account with them and use a proper user ID and password - all details on the mc2xml; web site. mc2xml will also need your country code (gb) and either some or all of your postcode. Don't worry, this is only so it can offer you the correct TV transmitter(s) for your area. Pick an option from those offered, FreeView, Sky, etc (they're numbered) and let mc2xml complete its task.

Once you done that, get the latest version of XMLTVGuide (0.9.5) from https://github.com/Benjamin-Markson/XML ... 9.5-fx.xpi (you may have to click the button marked "RAW".)

Install XMLTVGuide to Firefox, using the option install from file, then restart FF.

Run XMLTVGUide go to the 'Sources' tab, click on add, and fill in the boxes shown with the correct details.

Since you'll have just d/l'd a load of you can just click the "Import" button, and wait for the data to be imported. Once you see the 'Ready' prompt, you can go about selecting your channels, creating aliases and groups, etc.

Hopefully, that'll get you there, or there abouts. I don't think I've left anything out, or got anything wrong, but if I have, I'm sure Ben or Colin will correct me.
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

Benjamin Markson

User avatar
 
Posts: 385
Joined: November 19th, 2011, 3:57 am
Location: en-GB

Post Posted May 28th, 2016, 6:13 am

keithy397 wrote:I'm not as good as you chaps with all this coding and general PC stuff, way over my head. Any chance you can give me an idiot install lesson please? I've installed the new extension but got nothing. Guessing I have some work to do?!!

I'm also going to have a bash at answering as I will probably include some instructions when I publish the add-on to AMO proper, and set up its own support thread here. I hope to do that sooner rather than later as I think its about ready.

Instructions for obtaining an xmltv.xml file needed to import into the XMLTVGuide add-on.

Go to mc2xml and download mc2xml.exe using one of the links given under the Downloads section.

Put mc2xml.exe into its own folder somewhere on your computer

Optionally, in the same folder, create a file called mc2xml.chl - for speed, this file can limit the list of channels you grab, although, you may prefer to use this option later. For example:
Code: Select all
# includes
1
2
3
4
5
15
70
72
704

Optionally, in the same folder, create a file called mc2xml.ren - this file can contain a list of channels you want to rename during the grab, again, you may prefer to use this option later, or not at all if the channel numbers appear to be correct and up to date. For example:
Code: Select all
# Renumber
70:120
72:122

Not optional...
    · Manually run mc2xml.exe - initially, just pick the Service: microsoft legacy, the Country code: GB, and for Postcode: enter a valid UK postcode within your transmitter area. Press OK.
    · From the 'lineup selection' list pick your preferred entry for your Provider and Local Region. Press OK.
...wait for the download to complete.

Two new files should appear in the mc2xml.exe folder: mc2xml.dat and xmltv.xml. The .dat file carries the choices you made, plus some timing information - this file will get used whenever you run mc2xml.exe from now on. The .xml file carries the TV schedule data - this is the one we will need to import into the add-on.

From within the XMLTVGuide add-on go to the Sources tab and Add a new source.
    · Enter a 'friendly' description.
    · Click the folder icon for the Executable location and navigate to wherever you have mc2xml.exe
    · Click the folder icon for the Import File location and navigate to wherever you have xmltv.xml
    · Click Add
Click the Import button on the bottom right and watch while the xmltv.xml data is imported, very soon the Channel list should be populated.

Go to the Guide tab and then select your chosen channels from the Channel list, with each selection the guide should populate.

In the future you can click the Execute button on the bottom right to re-run the data grab, and after it has finished, the Import button to refresh the add-on's schedule data.

Simples. :mrgreen:

As mentioned by Yoss, there are many more ways to skin the xmltv.xml cat, and the add-on can support multiple data sources for different Services and Lineups. For this you really need to read the mc2xml.exe documentation. Some of us are also using the Schedules Direct JSON services which has more features (for example, Series and Episode numbers) included in its xmltv.xml file than the one from Microsoft.

There are many other ways to produce xmltv.xml files, and although I can offer no warranty, in theory, they can all be imported into the add-on. I have only tested Microsoft, and Schedules Direct, as produced using mc2xml.exe - you are welcome to experiment!

Ben.
XUL is dead. Long live the Google Chrome Clones.

Vitesse
 
Posts: 1238
Joined: April 21st, 2011, 6:03 pm

Post Posted May 28th, 2016, 6:51 am

There are some omissions from the Microsoft Legacy Sky lineup - which in the main are probably because it is indeed 'legacy'. Newer channels like BT Sport, Spike, 4seven, Talking Pictures and ITVBe aren't listed. Nor are (to name but two) ESPN or BBC Alba - probably because they've changed channel number: if you open the 'alias' dialogue, the first three numbers of the identifier show the Sky channel number. Can't find PBS America either.

So I suspect it will become increasingly inaccurate.

keithy397

User avatar
 
Posts: 2345
Joined: August 29th, 2004, 6:49 pm
Location: North Wales, UK.

Post Posted May 28th, 2016, 8:41 am

Thanks Ben and Yoss. That wasn't too painful at all!! I only got slightly disorientated when you say 'Go to the Sources Tab', I immediately looked at the Source Tab - Top Left, as opposed to the Sources Tab on the main page. #-o

So, I think I have what I need for now, time to play :-)

Oh! How many days in advance does the data grab acquire?
Cheers,
Keith

Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 28th, 2016, 9:10 am

keithy397 wrote:Oh! How many days in advance does the data grab acquire?

Ah, well, that depends......

Schedules Direct (hereafter SD) seem to only update their feed once a week (on a Friday), so you'll get anything from one to two weeks worth from them, depending on when you do your data pull. I'm basing this on only having seen one update (yesterday) after polling them daily for six days. Not sure about Microsoft's feed, but yesterday's pull has data to the 10th June. I didn't bother checking on the previous pull.

Keep in mind that all but Microsoft need some form of registration to use their feeds. Further, some (SD among them) also want paying. SD only charge $25 a year, and it doesn't (a good thing, IMO) auto-renew, but they do send out a reminder close to the time.

I should also mention I've not tried any of the other feed options (e.g. Rovi), apart from Metabroadcast. If you've been keeping an eye on this forum, you'll know that they've become a bit of a PITA regarding the use of their feed. It seems they want £95 per month + VAT. Blow that for a game of darts....
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

keithy397

User avatar
 
Posts: 2345
Joined: August 29th, 2004, 6:49 pm
Location: North Wales, UK.

Post Posted May 28th, 2016, 9:20 am

I can live with the variable data. All in all I'm very happy with all you chaps have put together and I thank you all.
Cheers,
Keith

Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 29th, 2016, 3:40 am

keithy397 wrote:I can live with the variable data. All in all I'm very happy with all you chaps have put together and I thank you all.

Ben did all the hard work - all I did was pick holes in it. :D
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

keithy397

User avatar
 
Posts: 2345
Joined: August 29th, 2004, 6:49 pm
Location: North Wales, UK.

Post Posted May 29th, 2016, 5:16 am

Dunno how Ben finds all the time but I'm glad he does! :)
Cheers,
Keith

Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 29th, 2016, 5:33 am

keithy397 wrote:Dunno how Ben finds all the time but I'm glad he does! :)

"Hear, hear" to that.
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

Yoss1960

User avatar
 
Posts: 114
Joined: January 6th, 2013, 11:23 am

Post Posted May 29th, 2016, 7:58 am

I've finally done it. Well, two things, actually.

First, I've paid SD for a year's subscription to their service. As much as I hate paying for anything. ;)
Second, I've binned UKTVGuide completely - I'm using XMLTVGuide exclusively.

Once again, many thanks to Ben for producing such a great add-on.
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

Benjamin Markson

User avatar
 
Posts: 385
Joined: November 19th, 2011, 3:57 am
Location: en-GB

Post Posted May 30th, 2016, 12:58 am

Yoss1960 wrote:I've paid SD for a year's subscription to their service.

Likewise. For the record, in 'real' money, it cost me £17.63, and I was able to make the payment via Paypal but without having a Paypal account.

Ben.
XUL is dead. Long live the Google Chrome Clones.

keithy397

User avatar
 
Posts: 2345
Joined: August 29th, 2004, 6:49 pm
Location: North Wales, UK.

Post Posted May 30th, 2016, 1:11 am

What do you get for your money for SD?
Cheers,
Keith

Benjamin Markson

User avatar
 
Posts: 385
Joined: November 19th, 2011, 3:57 am
Location: en-GB

Post Posted May 30th, 2016, 3:01 am

I have now published the XMLTVGuide add-on to AMO proper: XMLTV Guide and Search. It won't have been reviewed at the time of typing but it now has its own support thread here: [EXT] XMLTV Guide and Search.

The published version is very nearly identical to v0.9.5 but it is not the same add-on. It will use your existing SQLite database with no problem but it will appear as a wholly new add-on - so, in due course you can uninstall the v0.9.5 version.

This is due to the technical consideration that I was releasing the versions up until now under a dev UID so as not to block the final UID - XMLTVGuide.dev@mozilla.org vs XMLTVGuide@mozilla.org in the install.rdf for those who want to know. :-k

Any further discussion should really move over to the new thread but finally for Keithy...
keithy397 wrote:What do you get for your money for SD?

The SD feed incudes more features. Notably Episode and Series numbers (which I'm also using to identify New Series), but also film Certificates and, I believe, more channels.

Now I'm going to lay down and wait for the sun to come out again.
Ben.
XUL is dead. Long live the Google Chrome Clones.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests