MozillaZine

[EXT] XMLTV Guide and Search

Announce and Discuss the Latest Theme and Extension Releases.
Benjamin Markson

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

Post Posted May 30th, 2016, 2:43 am

Import, View, and Search, XMLTV formatted file(s).

This add-on replaces both my UK TV Guide and Search and UK TV, and Radio, Guide and Search add-ons. The former's data feed is due to cease on the 16th June 2016, and the later... well, you won't be able to afford its data feed.

It is available here: XMLTV Guide and Search

_____________________________

To use this add-on you will need to be able to provide your own XMLTV formatted file(s). The add-on was developed and tested with data fetched using mc2xml - specifically, this was using the Service: microsoft legacy, the County code: GB, and a valid UK postcode, for a Freeview lineup, and also using the Service: schedules direct json, Country code: GB, and a valid UK postcode area, for a Freeview lineup.

Not all data sources support all of the possible features included in the add-on, in which case some information may not be shown - for example, Series and Episode numbers are not a part of the microsoft legacy Service.

On first use the add-on will invite you to set up an XMLTV Data Source. This simply means you need to point to an XMLTV file on your computer. You can, optionally, also specify the application to run that produces that file so that it can be coveniently launched from within the add-on on demand.

Once you have at least one XMLTV Data Source set up you can then run an Import which will populate the Channel list on the left. As you tick channels from the list the Guide view will be updated.

If you only want to use a single XMLTV Data Source, that's it. The Execute button on the bottom right can be used to fire up the application that produces the XMLTV file, and the Import button can be used to Import it. You can use these as often as required.

If you want to have more than one XMLTV Data Source, for example to include more than one lineup, you can use the Execute and Import buttons for the different sources using the Sources tab. The buttons on the bottom right can also be linked to any of the Data Sources using the Source drop-down menu above the Channels List - picking the 'All' Source will display all of the channels from all of the sources in the Channel list but this will disable the buttons on the bottom right.

_____________________________

Once you have your chosen channels selected you can navigate the Guide and play with the Search.

On the Guide tab the Now button will navigate to the current date and time whereas the Refresh button will navigate to whatever date and time you enter. You can assign colours to the different genres from the Colours drop-down, and highlight the current search using the Highlight Search check-box.

On the Search tab there are 5 filters: Channels, Dates, Genres, Attributes, and Title. Assigning something to one or more of these will create a filter that is applied when the Search button is clicked. If a filter is not assigned it will not apply any filter for that category.

Be careful with the 'Omit' options on the drop-downs. If, for example, you tick 'Omit Channels' then any channels that you tick will be Omitted, if you untick 'Omit Channels' then any channels you tick will be Included. In this way you can use your ticks to either include or omit items - whichever means less clicking. There are tool-tips on all of the 'Omit' options to remind you how they work.

There is a 'context menu' - one of those right-click menus - on the Channel list that allows a number of operations. You can Alias the channel names, for example you might like to see simply 'ITV1' in the list instead of 'ITV1 Thames Valley North'. You can also Add, Rename, and Delete channel groups so, for example, you might like to create separate groups for Freeview channels and Sky channels, or Sports channels and News channels.

Also, look out for the context menus on the Guide, Search, and Favourites panes. Wherever you can see a programme there are options to add and delete your Favourites ♥.

Otherwise, just click stuff. That's what I do. And look out for the tomatoes.

Have fun. :D

[Disclaimer: Use of this add-on does not guarantee that you will find anything worth watching on TV.]

_____________________________

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 the entry for your preferred 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
Go to the Guide tab and 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.

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.

There other ways to produce xmltv.xml files, and the add-on can support multiple data sources for different Services and Lineups. Although I can offer no warranty, in theory, they can all be imported into the add-on.

Sorry, that this is such a humongous wall of text!
Ben.

colin1951uk
 
Posts: 63
Joined: November 17th, 2014, 4:52 am

Post Posted May 31st, 2016, 11:59 am

Ben, I'm starting to have trouble with this now and I don't know why.

When I try to import data the Channels appear OK and then instead of the schedules loading a pop-up appears saying:-

"Warning: Unresponsive script. A script on this page may be busy or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete."

There are three click boxes: "Stop Script," "Continue" and "Debug."

If I try "Continue" Firefox just freezes up and I have to close it down via the Task Manager.

When I re-run FF and try again the same thing happens and should I choose "Debug" I can't see anything wrong in the consul and FF just freezes up again and needs another restart.

