Jump to content

Live TV XMLtv enhancer - Artwork


diegov
 Share

Recommended Posts

diegov

Hey community,

 

I've started working on a XMLtv enhancer to inject artwork to XMLtv feeds that do not have them. If your bored with the pascal colored squares this may be something of use.

 

At this stage the application simply takes an xmltv file looks at the programmes, creates directories for each of the programs, create a thumb/poster.jpg placeholder and then updates the XMLtv file accordingly with the location of the artwork and provides an enhanced.xml file that you configure Emby to use. The initial idea is you would download the artwork of your choice and replace the placeholder. In future i would look at integrating with themoviedb / thetvdb, etc however in the short term it suits the bill for me..

 

If anyone is interested, i can post the package on github. Its written in c# (mono) compiled for Linux at this stage (as i use a readynas), but can be compiled for other platforms...

 

Let me know your thoughts!

 

 

5b10fcdf1d9c2_xml3Capture.png

 

5b10fcc5cba29_xml4capture.png

 

5b10fcfe073ab_xmlCapture.png5b10fd29a54cd_xmlCapture2.png

  • Like 8
Link to comment
Share on other sites

aspdend

This sounds interesting - I get limited images downloaded to my xmltv - using schedules direct and it is really irritating - juts haven't figured out what to do about it - but this could be a good solution. I run my server on a windows 10 pc - if you recompile it for windows, I can test it out for you...

Link to comment
Share on other sites

diegov

This sounds interesting - I get limited images downloaded to my xmltv - using schedules direct and it is really irritating - juts haven't figured out what to do about it - but this could be a good solution. I run my server on a windows 10 pc - if you recompile it for windows, I can test it out for you...

Sure.. let me polish it up a little, then ill stick it on github.

Link to comment
Share on other sites

diegov

ok.. quick update. I have TVDB integration primarily for TV series working which is a little hit and miss, however should help reduce the number of manual artwork downloads you will need to make. I'll post the app in a few days for both windows and linux .

  • Like 2
Link to comment
Share on other sites

aspdend

ok.. quick update. I have TVDB integration primarily for TV series working which is a little hit and miss, however should help reduce the number of manual artwork downloads you will need to make. I'll post the app in a few days for both windows and linux .

Sounds good to me!

Link to comment
Share on other sites

diegov

Here you go. I have not tested on win64.

 

******USE AT YOUR OWN RISK AND BACKUP YOUR XMLTV FILE*****

 

linux64 package: https://github.com/diegoviso/xmltvenhancer/blob/master/linux-64/publish-linux-x64.rar

 

win64 package: https://github.com/diegoviso/xmltvenhancer/blob/master/win-64/publish-win-x64.rar

 

Please read the instructions below. If you have any question I will do my best to answer them.

 

Overview:

 

xmltvenhancer is an application used to enhance your XMLTV based EPG by adding artwork and other metadata. The application is available as both a linux and windows package (not tested). It is designed to run as a scheduled task via task scheduler or cron. As of version 1, XMLTV enhancer will only add artwork, however over time will introduce additional metadata to enhance your EPG viewing experience.

 

It requires a local xmltv file or a xmltv raw url link to process. It will process the xmltv file and add a directory for each distinct programme under the directory artwork. It will then add an additional icon src element for each programme in addition to a jpg stub file which can be replaced manually by you or via the TVDB service. All your artwork is stored locally.

 

Once xmltvenhancer processes your file it will create a file named (yourepgfile)-enhanced.xml which you then use as your xmltv.xml source within Emby.

 

Installation:

 

Simple, create an xmltvenhancer directory and unzip the contents of the package into this directory. For linux installs ensure your have chmod accordingly

 

Notes:

  1. If you are using your own xml file place it in the xmltv directory. The application will automatically assume your xmltv file sits in this directory. It will not look in the root directory of the application. There is no need to specify this directory on the command line.

  2. If you are using a URL, you must specify a local file name which the application will later append the -enhanced suffix to. Also not .gz files are not supported, only urls which server a raw xml feed.

  3. To use the TVDB service you must register for a tvdb api key. You must place this api key in the xmltvenhanced.ini file. Once you have met these prerequisites, you enable tvdb poster lookup by adding the -enabletvdb switch

  4. It is recommended you run -enabletvdb once as it will take time to scrape from the tvdb website, and then generally run xmltvenhancer without the -enabletvdb switch, to simply update the EPG metadata for emby consumption

  5. In the event that artwork cannot be found or is incorrect, you can manually add your own artwork by replacing the jpg in the corresponding artwork directory. Artwork that is added by either tvdb or you will not be replaced by the application

  6. Currently the tvdb algorithm will only match currently running series, this is to reduce false positives.

