diff options
Diffstat (limited to 'abs/core/mythtv')
10 files changed, 365 insertions, 30 deletions
diff --git a/abs/core/mythtv/stable-0.25/git_src/git_hash b/abs/core/mythtv/stable-0.25/git_src/git_hash index e29adf1..0d4d167 100644 --- a/abs/core/mythtv/stable-0.25/git_src/git_hash +++ b/abs/core/mythtv/stable-0.25/git_src/git_hash @@ -1 +1 @@ -79a24c90efd3308895880cbad4a4e550986aedda +b5adf034713acfd1923eecad2f96c43be688d0d0 diff --git a/abs/core/mythtv/stable-0.25/git_src/git_hash_web b/abs/core/mythtv/stable-0.25/git_src/git_hash_web index bf76f69..04176fb 100644 --- a/abs/core/mythtv/stable-0.25/git_src/git_hash_web +++ b/abs/core/mythtv/stable-0.25/git_src/git_hash_web @@ -1 +1 @@ -89a347c85284c5cf3ca3ad7250f21c7e698af858 +48778a639409bc591ee4a6ab4bec543da94e66c1 diff --git a/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD b/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD index e5dea15..7278249 100644 --- a/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD +++ b/abs/core/mythtv/stable-0.25/mythplugins/PKGBUILD @@ -12,7 +12,7 @@ pkgname=('mytharchive'           'mythweather'           'mythzoneminder')  pkgver=0.25 -pkgrel=17 +pkgrel=19  arch=('i686' 'x86_64')  url="http://www.mythtv.org" diff --git a/abs/core/mythtv/stable-0.25/mythtv/PKGBUILD b/abs/core/mythtv/stable-0.25/mythtv/PKGBUILD index 3da2079..936060b 100644 --- a/abs/core/mythtv/stable-0.25/mythtv/PKGBUILD +++ b/abs/core/mythtv/stable-0.25/mythtv/PKGBUILD @@ -6,7 +6,7 @@  pkgname=mythtv  pkgver=0.25 -pkgrel=25 +pkgrel=33  commit_hash=`cat ../git_src/git_hash`  pkgdesc="A Homebrew PVR project $commit_hash"  arch=('i686' 'x86_64') @@ -45,9 +45,9 @@ depends=('mysql-clients'           'glew'           'openssl'           'libxml2' -	 'lsdvd' -	 'dvdbackup' -	 'x264') +         'lsdvd' +         'dvdbackup' +         'x264')  #glew for gpu commerical flagging  #openssl for roap @@ -66,7 +66,9 @@ install='mythtv.install'  #http://code.mythtv.org/trac/ticket/10773   mythexpress  #http://code.mythtv.org/trac/ticket/10825   mythexpress  #http://code.mythtv.org/trac/ticket/11032   mythexpress -patchs=('myth_settings.patch' 'MythBase.php.patch' +#patchs=('myth_settings.patch' 'MythBase.php.patch' + +patchs=('myth_settings.patch'           'bonjour-correction.patch'          '0001-protect-metadata-loads-from-multiple-threads.patch'          '0004-restore-fe-netcontrol-play-resume-functionality.patch') @@ -75,7 +77,8 @@ optdepends=('xmltv: to download tv listings')  replaces=('mythvideo' 'myththemes')  conflicts=('mythvideo' 'myththemes')  source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` -        'mythbackend.lr' 'mythfrontend.lr' 'pretty' ) +        'mythbackend.lr' 'mythfrontend.lr' 'pretty' +        'tmdb3.py' 'tmdb3_db_update.py')  build() { @@ -106,6 +109,10 @@ build() {      #Fix Python DepreciationWarning      sed -i 's/return super(Artwork, cls).__new__(cls, attr, parent, imagetype)/return super(Artwork, cls).__new__(cls)/' ${srcdir}/mythtv/bindings/python/MythTV/dataheap.py +    #Update tmdb3.py to v3.6 & add tmdb3_db_update.py script & rm tmdb.py +    cp $srcdir/tmdb3*.py $srcdir/mythtv/programs/scripts/metadata/Movie/ +    rm -f $srcdir/mythtv/programs/scripts/metadata/Movie/tmdb.py +    ARCH=${CARCH/_/-}    ./configure --prefix=/usr --cpu=${ARCH} \                --disable-audio-jack \ @@ -116,8 +123,8 @@ build() {                --enable-vdpau \                --enable-crystalhd \                --dvb-path=/usr/include \ -	      --enable-libmp3lame \ -	      --enable-libx264 \ +              --enable-libmp3lame \ +              --enable-libx264 \                --with-bindings=perl,python --python=python2 || return 1    make all || return 1 @@ -155,10 +162,11 @@ package() {  md5sums=('7ef6de58240e7aad389a0b13d91b1cf6'           '2babd4b8e146a7538d18dcd55695b0be'           '322f48528b350f0e6aebfff6eab4c4ee' -         '9ec33d6956464283636c1f9a781dd4fd'           '8e2a055bb3beae04c88a8e603e080422'           '67f7316c750fba17fa578d10840b9dbd'           'ae23e6a8cffbe335fa37bf59978bf7a2'           'f735805a80b0d1180dee01f9df1b7004'           'f407d6af23e74a49540755420f84fa58' -         '5469d9921b726db750b991c87d226158') +         '5469d9921b726db750b991c87d226158' +         '187be42b1ffca6badfa539260ffef65e' +         '7460513f6791574eaa0ae0402ffd3688') diff --git a/abs/core/mythtv/stable-0.25/mythtv/menu-xml/library.xml.patch b/abs/core/mythtv/stable-0.25/mythtv/menu-xml/library.xml.patch index 8c36a62..8f80928 100644 --- a/abs/core/mythtv/stable-0.25/mythtv/menu-xml/library.xml.patch +++ b/abs/core/mythtv/stable-0.25/mythtv/menu-xml/library.xml.patch @@ -5,8 +5,8 @@       <button>  +        <type>STREAM</type> -+        <text>Play Online Streams</text> -+        <description></description> ++        <text>Online Content</text> ++        <description>Play content from online sources</description>  +        <action>MENU gen_is.xml</action>  +    </button>  + diff --git a/abs/core/mythtv/stable-0.25/mythtv/menu-xml/optical_menu.xml.patch b/abs/core/mythtv/stable-0.25/mythtv/menu-xml/optical_menu.xml.patch index 1ff2db2..b836e85 100644 --- a/abs/core/mythtv/stable-0.25/mythtv/menu-xml/optical_menu.xml.patch +++ b/abs/core/mythtv/stable-0.25/mythtv/menu-xml/optical_menu.xml.patch @@ -12,9 +12,9 @@  +  +    <button>  +        <type>DVD_RIP</type> -+        <text>Import video files from DVD</text> -+       <description>Import video files from a data DVD</description> -+        <action>EXEC /usr/LH/bin/importfiles.sh</action> ++        <text>Import Files from DVD</text> ++       <description>Import all files from a data DVD</description> ++        <action>EXEC /usr/LH/bin/importfiles.sh &</action>  +    </button>  +  +    <button> diff --git a/abs/core/mythtv/stable-0.25/mythtv/mythtv.install b/abs/core/mythtv/stable-0.25/mythtv/mythtv.install index 3b44668..5d4614d 100644 --- a/abs/core/mythtv/stable-0.25/mythtv/mythtv.install +++ b/abs/core/mythtv/stable-0.25/mythtv/mythtv.install @@ -9,8 +9,8 @@ pre_upgrade() {  }  post_upgrade() { -        gen_is_xml.py -        gen_lib_xml.py +        post_install +        /usr/share/mythtv/metadata/Movie/tmdb3_db_update.py  } diff --git a/abs/core/mythtv/stable-0.25/mythtv/tmdb3.py b/abs/core/mythtv/stable-0.25/mythtv/tmdb3.py new file mode 100755 index 0000000..829f744 --- /dev/null +++ b/abs/core/mythtv/stable-0.25/mythtv/tmdb3.py @@ -0,0 +1,278 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- +# ---------------------- +# Name: tmdb3.py +# Python Script +# Author: Raymond Wagner +# Purpose: This python script is intended to translate lookups between the +#          TheMovieDB.org V3 API and MythTV's internal metadata format. +#               http://www.mythtv.org/wiki/MythVideo_Grabber_Script_Format +#               http://help.themoviedb.org/kb/api/about-3 +#----------------------- +__title__ = "TheMovieDB.org V3" +__author__ = "Raymond Wagner" +__version__ = "0.3.6" +# 0.1.0 Initial version +# 0.2.0 Add language support, move cache to home directory +# 0.3.0 Enable version detection to allow use in MythTV +# 0.3.1 Add --test parameter for proper compatibility with mythmetadatalookup +# 0.3.2 Add --area parameter to allow country selection for release date and +#       parental ratings +# 0.3.3 Use translated title if available +# 0.3.4 Add support for finding by IMDB under -D (simulate previous version) +# 0.3.5 Add debugging mode +# 0.3.6 Add handling for TMDB site and library returning null results in +#       search. This should only need to be a temporary fix, and should be +#       resolved upstream. + +from optparse import OptionParser +import sys + +def buildSingle(inetref, opts): +    from MythTV.tmdb3 import Movie +    from MythTV import VideoMetadata +    from lxml import etree + +    import re +    if re.match('^0[0-9]{6}$', inetref): +        movie = Movie.fromIMDB(inetref) +    else: +        movie = Movie(inetref) + +    tree = etree.XML(u'<metadata></metadata>') +    mapping = [['runtime',      'runtime'],     ['title',       'originaltitle'], +               ['releasedate',  'releasedate'], ['tagline',     'tagline'], +               ['description',  'overview'],    ['homepage',    'homepage'], +               ['userrating',   'userrating'],  ['popularity',  'popularity'], +               ['budget',       'budget'],      ['revenue',     'revenue']] +    m = VideoMetadata() +    for i,j in mapping: +        if getattr(movie, j): +            setattr(m, i, getattr(movie, j)) + +    if movie.title: +        m.title = movie.title + +    releases = movie.releases.items() + +    if opts.country: +        try: +            # resort releases with selected country at top to ensure it +            # is selected by the metadata libraries +            index = zip(*releases)[0].index(opts.country) +            releases.insert(0, releases.pop(index)) +        except ValueError: +            pass +        else: +            m.releasedate = releases[0][1].releasedate + +    m.inetref = str(movie.id) +    if movie.collection: +        m.collectionref = str(movie.collection.id) +    if movie.releasedate: +        m.year = movie.releasedate.year +    for country, release in releases: +        if release.certification: +            m.certifications[country] = release.certification +    for genre in movie.genres: +        m.categories.append(genre.name) +    for studio in movie.studios: +        m.studios.append(studio.name) +    for country in movie.countries: +        m.countries.append(country.name) +    for cast in movie.cast: +        d = {'name':cast.name, 'character':cast.character, 'department':'Actors', +             'job':'Actor', 'url':'http://www.themoviedb.org/people/{0}'.format(cast.id)} +        if cast.profile: d['thumb'] = cast.profile.geturl() +        m.people.append(d) +    for crew in movie.crew: +        d = {'name':crew.name, 'job':crew.job, 'department':crew.department, +             'url':'http://www.themoviedb.org/people/{0}'.format(crew.id)} +        if crew.profile: d['thumb'] = crew.profile.geturl() +        m.people.append(d) +    for backdrop in movie.backdrops: +        m.images.append({'type':'fanart', 'url':backdrop.geturl(), +                        'thumb':backdrop.geturl(backdrop.sizes()[0])}) +    for poster in movie.posters: +        m.images.append({'type':'coverart', 'url':poster.geturl(), +                        'thumb':poster.geturl(poster.sizes()[0])}) +    tree.append(m.toXML()) +    sys.stdout.write(etree.tostring(tree, encoding='UTF-8', pretty_print=True, +                                    xml_declaration=True)) +    sys.exit() + +def buildList(query, opts): +    # TEMPORARY FIX: +    # replace all dashes from queries to work around search behavior +    # as negative to all text that comes afterwards +    query = query.replace('-',' ') + +    from MythTV.tmdb3 import searchMovie +    from MythTV import VideoMetadata +    from lxml import etree +    results = searchMovie(query) +    tree = etree.XML(u'<metadata></metadata>') +    mapping = [['runtime',      'runtime'],     ['title',       'originaltitle'], +               ['releasedate',  'releasedate'], ['tagline',     'tagline'], +               ['description',  'overview'],    ['homepage',    'homepage'], +               ['userrating',   'userrating'],  ['popularity',  'popularity']] + +    count = 0 +    for res in results: +        if res is None: +            continue + +        m = VideoMetadata() +        for i,j in mapping: +            if getattr(res, j): +                setattr(m, i, getattr(res, j)) +        m.inetref = str(res.id) + +        if res.title: +            m.title = res.title + +        #TODO: +        # should releasedate and year be pulled from the country-specific data +        # or should it be left to the default information to cut down on +        # traffic from searches +        if res.releasedate: +            m.year = res.releasedate.year +        if res.backdrop: +            b = res.backdrop +            m.images.append({'type':'fanart', 'url':b.geturl(), +                             'thumb':b.geturl(b.sizes()[0])}) +        if res.poster: +            p = res.poster +            m.images.append({'type':'coverart', 'url':p.geturl(), +                             'thumb':p.geturl(p.sizes()[0])}) +        tree.append(m.toXML()) +        count += 1 +        if count >= 60: +            # page limiter, dont want to overload the server +            break + +    sys.stdout.write(etree.tostring(tree, encoding='UTF-8', pretty_print=True, +                                    xml_declaration=True)) +    sys.exit(0) + +def buildCollection(inetref, opts): +    from MythTV.tmdb3 import Collection +    from MythTV import VideoMetadata +    from lxml import etree +    collection = Collection(inetref) +    tree = etree.XML(u'<metadata></metadata>') +    m = VideoMetadata() +    m.collectionref = str(collection.id) +    m.title = collection.name +    if collection.backdrop: +        b = collection.backdrop +        m.images.append({'type':'fanart', 'url':b.geturl(), +                  'thumb':b.geturl(b.sizes()[0])}) +    if collection.poster: +        p = collection.poster +        m.images.append({'type':'coverart', 'url':p.geturl(), +                  'thumb':p.geturl(p.sizes()[0])}) +    tree.append(m.toXML()) +    sys.stdout.write(etree.tostring(tree, encoding='UTF-8', pretty_print=True, +                                    xml_declaration=True)) +    sys.exit() + +def buildVersion(): +    from lxml import etree +    version = etree.XML(u'<grabber></grabber>') +    etree.SubElement(version, "name").text = __title__ +    etree.SubElement(version, "author").text = __author__ +    etree.SubElement(version, "thumbnail").text = 'tmdb.png' +    etree.SubElement(version, "command").text = 'tmdb3.py' +    etree.SubElement(version, "type").text = 'movie' +    etree.SubElement(version, "description").text = \ +                                'Search and metadata downloads for themoviedb.org' +    etree.SubElement(version, "version").text = __version__ +    sys.stdout.write(etree.tostring(version, encoding='UTF-8', pretty_print=True, +                                    xml_declaration=True)) +    sys.exit(0) + +def performSelfTest(): +    err = 0 +    try: +        import MythTV +    except: +        err = 1 +        print ("Failed to import MythTV bindings. Check your `configure` output " +               "to make sure installation was not disabled due to external " +               "dependencies") +    try: +        import MythTV.tmdb3 +    except: +        err = 1 +        print ("Failed to import PyTMDB3 library. This should have been included " +               "with the python MythTV bindings.") +    try: +        import lxml +    except: +        err = 1 +        print "Failed to import python lxml library." + +    if not err: +        print "Everything appears in order." +    sys.exit(err) + +def main(): +    parser = OptionParser() + +    parser.add_option('-v', "--version", action="store_true", default=False, +                      dest="version", help="Display version and author") +    parser.add_option('-t', "--test", action="store_true", default=False, +                      dest="test", help="Perform self-test for dependencies.") +    parser.add_option('-M', "--movielist", action="store_true", default=False, +                      dest="movielist", help="Get Movies matching search.") +    parser.add_option('-D', "--moviedata", action="store_true", default=False, +                      dest="moviedata", help="Get Movie data.") +    parser.add_option('-C', "--collection", action="store_true", default=False, +                      dest="collectiondata", help="Get Collection data.") +    parser.add_option('-l', "--language", metavar="LANGUAGE", default=u'en', +                      dest="language", help="Specify language for filtering.") +    parser.add_option('-a', "--area", metavar="COUNTRY", default=u'US', +                      dest="country", help="Specify country for custom data.") +    parser.add_option('--debug', action="store_true", default=False, +                      dest="debug", help=("Disable caching and enable raw " +                                          "data output.")) + +    opts, args = parser.parse_args() + +    if opts.version: +        buildVersion() + +    if opts.test: +        performSelfTest() + +    from MythTV.tmdb3 import set_key, set_cache, set_locale +    set_key('c27cb71cff5bd76e1a7a009380562c62') + +    if opts.debug: +        import MythTV.tmdb3 +        MythTV.tmdb3.request.DEBUG = True +        set_cache(engine='null') +    else: +        set_cache(engine='file', filename='~/.mythtv/pytmdb3.cache') + +    if opts.language: +        set_locale(language=opts.language, fallthrough=True) +    if opts.country: +        set_locale(country=opts.country, fallthrough=True) + +    if (len(args) != 1) or (args[0] == ''): +        sys.stdout.write('ERROR: tmdb3.py requires exactly one non-empty argument') +        sys.exit(1) + +    if opts.movielist: +        buildList(args[0], opts) + +    if opts.moviedata: +        buildSingle(args[0], opts) + +    if opts.collectiondata: +        buildCollection(args[0], opts) + +if __name__ == '__main__': +    main() diff --git a/abs/core/mythtv/stable-0.25/mythtv/tmdb3_db_update.py b/abs/core/mythtv/stable-0.25/mythtv/tmdb3_db_update.py new file mode 100755 index 0000000..22fc635 --- /dev/null +++ b/abs/core/mythtv/stable-0.25/mythtv/tmdb3_db_update.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python2 + +# This script will configure the myth db to use tmdb3.py + +from socket import gethostname +from MythTV import MythDB +mythdb = MythDB() +localhostname = gethostname() +import sys, os + +# Function to set db setting.  This setting is set in mythtv-setup. +def dbSettingChange(): +    if mythdb.settings.NULL.MovieGrabber == u'metadata/Movie/tmdb3.py': +        print 'The MythTV database setting MovieGrabber is already set to tmdb3.py.' +    else: +        mythdb.settings.NULL.MovieGrabber = u'metadata/Movie/tmdb3.py' +        print 'The MythTV database setting MovieGrabber has been updated to tmdb3.py' +    try: +        os.remove("/home/mythtv/.mythtv/pytmdb3.cache") +        print 'tmdb3 cache at /home/mythtv/.mythtv/pytmdb3.cache removed.' +    except OSError: +        print "tmdb3 cache at /home/mythtv/.mythtv/pytmdb3.cache doesn't exist." +        pass +    return + +#taken from systemconfig.py +#this is how you populate the dict +systemconfig = {} +file_name = "/etc/systemconfig" +try: +    config_file = open(file_name) +except: +    print file_name + ' could not be opened' +    sys.exit(1) + +for line in config_file: +    line = line.strip() +    if line and line[0] is not "#" and line[-1] is not "=": +        var, val = line.rsplit("=", 1) +        val = val.strip('"') +        systemconfig[var.strip()] = val.strip() + +#this is how you reference a value from mv_hostype.py +if (systemconfig.get("SystemType") == "Standalone"): +    dbSettingChange() +elif systemconfig.get("SystemType") == "Master_backend": +    dbSettingChange() diff --git a/abs/core/mythtv/stable-0.25/mythweb/PKGBUILD b/abs/core/mythtv/stable-0.25/mythweb/PKGBUILD index 5e1c853..9882ad8 100644 --- a/abs/core/mythtv/stable-0.25/mythweb/PKGBUILD +++ b/abs/core/mythtv/stable-0.25/mythweb/PKGBUILD @@ -1,6 +1,6 @@  pkgname=mythweb  pkgver=0.25 -pkgrel=6 +pkgrel=9  commit_hash=`cat ../git_src/git_hash_web` @@ -9,14 +9,14 @@ url="http://www.mythtv.org"  license="GPL"  arch=('i686' 'x86_64') -depends=('mythtv>=0.25' 'lighttpd' 'php' 'local-website') +depends=('mythtv>=0.25' 'lighttpd' 'php' 'supplemental-web')  groups=('mythtv-extras')  install=mythweb.install  #http://code.mythtv.org/trac/ticket/10504 -patches=(schedules.php.patch  sorting.php.patch  tv-schedules.php.patch) +#patches=(schedules.php.patch  sorting.php.patch  tv-schedules.php.patch) +patches=(schedules.php.patch   tv-schedules.php.patch)  source=(`echo ${patches[@]:0}` mythweb.include mythweb_gen_light.conf) -DOCROOT=/data/srv/httpd/mythweb  build() {     if [ -e ${srcdir}/mythweb ] @@ -34,7 +34,7 @@ build() {      msg "The local files are updated." -	cd $startdir/src/mythweb +	cd $srcdir/mythweb @@ -49,11 +49,14 @@ build() {  	[ "$CARCH" = "i686"   ] && ARCH="i686"  	[ "$CARCH" = "x86_64" ] && ARCH="x86-64" +} -	mkdir -p $startdir/pkg/$DOCROOT/{image_cache,php_sessions,data} -        rsync -arp --exclude .git --delete-excluded  $startdir/src/mythweb/* $startdir/pkg/$DOCROOT -	rm $startdir/pkg/$DOCROOT/README -	chown -R http:http $startdir/pkg/$DOCROOT +package() { +    DOCROOT=/data/srv/httpd/mythweb +	mkdir -p $pkgdir/$DOCROOT/{image_cache,php_sessions,data} +        rsync -arp --exclude .git --delete-excluded  $srcdir/mythweb/* $pkgdir/$DOCROOT +	rm $pkgdir/$DOCROOT/README +	chown -R http:http $pkgdir/$DOCROOT  	chmod g+rw $pkgdir/$DOCROOT/{image_cache,php_sessions,data}          # mythweb modules_path fix for 0.24 @@ -69,7 +72,6 @@ build() {  }  md5sums=('392e570594859c026ac12194920246d8' -         '53cc59d6a8bf144027b25d5dcbfffc66'           '515e29fda503c199888a91553e1815a0'           '7645a6399434cbba35639713ac5d88e0'           'df190116b3aba35720fb6631885f973f')  | 
