You are here

Onscreen format for se.timefor.tv.ini?

12 posts / 0 new
Last post
Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years
Onscreen format for se.timefor.tv.ini?

I guess it is best to make an official request and thread for onscreen format for se.timefor.tv.ini. 
This site is truly the best EPG site in sweden and beats Dagenstv.com and tv.nu by far. Many will convert to it exclusively if only discovering it. The silverlining would be onscreen format using the world wide S04E08/24 format. Maybe also to make grabbing faster. It is very slow compared to if using dagenstv.com and I really dont know why.
 
/Jagad

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

You can just make your own version.
Converting xmltv_ns to a common onscreen (like SE .. EP ..) can be done by adding the next lines at the end of your ini.

* xmltv_ns --> onscreen SE00/00 EP00/00
* temp_1 = season
* temp_2 = episode
* temp_3 = number of seasons
* temp_4 = number of episodes
temp_1.modify {substring(type=regex)|'episode' "^(\d*)(?:/\d*)?\.\d*(?:/\d*)?\."}
temp_2.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.(\d*)(?:/\d*)?\."}
temp_3.modify {substring(type=regex)|'episode' "^\d*(?:/(\d*))?\.\d*(?:/\d*)?\."}
temp_4.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.\d*(?:/(\d*))?\."}
temp_1.modify {calculate(not="" format=F0)|1 +}
temp_2.modify {calculate(not="" format=F0)|1 +}
temp_1.modify {addend('temp_3' not="")|/'temp_3'}
temp_2.modify {addend('temp_4' not="")|/'temp_4'}
episode.modify {clear}
episode.modify {addend('temp_1' not="")| SE'temp_1'}
episode.modify {addend('temp_2' not="")| EP'temp_2'}
episode.modify {remove(type=regex)|^\s*}

 
And chaning ( at the top of the .ini)

episodesystem=xmltv_ns

to

episodesystem=onscreen

 
Slow grabbing is most of the time site releated. So one site can be extremely fast, the other the opposite. And most of the time this is not an issue, because grabbing is mostly done in the background/automaticly.

Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years

Thanks for helping me, Francis!
SE00/00 EP00/00 This is not quite the format I was hoping for. I was hoping for S01E02/7. Im abled to add 0 on episode if less than 10. It gets hard when trying to move temp_1 season number from end of string to start of string. For example i get this string with current code:
E06/401
1 (temp_1) is the season and it is placed at the end of string. I want to move it to start and then add 0 if less than 10. Aim is:
S01E06/4
I did spend at least 10 hrs this weekend trying to solve the move of season from end to start without any success. I would be greatful if you could show me how? I added some and disabled your number of seasons (temp_3) which the se.timefor.tv site doesnt use afaik. 

xmltv_ns --> onscreen S01E02/7

* temp_1 = season

* temp_2 = episode

* temp_3 = number of seasons

* temp_4 = number of episodes

temp_1.modify {substring(type=regex)|'episode' "^(\d*)(?:/\d*)?\.\d*(?:/\d*)?\."}

temp_2.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.(\d*)(?:/\d*)?\."}

*temp_3.modify {substring(type=regex)|'episode' "^\d*(?:/(\d*))?\.\d*(?:/\d*)?\."}

temp_4.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.\d*(?:/(\d*))?\."}

temp_1.modify {calculate(not="" format=F0)|1 +}

temp_1.modify {addstart(< "10")|0} * add 0 if <10

temp_1.modify {clear("0")} * clear if 0

temp_2.modify {calculate(not="" format=F0)|1 +}

temp_2.modify {addstart(< "10")|0}

temp_2.modify {clear("0")}

*temp_1.modify {addend('temp_3' not="")|/'temp_3'}

temp_2.modify {addend('temp_4' not="")|/'temp_4'}

episode.modify {clear}

episode.modify {addend('temp_1' not="")| S'temp_1'}

episode.modify {addend('temp_2' not="")| E'temp_2'}

