Wednesday, 17 April 2019

Easy way to get EPG into Tvheadend Server

One of the headaches of TVheadend is providing an easy method of keeping the EPG updated, I maintain a large tvheadend server for a large secondary school giving them the ability to record and play live terrestrial tv into classrooms.

This "how-to" is noddy or noob format it assumes you know nothing about anything. 

I used to use the built in epg but found xmltv.co.uk to provide excellent epg data without subscription and is free to use here in the UK.

First off disable all other methods of EPG grabber modules in tvheadend, and enable External XMLTV grabber, make sure you install xmltv package on your tvheadend server and that .xmltv directory appears in tvheadend directory



ls -al /home/hts/.xmltv 

and that the unix socket works and is available

ls /home/hts/.hts/tvheadend/epggrab/xmltv.sock
/home/hts/.hts/tvheadend/epggrab/xmltv.sock  (good it exists!!!)

there are many how-to's available on installing the xmltv package and are beyond the scope of this "how to", in most cases just installing the xmltv package will be enough

ie/ apt-get install xmltv 

should suffice 


then simply create this bash script shown below (I've called it get-epg.sh) and edit it to get the appropriate xml file you require, the type of xml file is in the hashed comments/description
I selected 6715 which is 3 days and all data, simply change it to what you require by changing the number on the end of the wget statement

ie/ nano get-epg.sh



#!/bin/bash
# Feeds available
# Select which one you require and attach it to
# end of wget command
#6721   All 24 Hour All data
#6145   All 24 Hour Entertainment
#6128   All 24 Hour Movies All data
#6187   All 24 Hour Sports All data
#6729   All 48 Hour All data
#6715   All 72 Hour All data
#6793   Limited 5 Days Limited data
#1897   Limited 7 Days  Limited data
clear
echo Removing old xmltv file
rm -rf /home/hts/xmltv.xml
echo Get new xmltv file
wget --output-document /home/hts/xmltv.xml http://www.xmltv.co.uk/feed/1897
echo Touch new file with date downloaded
touch /home/hts/xmltv.xml
echo Copy new file to locations
cp /home/hts/xmltv.xml /home/hts/.xmltv/xmltv.xml
echo Update Completed

you may have to chown (change ownership) the new script to the hts user in my case

chown hts:video get-epg.sh

then su to the hts user (become the hts user) by entering

su hts

then create a new cron job

crontab -e

then copy/paste the line below, it will execute it at 6am every day and in my case get 3 days worth of
epg at a time

0 6 * * *  hts /home/hts/get-epg.sh

followed by Ctrl o (that's o for orange if using nano) to write out the new crontab 


it's pretty self explanatory, remove old file get the new xml file and rename it on save as xmltv.xml and put it in the /home/hts directory, touch it to change the date downloaded (more of a belts and braces touch to make sure the date is updated so you can easily check if the file is current) 

Then copy it to the .xmltv directory, you could of course just copy it to the xmltv directory directly or create a symlink either would work, but it's such a small file 30MB tops that it takes less than a second to copy it. 

it's a very simple bash script and no doubt it can be improved upon, but I like simple you can easily follow it.

voila a simple and automated way to get UK EPG data into your tvheadend server, restart your tvheadend server and you should see your EPG data populate and have 3 days worth.

There is no point in getting the epg data more than once every 24 hours because it's not updated any sooner than once every 24 hours in each day.

xmltv.co.uk sometimes change the feed names so you need to check those first and amend the script accordingly, I've also noticed sometimes the website goes offline with no explanation


so make sure you can actually browse the website before debugging the script

Latest xmltv feeds


Tuesday, 5 March 2019

This appeared on the Bruges Group website and was quickly removed for unknown reasons so I have hosted it here, I make no claims as to it's truthfulness or accuracy.

John Petley

There is no doubt about the veracity of this account since documents have been seen.
On Monday July 9th 2018, several leading French, German and Dutch senior managers were called by EU officials to an urgent meeting.
The meeting was said to be private and those present were informed that Prime Minister May and Chancellor Merkel had reached an Agreement over Brexit. Knowledge of this was attained from the actual transcript of the meeting between May and Merkel.
1) The Agreement was couched in a way to 'appease' the Brexit voters.
2) The Agreement would enable May to get rid of those people in her party who were against progress and unity in the EU.
3) Both Merkel and May agreed that the likely course of events would be that UK would re-join the EU in full at some time after the next general election.
4) May agreed to keep as many EU laws and institutions as she could despite the current groundswell of 'anti-EU hysteria' in Britain (May's own words, apparently.)
5) Merkel and May agreed that the only realistic future for the UK was within the EU.
The original Agreement draft was completed in May 2018 in Berlin and then sent to the UK Government Cabinet Office marked 'Secret'.
NB This Agreement draft was authored in the German Chancellor's private office.
The Cabinet returned the Agreement draft with suggestions, and there was some to-ing and fro-ing during June 5th 2018.
Private calls between the Prime Minister and Chancellor were made.
The Agreement's final draft came out late in June 2018. The German Chancellor told Prime Minister May that this was a deal she would support, though there would need to be some more small concessions by the UK to keep the EU happy.
The Chancellor and Prime Minister met in Germany. Merkel had this meeting recorded as a 'private meeting' though the Prime Minister was probably unaware of that.
The Chancellor had the transcript of that meeting circulated secretly to EU and key German embassies.
Conclusions
Documents make it quite clear that Prime Minister May was negotiating with Germany, not the EU.
The transcript also makes it clear that the Prime Minister intended to keep all this secret from minsters, especially the Brexit group.
She wants to keep as many EU institutions in UK as intact as possible in order to facilitate an easy return to the EU after 2020.
Chancellor Merkel briefed May on tactics to force Cabinet approval.
The Prime Minister and senior civil servants were working with Germany to stop Brexit or water it down to prevent free trade and the ending of freedom of movement, but to keep cash flowing to the EU.
David Davis was kept in the dark while key EU premiers in France, Holland and Ireland were briefed in full.
Key EU heads were actually briefed in full the day before the Cabinet meeting at Chequers. 

Friday, 11 November 2016

The end of the World is nigh...AGAIN



Now let me make it clear I'm no fan of Donald Trump, I think he is probably one of the most repulsive individuals currently in the public domain, I do however understand how he has risen to become the president elect of the United States.

I stayed up on the night of the US election and watched it until 4am after which I knew he'd be elected. What astounded me by the BBC was their initial "Hillary has it in the bag" attitude and even when it was becoming obvious she didnt' "have it in the bag" they still carried on pushing the "oh well Hillary will surge any minute now". 

A blind and deaf man at that point could plainly see Mr Trump "had it in the bag". This is the problem with liberal media they simply cannot understand how anyone else could possible have a different world view, and if they do its because they are stupid, under-educated, ill-informed, racist, or worse.

Take the demonstrations around America against Trump, these liberal disgruntled voters most of which I notice are millenials....are simply not accepting democracy, they are railing against the very thing they purport to hold dear, you cannot say you believe in democracy and then in the same breath protest against it, you are NOT being democratic, like it or not (and I don't) Donald Trump is going to be the next President of the United States, I do however accept it as democracy in action.

There are huge similarities between what has happened in Brexit here in the UK and the US elections, London for instance has been in a massive liberal bubble for years, they have conditioned everyone who lives there (almost) that the EU was the best thing since sliced Hovis. The same can be said of Westminster and those gaggle of overpaid politicians who blindly thought they'd walk away with a referendum victory to remain in the EU, so much so they didn't even have a plan if it should fall the other way, their staggering smugness is beyond written words to be honest. 

They paid the price for being completely out of touch with the "common" people who saw from day to day, week to week, year to year, billions being wasted on the dying EU project with very little advantage to themselves, just more laws, more control more political union and more of Europe rammed down their throats. 

They say the older voters won the referendum, they very probably did because they can remember what the UK was like prior to the EU micromanaging our lives, and do you know what prior to the EU we were doing ok and life was good. 

They also say the older voters have stolen the youth of todays future, well I don't see it that way, I see it as saving them from another 40 years of entrapment and slavery, which can only get worse if the truth be known what with the EU's plans for centralised taxation and an EU army and god knows what else. 

Yes I voted for Brexit and to be honest it cannot happen soon enough for me if only to shut up the liberal leftards who are crying into their fair trade breakfasts whilst waiting to finish charging their hideously expensive virtue signaling electric car.

Trump is normality resurfacing after being pushed down by political correctness for decades, Trump is the status quo, love him or loathe him, he represents change to our political systems just as Brexit does, Theresa May doesn't like Brexit one bit, but she is one of the few people who understands that the old way of doing things has gone. 

The likes of Tim Farron and Nick Clegg and their ilk are a dying breed you can see that simply by counting the MP's they have in the liberal party (eight at last count). It wouldn't surprise me if the liberals are all but wiped out next election along with a decimated Labour party. Yes Corbyn is popular within the party but considering the Labour voters who voted to leave the EU it wouldn't surprise me if Labour tanked in the next election, especially with Corbyn's special blend of lunacy.

Nicola Sturgeon is a different kettle of fish, her ONLY interest is to gain freedom from the United Kingdom no matter what the cost to the people of Scotland..... so much so her "independence" from the UK will be quickly (if she had it her way) replaced by bowing down to an even bigger union of the European kind. 

Which puzzles me, why would you walk away from a union where nearly 4/5th of your business is with..... to get into bed with a Union where only 1/5th is ? Has she done the maths ? 

She says she wants to protect Scotlands interests, she'd be doing that by STAYING in the United Kingdom not trying to leave it. I suspect she has some kind of mental illness.

They (the SNP) also seem to think they will keep Sterling if they leave....nope won't happen, they will lose their central bank the bank of England, and the treasury,  They will have to pay back their debt currently running at 16 billion, they will lose all of the access to our security forces such as MI5 and GCHQ, all British Army barracks will move out of Scotland, they will lose Faslane nuclear submarine base, the list is big....

There will also be a hard border with passport and immigration checks between Scotland and the rest of the UK

All of this will have to be paid for and rebuilt by Scotland standing on their own, where all funding will be cut by the UK government and the EU....They also want to rejoin the EU....where one of the first things the EU will insist upon is the Euro currency....Tax in Scotland will rise like a rocket.

She really hasn't thought this through at all....They (The SNP) can't even manage their own economy as it is now, I would love to see them try with all of that on top of them as well.

No this is all about her wanting to leave the UK at ANY cost that's all, and the only hand she has is the independance trump card (excuse the pun ...oh the irony)...Scotland would be economically destroyed if they left the UK and joined the EU they would sink into depths of poverty not seen in decades, by that time the SNP will be voted out, but the people of Scotland will have been betrayed by Scottish national lunatics.

We are living in exciting and worrying times, I'm hoping it's purely a massive reset sweeping out all of the liberal ideology that has systematically destroyed our way of life for decades. It's not going backwards as some liberals love to say, its returning to the only sane way of living, where people can have differences and different ways of thinking yet still get on without being labelled as racist or misogynistic or thick or uneducated, if they have a different world view, we all have a different world view, tolerating those different world views is much more important than trying to silence them or destroy them.