Ejemplo n.º 1
0
def ADD_MOVIE_ITEM(moviedata, onlyinfo=False, cmmode=0, export=False):
    asin, hd_asin, movietitle, trailer, poster, plot, director, writer, runtime, year, premiered, studio, mpaa, actors,\
     genres, stars, votes, fanart, isprime, isHD, isAdult, popularity, recent, audio = moviedata
    infoLabels = {'Title': movietitle,
                  'Plot': plot,
                  'mediatype': "movie",
                  'Cast': actors.split(',') if actors else [],
                  'Director': director,
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'MPAA': mpaa if mpaa else common.getString(30171),
                  'Studio': studio,
                  'Duration': int(runtime) * 60 if runtime else None,
                  'AudioChannels': audio,
                  'Thumb': poster,
                  'Fanart': fanart,
                  'isHD': isHD,
                  'isAdult': isAdult}
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_MOVIE(asin)
        return
    cm = [(common.getString(30180 + cmmode) % common.getString(30154),
          'RunPlugin(%s?mode=<common>&sitemode=<toogleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)),
          (common.getString(30185) % common.getString(30154),
          'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_MOVIE>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30186), 'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0])]
    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(movietitle, asin, poster, fanart, infoLabels=infoLabels, cm=cm, trailer=trailer, isAdult=isAdult, isHD=isHD)
Ejemplo n.º 2
0
def ADD_MOVIE_ITEM(moviedata, cmmode=0):
    asin, hd_asin, movietitle, trailer, poster, plot, director, writer, runtime, year, premiered, studio, mpaa, actors, genres, stars, votes, fanart, isprime, isHD, isAdult, popularity, recent, audio = moviedata
    infoLabels = {'Title': movietitle,
                  'Plot': plot,
                  'mediatype': "movie",
                  'Cast': actors.split(',') if actors else [],
                  'Director': director,
                  'Year': year,
                  'Premiered': premiered,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'mpaa': mpaa,
                  'Studio': studio,
                  'Duration': int(runtime) * 60,
                  'AudioChannels': audio,
                  'Thumb': poster,
                  'Fanart': fanart,
                  'isHD': isHD,
                  'isAdult': isAdult}
    asin = asin.split(',')[0]
    cm = []
    cm.append((common.getString(30180 + cmmode) % common.getString(30154), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toggleWatchlist>&asin=<%s>&remove=<%s>)' % (sys.argv[0], asin, cmmode)))
    cm.append((common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)))
    common.addVideo(movietitle, asin, poster, fanart, infoLabels=infoLabels, cm=cm, trailer=trailer, isAdult=isAdult, isHD=isHD)
Ejemplo n.º 3
0
def ADD_EPISODE_ITEM(episodedata):
    asin, seasonASIN, seriesASIN, seriestitle, season, episode, poster, mpaa, actors, genres, episodetitle, network, stars, votes, fanart, plot, airdate, year, runtime, isHD, isprime, isAdult, audio = episodedata
    tvfanart, tvposter = getFanart(seriesASIN)
    fanart = tvfanart if showfanart else fanart
    displayname = "{} - {}".format(episode, episodetitle).replace('"', '')
    infoLabels = {'Title': episodetitle,
                  'TVShowTitle': seriestitle,
                  'Episode': episode,
                  'mediatype': "episode",
                  'Season': season,
                  'Plot': plot,
                  'Premiered': airdate,
                  'Year': year,
                  'Duration': int(runtime) * 60 if runtime else None,
                  'MPAA': mpaa,
                  'Cast': actors.split(',') if actors else None,
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Studio': network,
                  'AudioChannels': audio,
                  'isAdult': isAdult,
                  'isHD': isHD,
                  'seriesASIN': seriesASIN,
                  }
    infoLabels = {k: v for k, v in infoLabels.items() if v}
    infoLabels['Fanart'] = fanart
    infoLabels['Thumb'] = poster
    infoLabels['Poster'] = tvposter
    asin = asin.split(',')[0]
    cm = [(common.getString(30183), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin))]
    common.addVideo(displayname, asin, poster, fanart, infoLabels=infoLabels, isAdult=isAdult, isHD=isHD, cm=cm)