episode.modify {remove(type=regex)|^\s*}
 
 
 
 
 

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

Ok,
Here a simpler solution to have a leading zero (just use format D2 for that)

* xmltv_ns --> onscreen S00/0E00/0
* temp_1 = season
* temp_2 = episode
* temp_3 = number of seasons
* temp_4 = number of episodes
temp_1.modify {substring(type=regex)|'episode' "^(\d*)(?:/\d*)?\.\d*(?:/\d*)?\."}
temp_2.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.(\d*)(?:/\d*)?\."}
temp_3.modify {substring(type=regex)|'episode' "^\d*(?:/(\d*))?\.\d*(?:/\d*)?\."}
temp_4.modify {substring(type=regex)|'episode' "^\d*(?:/\d*)?\.\d*(?:/(\d*))?\."}
temp_1.modify {calculate(not="" format=D2)|1 +}
temp_2.modify {calculate(not="" format=D2)|1 +}
temp_1.modify {addend('temp_3' not="")|/'temp_3'}
temp_2.modify {addend('temp_4' not="")|/'temp_4'}
episode.modify {clear}
episode.modify {addend('temp_1' not="")|S'temp_1'}
episode.modify {addend('temp_2' not="")|E'temp_2'}
episode.modify {remove(type=regex)|^\s*}

 
For your problem with the temp_1 showing up on the end. I can't reproduce this here. (or I'm looking wrong).
Build up for the episode:
1. clear episode
2. addend season
3. addend episode
 
Can't seem to get how this could be switched.
If you still have this problem, upload your setup and I'll have a look (reduce the setup to the bare minimum).
 
If you see E06/401, that is the episode number/number of episodes
That 1 at the end can't be the season, because the season always starts with an 'S'.

Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years

Hi Francis!
Sorry Im not getting the same result as you. Note im using WG++ 1.1.1/54.03 beta. 
Yes, the 1 is season cuz number of episodes are 40 not 401. Looks like this on se.timefor.tv: 

Avsnitt:

6:40 sæson 1

My aim was to get S01E06/40 but its a no go.
Here are my files so you could test it:
 
 
 

francis
Offline
francis's picture
Has donated long time agoWG++ Team member
Joined: 11 years
Last seen: 1 month
Is the support helpful?
support us

As I was thinking already.
It is not the conversion of xmltv_ns to onscreen, that is the problem.
It is the xmltv_ns generation that already is the problem. The grabbing of the episode info was already incorrect.
I have now adjusted it and this seams to work. (If you could try and report back)

Attachments: 
Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years

