wmcbrine / pytivo

pyTivo is both an HMO and GoBack server. Similar to TiVo Desktop pyTivo loads many standard video compression codecs and outputs mpeg2 video to the TiVo. However, pyTivo is able to load MANY more file types than TiVo Desktop.
http://pytivo.org/
127 stars 42 forks source link

episode handling incorrect #23

Closed rla123 closed 7 years ago

rla123 commented 7 years ago

running: Latest commit d4f090f on Jan 1.

pytivo incorrectly lists all shows as episodes (isEpisode="true") This is obviously wrong for movies.

pytivo no longer outputs episodeNumber is if truly is an episode. (i.e. a tv series)

wmcbrine commented 7 years ago

pyTivo presents the guide data as received. It does no manipulation nor verification of these fields.

wmcbrine commented 7 years ago

P.S. The episodeNumber field is not (and has never been) used in the TiVo's HDUI, only in the classic UI. That's why you can see a number onscreen (although in "Sea X, Ep Y" format), even if this field is unset. It's mostly a relic at this point.

rla123 commented 7 years ago

So this code in metadata.py is no longer used? It appears to be backwards (SH should be true and MV should be false). This is what made me think that pytivo is generating some metadata

    elif key == 'tven':
        #could be programId (EP, SH, or MV) or "SnEn"
        if value.startswith('SH'):
            metadata['isEpisode'] = 'false'
        elif value.startswith('MV') or value.startswith('EP'):
            metadata['isEpisode'] = 'true'
            metadata['programId'] = value
        elif key.startswith('S') and key.count('E') == 1:
            epstart = key.find('E')
            seasonstr = key[1:epstart]
            episodestr = key[epstart+1:]
            if (seasonstr.isdigit() and episodestr.isdigit()):
                if len(episodestr) < 2:
                    episodestr = '0' + episodestr

metadata['episodeNumber'] = seasonstr+epis

wmcbrine commented 7 years ago

Yes, it's used -- in the specific context of reading metadata from MP4 files, and not in any other situation. Is that your context? I should've asked for more info after your first post, but it sounded like you were talking about the ToGo module, i.e. text files being generated based on TiVo data when you download shows from the TiVo. This code would not be invoked in that situation.

wmcbrine commented 7 years ago

But... it does seem backwards, doesn't it? We'd have to ask Hugh Mackworth for clarification; he wrote that bit.

rla123 commented 7 years ago

Thank you. Just Tivo To Go.

I appreciate all of the work you do.