Jump to content


Photo

Live TV XMLtv enhancer - Artwork


  • Please log in to reply
26 replies to this topic

#1 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 01 June 2018 - 04:06 AM

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


  • Abobader, CBers, aspdend and 5 others like this

#2 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 01 June 2018 - 04:15 AM

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...



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 138256 posts
  • Local time: 08:53 PM

Posted 01 June 2018 - 09:48 AM

Neat !

#4 Abobader OFFLINE  

Abobader

    Super-Tester

  • Administrators
  • 9404 posts
  • Local time: 03:53 AM

Posted 01 June 2018 - 02:53 PM

Very nice, well done.



#5 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 01 June 2018 - 10:35 PM

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.



#6 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 04 June 2018 - 12:08 AM

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 .


  • aspdend and SikSlayer like this

#7 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 04 June 2018 - 03:45 AM

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!



#8 kjhedges OFFLINE  

kjhedges

    Member

  • Members
  • 25 posts
  • Local time: 01:53 AM

Posted 04 June 2018 - 11:10 AM

Cant wait to try



#9 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 04 June 2018 - 08:08 PM

Here you go. I have not tested on win64.

 

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

 

linux64 package: https://github.com/d...h-linux-x64.rar

 

win64 package: https://github.com/d...ish-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, 05 June 2018 - 08:53 PM.

  • aspdend likes this

#10 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 11 June 2018 - 04:33 AM

Here you go. I have not tested on win64.

 

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

 

linux64 package: https://github.com/d...h-linux-x64.rar

 

win64 package: https://github.com/d...ish-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!



#11 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 11 June 2018 - 05:06 AM

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!



#12 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 11 June 2018 - 05:28 AM

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!!



#13 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 11 June 2018 - 05:32 AM

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?

#14 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 11 June 2018 - 05:49 AM

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...



#15 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 11 June 2018 - 05:53 AM

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.

#16 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 11 June 2018 - 05:53 AM

Double post

Edited by diegov, 11 June 2018 - 05:54 AM.


#17 aspdend OFFLINE  

aspdend

    Advanced Member

  • Alpha Testers
  • 547 posts
  • Local time: 01:53 AM
  • LocationWest Sussex

Posted 11 June 2018 - 06:20 AM

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!



#18 kanipek OFFLINE  

kanipek

    U.S. Navy Retired

  • Members
  • 1105 posts
  • Local time: 08:53 PM
  • LocationMassillon, Ohio

Posted 11 June 2018 - 09:07 AM

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.



#19 diegov OFFLINE  

diegov

    Advanced Member

  • Members
  • 45 posts
  • Local time: 01:53 PM

Posted 12 June 2018 - 02:53 AM

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?



#20 kanipek OFFLINE  

kanipek

    U.S. Navy Retired

  • Members
  • 1105 posts
  • Local time: 08:53 PM
  • LocationMassillon, Ohio

Posted 12 June 2018 - 08:29 AM

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






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users