def media_kind(kind): """Convert iTunes media kind to API representation.""" if kind in [1]: return MediaType.Unknown if kind in [3, 7, 11, 12, 13, 18, 32]: return MediaType.Video if kind in [2, 4, 10, 14, 17, 21, 36]: return MediaType.Music if kind in [8, 64]: return MediaType.TV raise exceptions.UnknownMediaKind('Unknown media kind: ' + str(kind))
def media_kind(kind): """Convert iTunes media kind to API representation.""" if kind in [1]: return const.MEDIA_TYPE_UNKNOWN elif kind in [3, 7, 11, 12, 13, 18, 32]: return const.MEDIA_TYPE_VIDEO elif kind in [2, 4, 10, 14, 17, 21, 36]: return const.MEDIA_TYPE_MUSIC elif kind in [8, 64]: return const.MEDIA_TYPE_TV raise exceptions.UnknownMediaKind('Unknown media kind: ' + str(kind))
def media_kind(kind): """Convert iTunes media kind to API representation.""" print('Media type={0}'.format(str(kind))) if kind in [0]: return const.MEDIA_TYPE_NONE if kind in [1]: return const.MEDIA_TYPE_UNKNOWN if kind in [2, 7, 11, 12, 13, 18, 32]: return const.MEDIA_TYPE_VIDEO if kind in [3, 4, 10, 14, 17, 21, 36]: return const.MEDIA_TYPE_MUSIC if kind in [8, 64]: return const.MEDIA_TYPE_TV raise exceptions.UnknownMediaKind('Unknown media kind: ' + str(kind))