Fantastic Francis! This is great, it works very well now. BIG THANKS for solving it!!
I tried to make a change myself also, which maybe could be something for next revision of the se.timefor.tv.ini
In rev1 these two lines:
 
   temp_3.scrub {single(include=last)|class="epg"|"> - |</span>|</p><div} * will be used if no episode title is available
   subtitle.modify {addstart(="")|'temp_3'} * add, if no real episode title was found
 
did see to it the swedish genre and productiondate information the se.timefor.tv site has separated from description to what it seems a subtitle, was placed in a subtitle xmltv element. Since the MDB postprocessor requires the correct english episode name to match series, placing some swedish info in the subtitle did render huge amounts of no-matches in MDB and the processing took forever. How to place this info back to the description where it belongs in the first place? This line did not work.
 
  description.modify {addstart(="")|'temp_3'} * add genre and date info to description
 
Sometimes the site has remaining genre and date info in description and if placing the same subtitle info back there is a risk of duplicate entries.
Here is my ini with xmltv_nt and conversion to onscreen epsiode-num format

Attachments: 
WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 11 years
Last seen: 2 hours
Is the support helpful?
support us

Jagad,
 
what is a suitable Swedish channel to have a look at your subtitle issue?
 
Also, you can gain some speed when adding :
url_index.headers  {customheader=Accept-Encoding=gzip,deflate}
and
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
 
Jan

Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years

Greetings Jan!
Ah, thanks! I will try the speedup code.
I actually solved my subtitle issue after a long struggle finding the correct syntax. These lines appends genre and productiondate info back to the description:
 
      temp_3.modify {remove(type=regex)|(\.)} * removes dots from genre and date info 
     description.modify {remove('temp_3' not="")|'temp_3'. } * removes remaining genre and date info from description to avoid duplicate entries
     description.modify {addstart('temp_3' not="")|'temp_3'. } * add genre and date info from temp_3 to description

after disabling the subtitle.modify line:

  

     *subtitle.modify {addstart(="")|'temp_3'} * add, if no real episode title was found

I know this isnt the most sofisticated solution and it can probably be coded much more efficient, but it works.

Describing the subtitle issue a bit more in detail. se.timefor.tv seem to have some script separating the genre and productiondate info most broadcasters sends out, away from the description to a field more similar to a subtitle, like this:

SVT1HD is a good channel for examples:  

Svett & etikett
Sport  Idag 00:05 - 00:35 på SVT 1 HD - Personligt träningsprogram från 2014.
MMA. Programledaren Kalle Zackari Wahlström testar på träningsformen MMA, men har problem att förlika sig med att slå en annan människa. Kan och måste Kalle frammana aggressivitet hos sig själv för att lyckas med utmaningen Superior Challenge i Scandinavium? Till sin hjälp för att förbereda sig för utmaningen har Kalle Sveriges bästa MMA-tränare Omar Boiuche.

Avsnitt:

5:8

Från:

2013

Typ:

Sport

The info im talking about is:
Personligt träningsprogram från 2014.
This genre and date info normaly belongs to the description. Sometimes the separation script seem to fail and there are cases with genre and date info in both the description and in this so called subtitle field (they havent got it right yet). With the subtitle.modify ini line enabled WG++ takes this info and places it into a subtitle element. When later on doing the MDB series postprocessing it uses this swedish subtitle and tries to find a match, which is of course futile. When WG++ scrubs the correct subtitle it does not use this genre and date field at all, but takes it from an another field named "Titel avsnitt" (Kanal 5 is a good channel for this). I see no point in having this additional subtitle option, so placing the info back to the description is the best option for me.
Heres my files:
 
 

Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years
WGMaker wrote:

Jagad,
 
Also, you can gain some speed when adding :
url_index.headers  {customheader=Accept-Encoding=gzip,deflate}
and
index_urlshow.headers {customheader=Accept-Encoding=gzip,deflate}
 
Jan

Yes, it shaved off 2 minutes on scrubtime. 730 seconds without and 590 seconds with. Nice!!
Thanks Jan!

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 11 years
Last seen: 2 hours
Is the support helpful?
support us

Concerning the unwanted matching attempts : Have you tried to use unselect? e.g. unselect="sport"
It a bit rough because the word "sport" can also occur in a description of a proper serie but may be you can figure out something better.
 
Jan

Jagad
Offline
Donator
Joined: 10 years
Last seen: 3 years
WGMaker wrote:

Concerning the unwanted matching attempts : Have you tried to use unselect? e.g. unselect="sport"
It a bit rough because the word "sport" can also occur in a description of a proper serie but may be you can figure out something better.
 
Jan

Yes, using unselect words is too rough and will filter off series that should be selected for MDB series processing. The "something better" is to remove the swedish genre and date info from episode name/subtitle and place it back to the description as I presented two posts back. Using this genre and date info as a subtitle/episode name makes MDB postprocessing very inefficient. Some statistics:
 
Having subtitle.modify enabled according to original se.timefor.tv Rev2
- 60 minutes of scrubbing/processing
- 917 series selected. 
- 727 series with swedish episodename/subtitle all of them did render 100% no-match
 
Subtitle.modify disabled and my three lines enabled
- 29 minutes of scrubbing/processing
- 190 series selected all with English episode names
- almost 100% match success.
 
As you see, making this change in se.timefor.tv.ini would be a huge improvement.
 
Regards
Jagad

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