From fbaa89933e1e061f5b12895f56eb19e6bd10268a Mon Sep 17 00:00:00 2001 From: Michael Shepanski Date: Tue, 22 Mar 2016 23:42:04 -0400 Subject: [PATCH] I missed deleting an old occurance of getStreamURL --- plexapi/video.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/plexapi/video.py b/plexapi/video.py index e10fcb68..f32ed95a 100644 --- a/plexapi/video.py +++ b/plexapi/video.py @@ -2,10 +2,7 @@ """ PlexVideo """ -import re from plexapi import media, utils -from plexapi.compat import urlencode -from plexapi.exceptions import Unsupported NA = utils.NA @@ -33,29 +30,6 @@ class Video(utils.PlexPartialObject): """ self.server.query('/%s/analyze' % self.key) - def getStreamUrl(self, offset=0, maxVideoBitrate=None, videoResolution=None, **kwargs): - """ Fetch URL to stream video directly. - offset: Start time (in seconds) video will initiate from (ex: 300). - maxVideoBitrate: Max bitrate video and audio stream (ex: 64). - videoResolution: Max resolution of a video stream (ex: 1280x720). - params: Dict of additional parameters to include in URL. - """ - if self.TYPE not in [Movie.TYPE, Episode.TYPE]: - raise Unsupported('Cannot get stream URL for %s.' % self.TYPE) - params = {} - params['path'] = self.key - params['offset'] = offset - params['copyts'] = kwargs.get('copyts', 1) - params['mediaIndex'] = kwargs.get('mediaIndex', 0) - params['X-Plex-Platform'] = kwargs.get('platform', 'Chrome') - if 'protocol' in kwargs: - params['protocol'] = kwargs['protocol'] - if maxVideoBitrate: - params['maxVideoBitrate'] = max(maxVideoBitrate, 64) - if videoResolution and re.match('^\d+x\d+$', videoResolution): - params['videoResolution'] = videoResolution - return self.server.url('/video/:/transcode/universal/start.m3u8?%s' % urlencode(params)) - def markWatched(self): path = '/:/scrobble?key=%s&identifier=com.plexapp.plugins.library' % self.ratingKey self.server.query(path)