Usage Examples:

 

xmlenhancer xmltv.xml (processes a local xmltv.xml file located in the xmltv directory)

xmlenhancer http://url/file.xml au-epg.xml (download the xmltv data from a url and saves it to au-epg.xml)

xmlenhancer http://url/file.xml au-epg.xml -enabletvdb (as above with the addition of enabling artwork processing via TVDB)

Edited by diegov
  • Like 1
Link to comment
Share on other sites

aspdend

Here you go. I have not tested on win64.

 

******USE AT YOUR OWN RISK AND BACKUP YOUR XMLTV FILE*****

 

linux64 package: https://github.com/diegoviso/xmltvenhancer/blob/master/linux-64/publish-linux-x64.rar

 

win64 package: https://github.com/diegoviso/xmltvenhancer/blob/master/win-64/publish-win-x64.rar

 

Please read the instructions below. If you have any question I will do my best to answer them.

 

Overview:

 

xmltvenhancer is an application used to enhance your XMLTV based EPG by adding artwork and other metadata. The application is available as both a linux and windows package (not tested). It is designed to run as a scheduled task via task scheduler or cron. As of version 1, XMLTV enhancer will only add artwork, however over time will introduce additional metadata to enhance your EPG viewing experience.

 

It requires a local xmltv file or a xmltv raw url link to process. It will process the xmltv file and add a directory for each distinct programme under the directory artwork. It will then add an additional icon src element for each programme in addition to a jpg stub file which can be replaced manually by you or via the TVDB service. All your artwork is stored locally.

 

Once xmltvenhancer processes your file it will create a file named (yourepgfile)-enhanced.xml which you then use as your xmltv.xml source within Emby.

 

Installation:

 

Simple, create an xmltvenhancer directory and unzip the contents of the package into this directory. For linux installs ensure your have chmod accordingly

 

Notes:

  1. If you are using your own xml file place it in the xmltv directory. The application will automatically assume your xmltv file sits in this directory. It will not look in the root directory of the application. There is no need to specify this directory on the command line.

  2. If you are using a URL, you must specify a local file name which the application will later append the -enhanced suffix to. Also not .gz files are not supported, only urls which server a raw xml feed.

  3. To use the TVDB service you must register for a tvdb api key. You must place this api key in the xmltvenhanced.ini file. Once you have met these prerequisites, you enable tvdb poster lookup by adding the -enabletvdb switch

  4. It is recommended you run -enabletvdb once as it will take time to scrape from the tvdb website, and then generally run xmltvenhancer without the -enabletvdb switch, to simply update the EPG metadata for emby consumption

  5. In the event that artwork cannot be found or is incorrect, you can manually add your own artwork by replacing the jpg in the corresponding artwork directory. Artwork that is added by either tvdb or you will not be replaced by the application

  6. Currently the tvdb algorithm will only match currently running series, this is to reduce false positives.

Usage Examples:

 

xmlenhancer xmltv.xml (processes a local xmltv.xml file located in the xmltv directory)

xmlenhancer http://url/file.xml au-epg.xml (download the xmltv data from a url and saves it to au-epg.xml)

xmlenhancer http://url/file.xml au-epg.xml -enabletvdb (as above with the addition of enabling artwork processing via TVDB)

OK, so I finally had a chance to play with this over the weekend. Downloaded and installed. Moved my xmltv.xml file across to the relevant folder. I could not get this to run as a service - no matter how I tried. I also couldn't get an API out of tvdb (their issue) However, running it from the command line at an elevated prompt worked first time - all the folders were generated and images started to appear - it was beautiful - all those horrible blocks of colour were starting to be replaced by images for the first time! Obviously, this was done manually, but I can cope with this once a week at the moment!

Link to comment
Share on other sites

diegov

I'm glad you got it somewhat working :). With the tvdb api  key, you need to create and account, log out fully and then log back in to generate it. I had troubles the first time around. For me, i'm happy with the program as it is, it fulfills its purpose. i'm looking at adding support for the moviedb to provide artwork for movies and the also adding some sort of directory scavenger routine to remove stale directories and images. I'll post it if people are still interested...

 

Thanks!

Link to comment
Share on other sites

aspdend

I'm glad you got it somewhat working :). With the tvdb api  key, you need to create and account, log out fully and then log back in to generate it. I had troubles the first time around. For me, i'm happy with the program as it is, it fulfills its purpose. i'm looking at adding support for the moviedb to provide artwork for movies and the also adding some sort of directory scavenger routine to remove stale directories and images. I'll post it if people are still interested...

 

Thanks!