Ejemplo n.º 4
0
def ADD_EPISODE_ITEM(episodedata, onlyinfo=False, export=False):
    asin,seasonASIN,seriesASIN,seriestitle,season,episode,poster,mpaa,actors,genres,episodetitle,network,stars,votes,fanart,plot,airdate,year,runtime,isHD,isprime,isAdult,audio = episodedata
    infoLabels={'Title': episodetitle,'TVShowTitle':seriestitle,
                'Episode': episode,'Season':season}
    if plot:
        infoLabels['Plot'] = plot
    if airdate:
        infoLabels['Premiered'] = airdate 
    if year:
        infoLabels['Year'] = year
    if runtime:
        infoLabels['Duration'] = runtime
    if mpaa:
        infoLabels['MPAA'] = mpaa
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if stars:
        infoLabels['Rating'] = stars           
    if votes:
        infoLabels['Votes'] = votes  
    if genres:
        infoLabels['Genre'] = genres 
    if network:
        infoLabels['Studio'] = network
    if audio:
        infoLabels['AudioChannels'] = audio
    if not fanart or fanart == common.na:
        fanart = poster

    displayname = str(episode) + ' - ' + episodetitle 
    displayname = displayname.replace('"','')
    tvfanart, tvposter = getFanart(seriesASIN)
    if showfanart == 'true': 
        fanart = tvfanart
    infoLabels['Fanart'] = fanart
    infoLabels['Thumb'] = poster
    infoLabels['Poster'] = tvposter
    infoLabels['Title'] = displayname
    infoLabels['isHD'] = isHD
    infoLabels['isAdult'] = isAdult
    infoLabels['seriesASIN'] = seriesASIN
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_EPISODE(asin)
        return
    cm = []
    cm.append((common.getString(30185) % common.getString(30173), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_EPISODE>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30186), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]))
    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(displayname,asin,poster,fanart,infoLabels=infoLabels,isAdult=isAdult,isHD=isHD,cm=cm)
