'Get the genre string for an Album or Item object based on
self.sources. Return a `(genre, source)` pair. The
prioritization order is:
- track (for Items only)
- album
- artist
- original
- fallback
- None'

def _get_genre(self, obj):

    if ((not self.config['force']) and self._is_allowed(obj.genre)):
        return (obj.genre, 'keep')
    if isinstance(obj, library.Item):
        if ('track' in self.sources):
            result = self.fetch_track_genre(obj)
            if result:
                return (result, 'track')
    if ('album' in self.sources):
        result = self.fetch_album_genre(obj)
        if result:
            return (result, 'album')
    if ('artist' in self.sources):
        result = None
        if isinstance(obj, library.Item):
            result = self.fetch_artist_genre(obj)
        elif (obj.albumartist != config['va_name'].as_str()):
            result = self.fetch_album_artist_genre(obj)
        else:
            item_genres = []
            for item in obj.items():
                item_genre = None
                if ('track' in self.sources):
                    item_genre = self.fetch_track_genre(item)
                if (not item_genre):
                    item_genre = self.fetch_artist_genre(item)
                if item_genre:
                    item_genres.append(item_genre)
            if item_genres:
                (result, _) = plurality(item_genres)
        if result:
            return (result, 'artist')
    if obj.genre:
        result = self._resolve_genres([obj.genre])
        if result:
            return (result, 'original')
    fallback = self.config['fallback'].get()
    if fallback:
        return (fallback, 'fallback')
    return (None, None)