OK - will have to try that with tvdb then. Yep, still interested in any updates and improvements you can make - many thanks for making this available!!

Link to comment
Share on other sites

diegov

No worries. May I ask if you have tried setting up the program as a scheduled task in Win10? I believe there's an option to run it as admin when you do it this way?

Link to comment
Share on other sites

aspdend

No worries. May I ask if you have tried setting up the program as a scheduled task in Win10? I believe there's an option to run it as admin when you do it this way?

Please ask away - if there's anything really obvious I've missed, I'm not too proud to admit it! However, that is exactly what I did - I can set it up to run as a scheduled task and it fires off at the scheduled time, but it brings up a dialogue box that instantly closes without actually doing anything at all - I made sure it was set with elevated privileges as well! That's what stumped me. Worked first time from the command line only...

Link to comment
Share on other sites

diegov

I suspect it might be a working directory thing. Try creating a batch file in Windows. In the batch file change directory to where you have xmltvenhancer installed and then run it with your parameters.Use the batch file as your scheduled task. Let me know if that works.

Link to comment
Share on other sites

aspdend

I suspect it might be a working directory thing. Try creating a batch file in Windows. In the batch file change directory to where you have xmltvenhancer installed and then run it with your parameters.Use the batch file as your scheduled task. Let me know if that works.

OK - I will give that a try this evening when I get home and let you know!

Link to comment
Share on other sites

kanipek

Having the following issue:

Error:
  An assembly specified in the application dependencies manifest (xmltvenhancer.deps.json) was not found:
    package: 'Newtonsoft.Json', version: '11.0.2'
    path: 'lib/netstandard2.0/Newtonsoft.Json.dll'

 

That file is located in the \publish folder - Windows 10 x64 here.

Link to comment
Share on other sites

diegov

Having the following issue:

Error:

  An assembly specified in the application dependencies manifest (xmltvenhancer.deps.json) was not found:

    package: 'Newtonsoft.Json', version: '11.0.2'

    path: 'lib/netstandard2.0/Newtonsoft.Json.dll'

 

That file is located in the \publish folder - Windows 10 x64 here.

 

Are you running the program via a command prompt in the same directory as the dlls? Did you also try running it as an administrator?

Link to comment
Share on other sites

kanipek

Are you running the program via a command prompt in the same directory as the dlls? Did you also try running it as an administrator?

Yes to both

Link to comment
Share on other sites

diegov

Yes to both

Hi, have you tried running the xmlenhancer.exe file which sits inside the Publish folder vs the one that sits under win-x64 folder?

 

I'm trying to replicate but it runs fine on my windows 10 x64 machine.

Link to comment
Share on other sites

kanipek

Hi, have you tried running the xmlenhancer.exe file which sits inside the Publish folder vs the one that sits under win-x64 folder?

 

I'm trying to replicate but it runs fine on my windows 10 x64 machine.

I just did as you suggest - that does seem to be working.

Link to comment
Share on other sites

kanipek

I haven't checked all of the artwork - but it seems like this is all I am getting.

 

Tried using the tvdb switch it is telling me the api key is incorrect - I do have the api key in the .ini

post-127390-0-86417300-1528854946_thumb.jpg

Edited by kanipek
Link to comment
Share on other sites

diegov

I haven't checked all of the artwork - but it seems like this is all I am getting.

 

Tried using the tvdb switch it is telling me the api key is incorrect - I do have the api key in the .ini

 

The idea of the program is to give you control of your Live TV artwork. The image you see is a default place holder. You can replace these with your own posters. Granted it is a bit of a chore, but you now have control. the TVDB switch will help reduce the amount of manual work, but it is not full proof, you will still need to replace a fair few of the default placeholders with your own artwork. Since TV series are pretty static you should only need to do this once. I'm working on integrating moviedb so these get done automatically.

 

I'm not sure why your API key is not working. Assuming it is valid and you have placed it correctly in the ini file. Did you want to send it to me privately via PM so i can see if it is an actual issue with your API key or the program.

Link to comment
Share on other sites

kanipek

The idea of the program is to give you control of your Live TV artwork. The image you see is a default place holder. You can replace these with your own posters. Granted it is a bit of a chore, but you now have control. the TVDB switch will help reduce the amount of manual work, but it is not full proof, you will still need to replace a fair few of the default placeholders with your own artwork. Since TV series are pretty static you should only need to do this once. I'm working on integrating moviedb so these get done automatically.

 

I'm not sure why your API key is not working. Assuming it is valid and you have placed it correctly in the ini file. Did you want to send it to me privately via PM so i can see if it is an actual issue with your API key or the program.

PM sent.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...