예제 #1
0
def _saveextrafanart(mediatype, arttype):
    if not arttype_matches_base(arttype, 'fanart') or not split_arttype(arttype)[1]:
        return False
    if not mediatypes.downloadartwork(mediatype, 'fanart1'):
        return False
    return settings.save_extrafanart and mediatype in (mediatypes.MOVIE, mediatypes.TVSHOW) \
        or settings.save_extrafanart_mvids and mediatype == mediatypes.MUSICVIDEO
예제 #2
0
def get_downloadable_art(mediaitem, allartwork):
    if allartwork:
        downloadable = dict(mediaitem.art)
        downloadable.update(mediaitem.selectedart)
    else:
        downloadable = dict(mediaitem.selectedart)
    for arttype in list(downloadable):
        if not downloadable[arttype] or not downloadable[arttype].startswith('http') or \
                not mediatypes.downloadartwork(mediaitem.mediatype, arttype):
            del downloadable[arttype]
    return downloadable
예제 #3
0
def has_art_todownload(artmap, mediatype):
    return next(
        (True
         for arttype, url in artmap.items() if url and url.startswith('http')
         and mediatypes.downloadartwork(mediatype, arttype)), False)