You are here

[Category] Modify category for tvheadend

8 posts / 0 new
Last post
celedhrim
Offline
Donator
Joined: 3 years
Last seen: 1 month
[Category] Modify category for tvheadend

Hello,

Recently I figured out that category from guide.xml are not matching what's tvheadend want.

I'm a french user and use currently 2 ini file for my channels

I will use ~ for > and < because I don't find how to put full xml in posts :)


hts@tvh:~/.wg++$ grep channel WebGrab++.config.xml | cut -d \" -f 4 | sort | uniq -c
21 programme-television.org
1 programme-tv.com

My categories are like that in guide.xml

hts@tvh:~/.wg++$ grep category guide.xml | sort | uniq
~category lang="fr"~Animalier~/category~
~category lang="fr"~Autre~/category~
~category lang="fr"~Aventures~/category~
~category lang="fr"~Cinéma~/category~

If i'm not wrong tvheadend wait for something from this list : https://github.com/tvheadend/tvheadend/blob/8b429efb72f6da7b62878bbb9cea...

so

~category lang="fr"~Animalier~/category~

should become something like


~category lang="en"~Animals~/category~

It's seems regarding this post http://webgrabplus.com/content/how-use-categorymodify that it's possible to modify at scrap time with custom siteini.

My question is simple , Does I have to get a full original site.ini fork or can I add a user custom part next to the original ini file ?

I want to benefit the orignal update and not keep a personnel modified version up2date.

Second question , How to do this with an encrypted site init file ?

Thx for reading ,

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 6 days

the ini would have to be modified.

i dont see why program-television.org cant be supplied decrypted.
i'm sure mat8861 will see this post and answer.

program-tv.com isnt encrypted so you can modify it to see if it works.

after this line..
index_category.modify {cleanup(tags="<"">")}

add..

index_category.modify {replace|Animalier|Animals}

add as many line as you need to replace all the category names.

celedhrim
Offline
Donator
Joined: 3 years
Last seen: 1 month

thx for you quick and precise answer !

I'll give it a try , but more globally , this method drawback is to limiting users to unencrypted ini file.

I think a method to permit a sort of "patch file" to existing one could be a great addition

webgrab could see for the initial file 'sitepack.ini/.../mysite.ini' and add config in a folder defining user addtion , for example 'sitepack.ini.override/.../mysite.ini'

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 6 days

already exists.

webgrab looks for ini in specific places
1. webgrab config directory(usually .wg++)
2. .wg++/siteini.user directory and all sub directories
3. .wg++/siteini.pack directory and all sub directories

you could copy the program-tv.com.ini to .wg++/siteini.user/france for example(and modify it)
webgrab will use that ini version before the one ini siteini.pack/france as its first in the search list.

what you cannot have is 2 copies of the same ini in any one location listed above,webgrab will error with a message about duplicate ini's.

celedhrim
Offline
Donator
Joined: 3 years
Last seen: 1 month

Yes this is already a cool feature , but it's forking an ini file

Imagine instruction A and B in original ini and a user want to add a function C in a ini file

Currently , distributed ini file give A and B , to add C , Users have to copy original file in .wg++/siteini.user and put A , B and C in it.
* this don't work for encrypted files
* You don't benefit of future update of original ini file

My idea is something like this:
* A and B in .wg++/siteini.user ini file
* C in .wg++/siteini.override ini file

Webgrab concatenate at execution as A,B and C , so user can add customization without altering original file , and continue to benefit original ini updates. It also works with encrypted files.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 6 days

its a great idea but its not practical.
knowing a bit of how webgrab works internally.

webgrab grabs multiple pages when downloading epg data.
we call them index,detail and subdetail pages.

all elements(like category,ect) could be on any one of these pages.
in the example above the category is on the index page(you can tell by its element name...index_category)
the next time the site changes this could be moved to the detail_category or subdetail_category page.

this would require your "patch" to be modified but in the case of a excrypted ini you wouldnt know what page the element exists on.

a better and simplier solution would be to add the feature to the rex post processor.
details on this are available in the rex folder(rex.config.xml) and also on the downloads page(documented configuration files).

you can contact jan(owner) via the contact tab at top of the forums.
i wouldnt hold out any hope of it happening anytime soon(if ever) as he's busy enough just doing webgrab updates/fixes alone.

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 8 years
Last seen: 6 days

speaking of the rex post processor you can use that to run a script after webgrab completes.
you could create a .sh file and use sed,ect to replace the category names in your guide.xml.

celedhrim
Offline
Donator
Joined: 3 years
Last seen: 1 month

Yes , scripting something was my first idea , but I had to ensure I don't forgot a webgrab feature I didn't know :)

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl