Git Product home page Git Product logo

Comments (11)

tunip avatar tunip commented on May 28, 2024 1

First step is done.
img_20161110_195602

The assignment needs to be improved. And multiple genres per event are not considered.

from android-tvheadend.

tunip avatar tunip commented on May 28, 2024 1

@xi784 yes it works fine. But I replace in the xmltv file every category for each event with an ETSI conform genre. For this task i have a simple shell script.

For german horizon.tv there are 94 xmltv genres which i map to ETSI conform genres.

Script:

#!/bin/bash

# Define all ETSI genres
MOVIE=$"Movie/Drama"
THRILLER=$"Detective/Thriller"
ADVENTURE=$"Adventure/Western/War"
SF=$"Sciencefiction/Fantasy/Horror"
COMEDY=$"Comedy"
SOAP=$"Soap/Melodrama/Folkloric"
ROMANCE=$"Romance"
HISTORICAL=$"Serious/Classical/Religious/Historical movie/Drama"
XXX=$"Adultmovie/Drama"

NEWS=$"News/Current affairs"
WEATHER=$"News/Weather report"
NEWS_MAGAZINE=$"News magazine"
DOCUMENTARY=$"Documentary"
DEBATE=$"Discussion/Interview/Debate"
INTERVIEW=$DEBATE;

SHOW=$"Show/Game show"
GAME=$"Game show/Quiz/Contest"
VARIETY=$"Variety show"
TALKSHOW=$"Talk show"

SPORT=$"Sports"
SPORT_SPECIAL=$"Special events (Olympic Games, World Cup, etc.)"
SPORT_MAGAZINE=$"Sports magazines"
FOOTBALL=$"Football/Soccer"
TENNIS=$"Tennis/Squash"
SPORT_TEAM=$"Team sports(excluding football)"
ATHLETICS=$"Athletics"
SPORT_MOTOR=$"Motor sport"
SPORT_WATER=$"Water sport"
SPORT_WINTER=$"Winter sports"
EQUESTRIAN=$"Equestrian"
SPORT_MARTIAL=$"Martial Sports"

KIDS=$"Children's / Youth programs"
KIDS_0_6=$"Pre-school children's programs"
KIDS_6_14=$"Entertainment programs for 6 to 14"
KIDS_10_16=$"Entertainment programs for 10 to 16"
EDUCATIONAL=$"Informational/Educational/School programs"
CARTOON=$"Cartoons/Puppets"

MUSIC=$"Music/Ballet/Dance"
ROCK_POP=$"Rock/Pop"
CLASSICAL=$"Serious music/Classical music"
FOLK=$"Folk/Traditional music"
JAZZ=$"Jazz"
OPERA=$"Musical/Opera"
BALLET=$="Ballet"

CULTURE=$"Arts/Culture (without music)"
PERFORMING=$"Performing arts"
FINE_ARTS=$"Fine arts"
RELIGION=$"Religion"
POPULAR_ART=$"Popular culture/Traditional arts"
LITERATURE=$"Literature"
FILM=$"Film/Cinema"
EXPERIMENTAL_FILM=$"Experimental film/Video"
BROADCASTING=$"Broadcasting/Press"
NEW_MEDIA=$"New media"
CULTUREARTS=$"Arts magazines/Culture magazines"
FASHION=$"Fashion"

SOCIAL=$"Social/Political issues/Economics"
MAGAZINE=$"Magazines/Reports/Documentary"
ECONOMIC=$"Economics/Social advisory"
VIP=$"Remarkable people"

SCIENCE=$"Education/Science/Factual topics"
NATURE=$"Nature/Animals/Environment"
TECHNOLOGY=$"Technology/Natural sciences"
DIOLOGY=$TECHNOLOGY
MEDECINE=$"Medicine/Physiology/Psychology"
FOREIGN=$"Foreign countries/Expeditions"
SPIRITUAL=$"Social/Spiritual sciences"
FURTHER_EDUCATION=$"Further education"
LANGUAGES=$"Languages"

HOBBIES=$"Leisure hobbies"
TRAVEL=$"Tourism / Travel"
HANDICRAF=$"Handicraft"
MOTORING=$"Motoring"
FITNESS=$"Fitness and health"
COOKING=$"Cooking"
SHOPPING=$"Advertisement / Shopping"
GARDENING=$"Gardening"

# Map all xmltv genres to ETSI genres
declare -A ARRAY
ARRAY["Abenteuer"]=$ADVENTURE
ARRAY["Action"]=$ADVENTURE
ARRAY["Ballett"]=$BALLET
ARRAY["Bildung"]=$FURTHER_EDUCATION
ARRAY["Berühmte Leute"]=$VIP
ARRAY["Bildende Kunst"]=$FINE_ARTS
ARRAY["Darstellende Kunst"]=$PERFORMING
ARRAY["Darst. Kunst"]=$PERFORMING
ARRAY["Dokumentation"]=$DOCUMENTARY
ARRAY["Drama \(film\)"]=$MOVIE
ARRAY["Drama \(filme\)"]=$MOVIE
ARRAY["Drama \(serie\)"]=$SOAP
---and so on---

REGEX_PRE=$'<category[^>]*>'
REGEX_POST=$'</category>'

for K in "${!ARRAY[@]}"; do
  REGEX=$REGEX_PRE$K$REGEX_POST
  SUSTI='<category lang="en">'${ARRAY[$K]}'</category>'
  sed -r -i "s|$REGEX|$SUSTI|" /mnt/cache/appdata/tvheadend/data/xmltv/guide.xml
done

from android-tvheadend.

tunip avatar tunip commented on May 28, 2024

Tvheadend channeltags/bouquets can not be used in Live Channels. Only program genres are possible at the moment.

As we use HTSP EPG, another htsp message field "contentType" in BaseEventResponse.java is needed.

ETSI genres:
http://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.11.01_60/en_300468v011101p.pdf (page 40)

Tvheadend genres:
https://github.com/tvheadend/tvheadend/blob/a7e814c233f7b66b7345d4d6622dbde0e55ea8c4/src/epg.c#L2217

Android TV TIF genres:
https://developer.android.com/reference/android/media/tv/TvContract.Programs.Genres.html

ANIMAL_WILDLIFE
ARTS
COMEDY
DRAMA
EDUCATION
ENTERTAINMENT
FAMILY_KIDS
GAMING
LIFE_STYLE
MOVIES
MUSIC
NEWS
PREMIER
SHOPPING
SPORTS
TECH_SCIENCE
TRAVEL

Examples from http://tvheadend:9981/api/epg/events/grid:
"title":"Tagesschau Nachrichten","genre":[32]
Genre: NEWS
Decimal: 32
Hexadecimal: 0x20 (0x2 0x0 news/current affairs; from etsi EPG genre list)

"title":"Fußball","genre":[67]
Genre: Football
Decimal: 67
Hexadecimal: 0x43 (0x4 0x3 football/soccer; from etsi EPG genre list)

And we have, of course, multiple contentTypes "genre":[35,112,131] for events ([Docu, Arts, Social]).

Example assignment:

private static final SparseArray<String> mProgramGenre = new SparseArray<String>() {
    {
        append(112, TvContract.Programs.Genres.encode(TvContract.Programs.Genres.ARTS));        
        append(32, TvContract.Programs.Genres.encode(TvContract.Programs.Genres.NEWS));         
        append(67, TvContract.Programs.Genres.encode(TvContract.Programs.Genres.SPORTS));
        append(18, TvContract.Programs.Genres.encode(TvContract.Programs.Genres.MOVIES);
        append(16, TvContract.Programs.Genres.encode(TvContract.Programs.Genres.DRAMA);
        ...
    }
};

if (mContentType != INVALID_INT_VALUE) {  
    values.put(TvContract.Programs.COLUMN_CANONICAL_GENRE, mProgramGenre.get(mContentType));
}   

from android-tvheadend.

tunip avatar tunip commented on May 28, 2024

Here is the list of the Tvheadend contentType ids.

    Movie/Drama:
16  movie/drama (general)
17  detective/thriller
18  adventure/western/war
19  science fiction/fantasy/horror
20  comedy
21  soap/melodrama/folkloric
22  romance
23  serious/classical/religious/historical movie/drama
24  adult movie/drama
25  to 0xE reserved for future use
31  user defined

    News/Current affairs:
32  news/current affairs (general)
33  news/weather report
34  news magazine
35  documentary
36  discussion/interview/debate
37  to 0xE reserved for future use
47  user defined

    Show/Game show:
48  show/game show (general)
49  game show/quiz/contest
50  variety show
51  talk show
52  to 0xE reserved for future use
63  user defined

    Sports:
64  sports (general)
65  special events (Olympic Games, World Cup, etc.)
66  sports magazines
67  football/soccer
68  tennis/squash
69  team sports (excluding football)
70  athletics
71  motor sport
72  water sport
73  winter sports
74  equestrian
75  martial sports
76  to 0xE reserved for future use
79  user defined

    Children's/Youth programmes:
80  children's/youth programmes (general)
81  pre-school children's programmes
82  entertainment programmes for 6 to14
83  entertainment programmes for 10 to 16
84  informational/educational/school programmes
85  cartoons/puppets
86  to 0xE reserved for future use
95  user defined 

    Music/Ballet/Dance:
96  music/ballet/dance (general)
97  rock/pop
98  serious music/classical music
99  folk/traditional music
100 jazz
101 musical/opera
102 ballet
103 to 0xE reserved for future use
111 user defined

    Arts/Culture (without music):
112 arts/culture (without music, general)
113 performing arts
114 fine arts
115 religion
116 popular culture/traditional arts
117 literature
118 film/cinema
119 experimental film/video
120 broadcasting/press
121 new media
122 arts/culture magazines
123 fashion
124 to 0xE reserved for future use
127 user defined

    Social/Political issues/Economics:
128 social/political issues/economics (general)
129 magazines/reports/documentary
130 economics/social advisory
131 remarkable people
132 to 0xE reserved for future use
143 user defined

    Education/Science/Factual topics:
144 education/science/factual topics (general)
145 nature/animals/environment
146 technology/natural sciences
147 medicine/physiology/psychology
148 foreign countries/expeditions
149 social/spiritual sciences
150 further education
151 languages
152 to 0xE reserved for future use
159 user defined

    Leisure hobbies:
160 leisure hobbies (general)
161 tourism/travel
162 handicraft
163 motoring
164 fitness and health
165 cooking
166 advertisement/shopping
167 gardening
168 to 0xE reserved for future use
175 user defined 

from android-tvheadend.

kiall avatar kiall commented on May 28, 2024

The core of was this was fixed in #90 - If there are specific additions etc, lets open a new+more specific bug :)

from android-tvheadend.

xi784 avatar xi784 commented on May 28, 2024

@tunip
is contentType/category import via tv_grab_wg++>xmltv>tvheadend working for you?
i take a look into guide.xml, category via horizon.tv is catched, but tvheadend didnt import.

from android-tvheadend.

xi784 avatar xi784 commented on May 28, 2024

https://tvheadend.org/boards/12/topics/301

I think that is the problem..

from android-tvheadend.

xi784 avatar xi784 commented on May 28, 2024

Bin einen anderen Weg gegangen, aber der Ansatz ist der gleiche 💃

über die ini gegangen und arbeite mit category.modify - selbes Resultat, aber vielen dank 👍

from android-tvheadend.

tunip avatar tunip commented on May 28, 2024

Magst deinen category.modify Teil aus deiner ini teilen? Der Ansatz gefällt mir.

from android-tvheadend.

xi784 avatar xi784 commented on May 28, 2024

Erster Entwurf für die horizon.tv.de

category.modify {replace|Drama (serie)|soap/melodrama/folkloric}
category.modify {replace|Drama (filme)|movie / drama}
category.modify {replace|Komödie|comedy}
category.modify {replace|Sci Fi|science fiction/fantasy/horror}
category.modify {replace|Horror|science fiction/fantasy/horror}
category.modify {replace|Thriller|detective/thriller}
category.modify {replace|Action|adventure/western/war}
category.modify {replace|Abenteuer|adventure/western/war}
category.modify {replace|Melodrama|soap/melodrama/folkloric}
category.modify {replace|Krimi|detective/thriller}
category.modify {replace|Fantasie|science fiction/fantasy/horror}
category.modify {replace|Spielfilm|movie}
category.modify {replace|Western|adventure/western/war}
*
category.modify {replace|Nachrichten|news/current affairs}
category.modify {replace|Wetter|news/weather report}
category.modify {replace|Dokumentation|documentary}
category.modify {replace|Bildung|further education}
category.modify {replace|Geschichte|education/science/factual topics}
category.modify {replace|Weiterbildung|education/science/factual topics}
category.modify {replace|Soziales|social/spiritual sciences}
category.modify {replace|Politik|social/political issues/economics}
category.modify {replace|Wirtschaft|economics/social advisory}
category.modify {replace|Wissen|technology/natural sciences}
category.modify {replace|Magazin|magazines/reports/documentary}
category.modify {replace|Talk|discussion/interview/debate}
category.modify {replace|Talk Show|talk show}
category.modify {replace|Natur|nature/animals/environment}
category.modify {replace|Gesundheit|fitness and health}
category.modify {replace|Medizin|medicine/physiology/psychology}
*
category.modify {replace|Show|show/game show}
category.modify {replace|Unterhaltungsshow|game show/quiz/contest}
category.modify {replace|Kochen|cooking}
category.modify {replace|Reisen|tourism/travel}
category.modify {replace|Freizeit|leisure hobbies}
category.modify {replace|Lifestyle|arts/culture}
category.modify {replace|Religion|religion}
category.modify {replace|Shopping|advertisement/shopping}
category.modify {replace|Mode|fashion}
*
category.modify {replace|Musik|music/ballet/dance}
category.modify {replace|Tanz|music/ballet/dance}
category.modify {replace|Volksmusik|folk/traditional music}
category.modify {replace|Rock|rock/pop}
category.modify {replace|Pop|rock/pop}
category.modify {replace|Klassik|serious music/classical music}
category.modify {replace|Musical / Oper|musical/opera }
category.modify {replace|Jazz|jazz}
category.modify {replace|Ballet|ballet}
*
category.modify {replace|Sport Magazin|sports magazines}
category.modify {replace|Fussball|football/soccer}
category.modify {replace|Sport|sports}
category.modify {replace|Teamsport|team sports (excluding football)}
category.modify {replace|Tennis|tennis/squash}
category.modify {replace|Motorsport|motor sport}
category.modify {replace|Leichtathletik|athletics}
*
category.modify {replace|Kunst|arts / culture}
category.modify {replace|Kunst Magazin|arts/culture magazines}
category.modify {replace|Bildende Kunst|fine arts}
category.modify {replace|Kultur|arts/culture}
category.modify {replace|Film|film/Cinema}
category.modify {replace|Kino|film/Cinema}
category.modify {replace|Darstellende Kunst|performing arts}
*rock/populäre arts/culture (without music, general)
*
category.modify {replace|Kinder|Pre-school children's programs}
category.modify {replace|Jugend|Children's / Youth programs}
category.modify {replace|Kinder, 6 14|Entertainment programs for 6 to 14}
category.modify {replace|Kinder, 10 16|Entertainment programs for 10 to 16}
*
category.modify {replace|movie/drama (general)|movie/drama}
category.modify {replace|news/current affairs (general)|news/current affairs}
category.modify {replace|show/game show (general)|show/game show}
category.modify {replace|sports (general)|sports}
category.modify {replace|children's/youth programmes (general)|children's/youth programmes}
category.modify {replace|music/ballet/dance (general)|music/ballet/dance}
category.modify {replace|arts/culture (without music, general)|arts/culture}
category.modify {replace|social/political issues/economics (general)|social/political issues/economics
category.modify {education/science/factual topics (general)|education/science/factual topics}
category.modify {leisure hobbies (general)|sports (general)|leisure hobbies}

Grüße :)

from android-tvheadend.

xi784 avatar xi784 commented on May 28, 2024

Sieht eigentlich alles ganz vielversprechend aus.. verzeihe mir wenn noch nicht jede Kategorie entsprechend passend wirkt. 🥇

from android-tvheadend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.