'Determines the quality of the file that is being post processed, first by checking if it is directly
available in the TVEpisode\'s status or otherwise by parsing through the data available.
:param ep_obj: The TVEpisode object related to the file we are post processing
:return: A quality value found in Quality'

def _get_quality(self, ep_obj):

    if (ep_obj.status in ((Quality.SNATCHED + Quality.SNATCHED_PROPER) + Quality.SNATCHED_BEST)):
        (_, ep_quality) = Quality.splitCompositeStatus(ep_obj.status)
        if (ep_quality != Quality.UNKNOWN):
            self._log((u'The    old    status    had    a    quality    in    it,    using    that:    ' + Quality.qualityStrings[ep_quality]), sickrage.srCore.srLogger.DEBUG)
            return ep_quality
    name_list = [self.nzb_name, self.folder_name, self.file_name]
    for cur_name in name_list:
        if (not cur_name):
            continue
        ep_quality = Quality.nameQuality(cur_name, ep_obj.show.is_anime)
        self._log((((u'Looking    up    quality    for    name    ' + cur_name) + u',    got    ') + Quality.qualityStrings[ep_quality]), sickrage.srCore.srLogger.DEBUG)
        if (ep_quality != Quality.UNKNOWN):
            sickrage.srCore.srLogger.debug((((cur_name + u'    looks    like    it    has    quality    ') + Quality.qualityStrings[ep_quality]) + u',    using    that'))
            return ep_quality
    if (ep_obj.status in ((Quality.SNATCHED + Quality.SNATCHED_PROPER) + Quality.SNATCHED_BEST)):
        (_, ep_quality) = Quality.splitCompositeStatus(ep_obj.status)
        if (ep_quality != Quality.UNKNOWN):
            self._log((u'The    old    status    had    a    quality    in    it,    using    that:    ' + Quality.qualityStrings[ep_quality]), sickrage.srCore.srLogger.DEBUG)
            return ep_quality
    ep_quality = Quality.nameQuality(self.file_path)
    self._log((((u'Guessing    quality    for    name    ' + self.file_name) + u',    got    ') + Quality.qualityStrings[ep_quality]), sickrage.srCore.srLogger.DEBUG)
    if (ep_quality != Quality.UNKNOWN):
        sickrage.srCore.srLogger.debug((((self.file_name + u'    looks    like    it    has    quality    ') + Quality.qualityStrings[ep_quality]) + u',    using    that'))
    return ep_quality