Ejemplo n.º 5
0
def ADD_MOVIE_ITEM(moviedata, onlyinfo=False,cmmode=0, export=False):
    asin,hd_asin,movietitle,trailer,poster,plot,director,writer,runtime,year,premiered,studio,mpaa,actors,genres,stars,votes,fanart,isprime,isHD,isAdult,popularity,recent,audio = moviedata
    if not fanart or fanart == common.na:
        if poster:
            fanart = poster.replace('.jpg','._BO354,0,0,0_CR177,354,708,500_.jpg')
    infoLabels={'Title':movietitle}
    if plot:
        infoLabels['Plot'] = plot
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if director:
        infoLabels['Director'] = director
    if year:
        infoLabels['Year'] = year
    if premiered:
        infoLabels['Premiered'] = premiered
    if stars:
        infoLabels['Rating'] = stars
    if votes:
        infoLabels['Votes'] = votes  
    if genres:
        infoLabels['Genre'] = genres 
    if mpaa:
        infoLabels['mpaa'] = mpaa
    if studio:
        infoLabels['Studio'] = studio
    if runtime:
        infoLabels['Duration'] = runtime
    if audio:
        infoLabels['AudioChannels'] = audio
    if poster:
        infoLabels['Thumb'] = poster
    if fanart:
        infoLabels['Fanart'] = fanart
    infoLabels['isHD'] = isHD
    infoLabels['isAdult'] = isAdult
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_MOVIE(asin)
        return
    cm = []
    if cmmode == 1:
        cm.append((common.getString(30181) % common.getString(30154), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<removeWatchlist>&asin=<%s>)' % (sys.argv[0], asin)))
    else:
        cm.append((common.getString(30180) % common.getString(30154), 'XBMC.RunPlugin(%s?mode=<common>&sitemode=<addWatchlist>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30185) % common.getString(30154), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_MOVIE>&asin=<%s>)' % (sys.argv[0], asin)))
    cm.append((common.getString(30186), 'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0]))
    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(movietitle,asin,poster,fanart,infoLabels=infoLabels,cm=cm,trailer=trailer,isAdult=isAdult,isHD=isHD)
Ejemplo n.º 6
0
def ADD_EPISODE_ITEM(episodedata, onlyinfo=False, export=False):
    asin, seasonASIN, seriesASIN, seriestitle, season, episode, poster, mpaa, actors, genres, episodetitle, network, \
        stars, votes, fanart, plot, airdate, year, runtime, isHD, isprime, isAdult, audio = episodedata
    tvfanart, tvposter = getFanart(seriesASIN)
    fanart = tvfanart if showfanart else fanart
    displayname = "{} - {}".format(episode, episodetitle).replace('"', '')
    if episode == 0 and ':' in episodetitle:
        displayname = '- ' + episodetitle.split(':')[1].strip() + ' -'

    infoLabels = {'Title': displayname,
                  'TVShowTitle': seriestitle,
                  'Episode': episode,
                  'mediatype': 'episode',
                  'Season': season,
                  'Plot': plot,
                  'Premiered': airdate,
                  'Year': year,
                  'Duration': int(runtime) * 60 if runtime else None,
                  'MPAA': mpaa if mpaa else common.getString(30171),
                  'Cast': actors.split(',') if actors else [],
                  'Rating': stars,
                  'Votes': votes,
                  'Genre': genres,
                  'Studio': network,
                  'AudioChannels': audio,
                  'isAdult': isAdult,
                  'Thumb': poster,
                  'Fanart': fanart,
                  'isHD': isHD,
                  'seriesASIN': seriesASIN,
                  'Poster': tvposter
                  }
    asin = asin.split(',')[0]

    if export:
        xbmclibrary.EXPORT_EPISODE(asin)
        return

    cm = [(common.getString(30185) % common.getString(30173),
           'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_EPISODE>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30183),
           'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)' % (sys.argv[0], asin)),
          (common.getString(30186), 'RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' % sys.argv[0])]

    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(displayname, asin, poster, fanart, infoLabels=infoLabels, isAdult=isAdult, isHD=isHD, cm=cm)
Ejemplo n.º 7
0
def ADD_EPISODE_ITEM(episodedata):
    asin, seasonASIN, seriesASIN, seriestitle, season, episode, poster, mpaa, actors, genres, episodetitle, network, stars, votes, fanart, plot, airdate, year, runtime, isHD, isprime, isAdult, audio = episodedata
    tvfanart, tvposter = getFanart(seriesASIN)
    fanart = tvfanart if showfanart else fanart
    displayname = "{} - {}".format(episode, episodetitle).replace('"', '')
    infoLabels = {
        'Title': episodetitle,
        'TVShowTitle': seriestitle,
        'Episode': episode,
        'mediatype': "episode",
        'Season': season,
        'Plot': plot,
        'Premiered': airdate,
        'Year': year,
        'Duration': int(runtime) * 60 if runtime else None,
        'MPAA': mpaa,
        'Cast': actors.split(',') if actors else None,
        'Rating': stars,
        'Votes': votes,
        'Genre': genres,
        'Studio': network,
        'AudioChannels': audio,
        'isAdult': isAdult,
        'isHD': isHD,
        'seriesASIN': seriesASIN,
    }
    infoLabels = {k: v for k, v in infoLabels.items() if v}
    infoLabels['Fanart'] = fanart
    infoLabels['Thumb'] = poster
    infoLabels['Poster'] = tvposter
    asin = asin.split(',')[0]
    cm = [(common.getString(
        30183
    ), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)'
           % (sys.argv[0], asin))]
    common.addVideo(displayname,
                    asin,
                    poster,
                    fanart,
                    infoLabels=infoLabels,
                    isAdult=isAdult,
                    isHD=isHD,
                    cm=cm)
Ejemplo n.º 8
0
def ADD_MOVIE_ITEM(moviedata, cmmode=0):
    asin, hd_asin, movietitle, trailer, poster, plot, director, writer, runtime, year, premiered, studio, mpaa, actors, genres, stars, votes, fanart, isprime, isHD, isAdult, popularity, recent, audio = moviedata
    infoLabels = {
        'Title': movietitle,
        'Plot': plot,
        'mediatype': "movie",
        'Cast': actors.split(',') if actors else [],
        'Director': director,
        'Year': year,
        'Premiered': premiered,
        'Rating': stars,
        'Votes': votes,
        'Genre': genres,
        'mpaa': mpaa,
        'Studio': studio,
        'Duration': int(runtime) * 60,
        'AudioChannels': audio,
        'Thumb': poster,
        'Fanart': fanart,
        'isHD': isHD,
        'isAdult': isAdult
    }
    asin = asin.split(',')[0]
    cm = []
    cm.append((
        common.getString(30180 + cmmode) % common.getString(30154),
        'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toggleWatchlist>&asin=<%s>&remove=<%s>)'
        % (sys.argv[0], asin, cmmode)))
    cm.append((common.getString(
        30183
    ), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)'
               % (sys.argv[0], asin)))
    common.addVideo(movietitle,
                    asin,
                    poster,
                    fanart,
                    infoLabels=infoLabels,
                    cm=cm,
                    trailer=trailer,
                    isAdult=isAdult,
                    isHD=isHD)
Ejemplo n.º 9
0
def ADD_MOVIE_ITEM(moviedata, onlyinfo=False, cmmode=0, export=False):
    asin, hd_asin, movietitle, trailer, poster, plot, director, writer, runtime, year, premiered, studio, mpaa, actors, genres, stars, votes, fanart, isprime, isHD, isAdult, popularity, recent, audio = moviedata
    infoLabels = {'Title': movietitle}
    if plot:
        infoLabels['Plot'] = plot
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if director:
        infoLabels['Director'] = director
    if year:
        infoLabels['Year'] = year
    if premiered:
        infoLabels['Premiered'] = premiered
    if stars:
        infoLabels['Rating'] = stars
    if votes:
        infoLabels['Votes'] = votes
    if genres:
        infoLabels['Genre'] = genres
    if mpaa:
        infoLabels['mpaa'] = mpaa
    if studio:
        infoLabels['Studio'] = studio
    if runtime:
        infoLabels['Duration'] = int(runtime) * 60
    if audio:
        infoLabels['AudioChannels'] = audio
    if poster:
        infoLabels['Thumb'] = poster
    if fanart:
        infoLabels['Fanart'] = fanart
    infoLabels['isHD'] = isHD
    infoLabels['isAdult'] = isAdult
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_MOVIE(asin)
        return
    cm = []
    cm.append((
        common.getString(30180 + cmmode) % common.getString(30154),
        'XBMC.RunPlugin(%s?mode=<common>&sitemode=<toogleWatchlist>&asin=<%s>&remove=<%s>)'
        % (sys.argv[0], asin, cmmode)))
    cm.append((
        common.getString(30185) % common.getString(30154),
        'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_MOVIE>&asin=<%s>)'
        % (sys.argv[0], asin)))
    cm.append((common.getString(
        30183
    ), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)'
               % (sys.argv[0], asin)))
    cm.append(
        (common.getString(30186),
         'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' %
         sys.argv[0]))
    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(movietitle,
                        asin,
                        poster,
                        fanart,
                        infoLabels=infoLabels,
                        cm=cm,
                        trailer=trailer,
                        isAdult=isAdult,
                        isHD=isHD)