I've tried deleting my database and starting from afresh but it still happens.

This never happened before and I'm wondering what could be causing it.

I thought my system may have caught a crab but I've looked in the Event Viewer logs and there's nothing obvious in there other than noticing "Firefox has stopped interacting with Windows" which doesn't make sense as its working now after a restart.

This is only happening when I use XMLTV (when it didn't previously)...any idea why?

I'm using Windows 7 64bit but that shouldn't make any difference should it?

Yoss1960

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

Post Posted May 31st, 2016, 1:32 pm

I'm not having that problem here. Mind you, I run Pale Moon which, although forked from FF, is diverging rapidly, so that this may not be a fair comparison.

Does the problem still occur if you have only the XMLTV add-on installed?
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

Benjamin Markson

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

Post Posted May 31st, 2016, 1:48 pm

colin1951uk wrote:"Warning: Unresponsive script. A script on this page may be busy or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete."

The message is a Firfox message. It occurs when some javascript is taking too long to complete - the most obvious cause being an infinite loop in the code.

I've not encountered any problem like this but I suspect you may be routinely importing a lot more channels than I am. Incidently, I did a test importing every single channel - that is a hell of a lot of data. It imported fine, but I did notice it uses a huge (a couple of gig for me) amount of memory during the actual import.

Looking at the various loops in the import - and there are several - I can't really see any candidates that would get stuck in an infinite loop.

Pressing the Debug button certainly won't hurt and should tell us something useful. If you press the Debug button Firefox should open the Debugger panel. I'd be interested to know what appears in the tab box highlighted in blue... it will be something like: pub.grabData.grabber.js:xxx (where xxx is a line number). This will point me at the line of code that is 'unresponsive'.

Closing the Debugger will return you back to the add-on, where it will continue until it again says it's unresponsive. Stop Script will put it out of its misery. There should normally be no need to close Firefox in the Task Manager unless you are, for example running out of physical memory.

Ben.

colin1951uk
 
Posts: 63
Joined: November 17th, 2014, 4:52 am

Post Posted May 31st, 2016, 3:35 pm

Benjamin Markson wrote:It imported fine, but I did notice it uses a huge (a couple of gig for me) amount of memory during the actual import.


I wonder if that's got something to do with it. I've got 4gb and I've just looked at the ram used when the importing stops and I've used 3.55gb so not much left.

Benjamin Markson wrote:If you press the Debug button Firefox should open the Debugger panel. I'd be interested to know what appears in the tab box highlighted in blue... it will be something like: pub.grabData.grabber.js:xxx (where xxx is a line number).


It says: handler grabber.js:453

Line 453 relates to: var temp = genres[j].childNodes[0].nodeValue; (I think not much help??)

There looks to be 1283 lines all told so it's aborting at about half way through according to that.

I just tried a smaller file and that's gone in so it does look like the file size is the problem (and maybe the amount of ram I have which is plenty for what I normally use the machine for but maybe not quite enough to import large amounts of data into your add-on.)

I'll try some other files tomorrow and see if they work ok.

Benjamin Markson

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

Post Posted June 1st, 2016, 12:39 am

colin1951uk wrote:It says: handler grabber.js:453

Line 453 relates to: var temp = genres[j].childNodes[0].nodeValue; (I think not much help??)

There looks to be 1283 lines all told so it's aborting at about half way through according to that.

Javascript is event driven, so, different events can be handled anywhere in the code, the size of the line number doesn't mean anything. Line 453 is in the Schedule import part of the code (actually in the 'handler' for the xmltv.xml its just fetched from your hard drive). At line 453 it's simply looping through the Category (genre) tags for whatever schedule it happens to be on - so, nothing 'infinite' should be happening there. I even suspect that on different occasions it may point to a different line number within the same 'handler'.

And, to confuse things even more, the 'handler' runs asynchronously (so it doesn't freeze the add-on during the import), which means that other things can happen at the same time - you should be able to switch tabs within the add-on while the import is running, for example.

Therefore I'm wondering if it's simply that your computer is lagging so badly (because of the memory squeeze) that Firefox is running so slow that it's detecting it as being 'unresponsive' as a result.

Of course the 4gig is only part of the equation - processor speed, disk speed (if it starts 'swapping'), how much other stuff you have running, and so on.

I would definitely suggest using an mc2xml.chl file to either include the channels you want, or exclude channels you don't. If you look at the mc2xml documentation this file is pretty versatile... it allows you to include/exclude ranges of channels, for example.

The feed really is full of a lot of dross, so this would speed up the fetching of the xmltv.xml file as well.

Ben.

Yoss1960

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

Post Posted June 1st, 2016, 3:58 am

Colin; I agree with Ben WRT a channel file when grabbing SD's feed. Without trimming out unnecessary stuff, it can be a huge download. I don't worry about it as much with Microsoft's feed, as that's far lighter in content anyway.

Here's what I use:
Code: Select all
# Include Channels - all the shopping channels are skipped
1-6
9-15
17-21
24-34
37-48
55-73
84
120-135
# 'Specialist Interest' channels - include these, or not, as you prefer
# 170-210
# Red Button
600-603
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

colin1951uk
 
Posts: 63
Joined: November 17th, 2014, 4:52 am

Post Posted June 1st, 2016, 12:50 pm

Ok folks, I've configured a channel file and now I've now got 57 channels instead of 200+ and it loads in a doddle =D>

So I'm back in business and tah for the help.

Oh..I do miss the little wheel that went round and round when loading stuff that was in the original beta type release :cry: I want my little wheel back :lol:

Now I'm off to do a Freeview re-tune #-o

Yoss1960

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

Post Posted June 1st, 2016, 1:31 pm

Colin; Good to hear you're up and running again.
Regards,
¥ø$$1960
"The blindingly obvious is never immediately apparent"

Benjamin Markson

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

Post Posted June 1st, 2016, 2:11 pm

colin1951uk wrote:Ok folks, I've configured a channel file and now I've now got 57 channels instead of 200+ and it loads in a doddle =D>

That's good to know.

colin1951uk wrote:Oh..I do miss the little wheel that went round and round when loading stuff that was in the original beta type release :cry: I want my little wheel back :lol:

Um, the wheel is still there. The current v1.0.6 release - it was supposed to be v1.0.0 but I forgot to remove the 6 :oops: - has barely any differences to the v0.9.5 one. The wheel does only appear on the Guide view though. They're not on the Channel list any more because, in effect, all the schedules load together.

Ben.

keithy397

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

Post Posted June 7th, 2016, 1:29 am

I'm guessing we've all had the latest email from meta-bullshit?!

Is it ok just to ignore that lot now and just merrily carry on with your (Ben's) latest rendition?
Cheers,
Keith

Benjamin Markson

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

Post Posted June 7th, 2016, 3:40 am

keithy397 wrote:Is it ok just to ignore that lot now and just merrily carry on with your (Ben's) latest rendition?]

If you take a quick look at my AMO listings for UK TV Guide and Search and UK TV, and Radio, Guide and Search you'll see I've prefaced them with an End of Life notice.

I've also released a final, End of Life, version of the older UK TV Guide and Search add-on which opens with a notice warning users that this add-on will stop working soon.

So, from now on - assuming the Metabroadcast goal-posts don't move once again - I will only be supporting this add-on.

Ben.

keithy397

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

Post Posted June 7th, 2016, 4:14 am

Thanks Ben. I will say a fond farewell to your older versions and play merrily with your newest which, may I add, works absolutely fine for me.

Thanks Ben.
Cheers,
Keith

colin1951uk
 
Posts: 63
Joined: November 17th, 2014, 4:52 am

Post Posted June 17th, 2016, 3:58 pm

Ben,

For the Film category have you got tags available indicating if the film will be transmitted in Widescreen or 16:9 format please?

Not all channels provide this information but Film 4 and the big five channels do and I'd like to see it if it's possible.

Cheers.

Benjamin Markson

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

Post Posted June 18th, 2016, 1:12 am

colin1951uk wrote:For the Film category have you got tags available indicating if the film will be transmitted in Widescreen or 16:9 format please?

Not all channels provide this information but Film 4 and the big five channels do and I'd like to see it if it's possible.

I think it is theoretically possible.

According to the XMLTV spec you can get <video> elements, with <present>, <colour>, and <aspect> child elements. Superficially, there appears to be all sorts of possible stuff - <present>no<\present> would indicate a radio channel, for example - having said that, I have never seen a single <video> element present in any of the feed's (including SD) data.

And that's the problem. Even for the elements I am supporting they tend to be somewhat hit and miss, for example, some channels never seem to have <premiere> elements (I'm looking at you C5).

Ben.

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 2 guests