'Return The quality from the scene episode File
:param name: Episode filename to analyse
:param anime: Boolean to indicate if the show we\'re resolving is Anime
:return: Quality'

@staticmethod
def scene_quality(name, anime=False):

    if (not name):
        return Quality.UNKNOWN
    name = ek(path.basename, name)
    result = None
    ep = EpisodeTags(name)
    if anime:
        sd_options = tags.anime_sd.search(name)
        hd_options = tags.anime_hd.search(name)
        full_hd = tags.anime_fullhd.search(name)
        ep.rex['bluray'] = tags.anime_bluray
        if (ep.bluray and (full_hd or hd_options)):
            result = (Quality.FULLHDBLURAY if full_hd else Quality.HDBLURAY)
        elif ((not ep.bluray) and (full_hd or hd_options)):
            result = (Quality.FULLHDTV if full_hd else Quality.HDTV)
        elif ep.dvd:
            result = Quality.SDDVD
        elif sd_options:
            result = Quality.SDTV
        return (Quality.UNKNOWN if (result is None) else result)
    if ((ep.vres in [2160, 4320]) and (ep.scan == u'p')):
        full_res = (ep.vres == 4320)
        if (ep.avc and ep.bluray):
            result = (Quality.UHD_4K_BLURAY if (not full_res) else Quality.UHD_8K_BLURAY)
        elif ((ep.avc and ep.itunes) or ep.web):
            result = (Quality.UHD_4K_WEBDL if (not full_res) else Quality.UHD_8K_WEBDL)
        elif (ep.avc and (ep.tv == u'hd')):
            result = (Quality.UHD_4K_TV if (not full_res) else Quality.UHD_8K_TV)
    elif (ep.vres in [1080, 720]):
        if (ep.scan == u'p'):
            full_res = (ep.vres == 1080)
            if (ep.avc and (ep.bluray or ep.hddvd)):
                result = (Quality.FULLHDBLURAY if full_res else Quality.HDBLURAY)
            elif ((ep.avc and ep.itunes) or ep.web):
                result = (Quality.FULLHDWEBDL if full_res else Quality.HDWEBDL)
            elif (ep.avc and (ep.tv == u'hd')):
                result = (Quality.FULLHDTV if full_res else Quality.HDTV)
            elif all([(ep.vres == 1080), (ep.tv == u'hd'), ep.mpeg]):
                result = Quality.RAWHDTV
            elif all([(ep.vres == 720), (ep.tv == u'hd'), ep.mpeg]):
                result = Quality.RAWHDTV
        elif ((ep.res == u'1080i') and (ep.tv == u'hd') and (ep.mpeg or (ep.raw and ep.avc_non_free))):
            result = Quality.RAWHDTV
    elif ep.hrws:
        result = Quality.HDTV
    elif (ep.xvid or ep.avc):
        if (ep.dvd or ep.bluray):
            result = Quality.SDDVD
        elif ((ep.res == u'480p') or any([ep.tv, ep.sat, ep.web])):
            result = Quality.SDTV
    elif ep.dvd:
        result = Quality.SDDVD
    elif ep.tv:
        result = Quality.SDTV
    return (Quality.UNKNOWN if (result is None) else result)