Ejemplo n.º 10
0
def ADD_EPISODE_ITEM(episodedata, onlyinfo=False, export=False):
    asin, seasonASIN, seriesASIN, seriestitle, season, episode, poster, mpaa, actors, genres, episodetitle, network, stars, votes, fanart, plot, airdate, year, runtime, isHD, isprime, isAdult, audio = episodedata
    infoLabels = {
        'Title': episodetitle,
        'TVShowTitle': seriestitle,
        'Episode': episode,
        'Season': season
    }
    if plot:
        infoLabels['Plot'] = plot
    if airdate:
        infoLabels['Premiered'] = airdate
    if year:
        infoLabels['Year'] = year
    if runtime:
        infoLabels['Duration'] = int(runtime) * 60
    if mpaa:
        infoLabels['MPAA'] = mpaa
    if actors:
        infoLabels['Cast'] = actors.split(',')
    if stars:
        infoLabels['Rating'] = stars
    if votes:
        infoLabels['Votes'] = votes
    if genres:
        infoLabels['Genre'] = genres
    if network:
        infoLabels['Studio'] = network
    if audio:
        infoLabels['AudioChannels'] = audio

    displayname = str(episode) + ' - ' + episodetitle
    displayname = displayname.replace('"', '')
    tvfanart, tvposter = getFanart(seriesASIN)
    if showfanart == 'true':
        fanart = tvfanart
    infoLabels['Fanart'] = fanart
    infoLabels['Thumb'] = poster
    infoLabels['Poster'] = tvposter
    infoLabels['Title'] = displayname
    infoLabels['isHD'] = isHD
    infoLabels['isAdult'] = isAdult
    infoLabels['seriesASIN'] = seriesASIN
    asin = asin.split(',')[0]
    if export:
        xbmclibrary.EXPORT_EPISODE(asin)
        return
    cm = []
    cm.append((
        common.getString(30185) % common.getString(30173),
        'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<EXPORT_EPISODE>&asin=<%s>)'
        % (sys.argv[0], asin)))
    cm.append((common.getString(
        30183
    ), 'Container.Update(%s?mode=<appfeed>&sitemode=<getSimilarities>&asin=<%s>)'
               % (sys.argv[0], asin)))
    cm.append(
        (common.getString(30186),
         'XBMC.RunPlugin(%s?mode=<xbmclibrary>&sitemode=<UpdateLibrary>)' %
         sys.argv[0]))
    if onlyinfo:
        return infoLabels
    else:
        common.addVideo(displayname,
                        asin,
                        poster,
                        fanart,
                        infoLabels=infoLabels,
                        isAdult=isAdult,
                        isHD=isHD,
                        cm=cm)