Ejemplo n.º 1
0
 def _setData(self, data):
     Audio._setData(self, data)
     if self.isFullObject():
         self.countries = plexobjects.PlexItemList(data,
                                                   media.Country,
                                                   media.Country.TYPE,
                                                   server=self.server)
         self.genres = plexobjects.PlexItemList(data,
                                                media.Genre,
                                                media.Genre.TYPE,
                                                server=self.server)
         self.similar = plexobjects.PlexItemList(data,
                                                 media.Similar,
                                                 media.Similar.TYPE,
                                                 server=self.server)
Ejemplo n.º 2
0
 def _setData(self, data):
     Audio._setData(self, data)
     if self.isFullObject():
         self.genres = plexobjects.PlexItemList(data,
                                                media.Genre,
                                                media.Genre.TYPE,
                                                server=self.server)
Ejemplo n.º 3
0
 def _setData(self, data):
     Video._setData(self, data)
     if self.isFullObject():
         self.genres = plexobjects.PlexItemList(data,
                                                media.Genre,
                                                media.Genre.TYPE,
                                                server=self.server)
         self.roles = plexobjects.PlexItemList(data,
                                               media.Role,
                                               media.Role.TYPE,
                                               server=self.server,
                                               container=self.container)
         self.related = plexobjects.PlexItemList(data.find('Related'),
                                                 plexlibrary.Hub,
                                                 plexlibrary.Hub.TYPE,
                                                 server=self.server,
                                                 container=self)
         self.extras = PlexVideoItemList(data.find('Extras'),
                                         initpath=self.initpath,
                                         server=self.server,
                                         container=self)
Ejemplo n.º 4
0
 def _setData(self, data):
     Video._setData(self, data)
     # Mark: added to get genre on series grandparent item which is not a fullobject.
     self.genres = plexobjects.PlexItemList(data,
                                            media.Genre,
                                            media.Genre.TYPE,
                                            server=self.server)
     if self.isFullObject():
         self.roles = plexobjects.PlexItemList(data,
                                               media.Role,
                                               media.Role.TYPE,
                                               server=self.server,
                                               container=self.container)
         self.related = plexobjects.PlexItemList(data.find('Related'),
                                                 plexlibrary.Hub,
                                                 plexlibrary.Hub.TYPE,
                                                 server=self.server,
                                                 container=self)
         self.extras = PlexVideoItemList(data.find('Extras'),
                                         initpath=self.initpath,
                                         server=self.server,
                                         container=self)
Ejemplo n.º 5
0
    def _setData(self, data):
        PlayableVideo._setData(self, data)
        if self.isFullObject():
            self.directors = plexobjects.PlexItemList(data,
                                                      media.Director,
                                                      media.Director.TYPE,
                                                      server=self.server)
            self.media = plexobjects.PlexMediaItemList(data,
                                                       plexmedia.PlexMedia,
                                                       media.Media.TYPE,
                                                       initpath=self.initpath,
                                                       server=self.server,
                                                       media=self)
            self.writers = plexobjects.PlexItemList(data,
                                                    media.Writer,
                                                    media.Writer.TYPE,
                                                    server=self.server)
        else:
            if data.find(media.Media.TYPE) is not None:
                self.media = plexobjects.PlexMediaItemList(
                    data,
                    plexmedia.PlexMedia,
                    media.Media.TYPE,
                    initpath=self.initpath,
                    server=self.server,
                    media=self)

        self._videoStreams = None
        self._audioStreams = None
        self._subtitleStreams = None

        # data for active sessions
        self.sessionKey = plexobjects.PlexValue(
            data.attrib.get('sessionKey', ''), self)
        self.user = self._findUser(data)
        self.player = self._findPlayer(data)
        self.transcodeSession = self._findTranscodeSession(data)
Ejemplo n.º 6
0
    def _setData(self, data):
        Audio._setData(self, data)
        if self.isFullObject():
            self.moods = plexobjects.PlexItemList(data,
                                                  media.Mood,
                                                  media.Mood.TYPE,
                                                  server=self.server)
            self.media = plexobjects.PlexMediaItemList(data,
                                                       plexmedia.PlexMedia,
                                                       media.Media.TYPE,
                                                       initpath=self.initpath,
                                                       server=self.server,
                                                       media=self)

        # data for active sessions
        self.user = self._findUser(data)
        self.player = self._findPlayer(data)
        self.transcodeSession = self._findTranscodeSession(data)
Ejemplo n.º 7
0
    def _setData(self, data):
        PlayableVideo._setData(self, data)
        if self.isFullObject():
            self.collections = plexobjects.PlexItemList(data,
                                                        media.Collection,
                                                        media.Collection.TYPE,
                                                        server=self.server)
            self.countries = plexobjects.PlexItemList(data,
                                                      media.Country,
                                                      media.Country.TYPE,
                                                      server=self.server)
            self.directors = plexobjects.PlexItemList(data,
                                                      media.Director,
                                                      media.Director.TYPE,
                                                      server=self.server)
            self.genres = plexobjects.PlexItemList(data,
                                                   media.Genre,
                                                   media.Genre.TYPE,
                                                   server=self.server)
            self.media = plexobjects.PlexMediaItemList(data,
                                                       plexmedia.PlexMedia,
                                                       media.Media.TYPE,
                                                       initpath=self.initpath,
                                                       server=self.server,
                                                       media=self)
            self.producers = plexobjects.PlexItemList(data,
                                                      media.Producer,
                                                      media.Producer.TYPE,
                                                      server=self.server)
            self.roles = plexobjects.PlexItemList(data,
                                                  media.Role,
                                                  media.Role.TYPE,
                                                  server=self.server,
                                                  container=self.container)
            self.writers = plexobjects.PlexItemList(data,
                                                    media.Writer,
                                                    media.Writer.TYPE,
                                                    server=self.server)
            self.related = plexobjects.PlexItemList(data.find('Related'),
                                                    plexlibrary.Hub,
                                                    plexlibrary.Hub.TYPE,
                                                    server=self.server,
                                                    container=self)
        else:
            if data.find(media.Media.TYPE) is not None:
                self.media = plexobjects.PlexMediaItemList(
                    data,
                    plexmedia.PlexMedia,
                    media.Media.TYPE,
                    initpath=self.initpath,
                    server=self.server,
                    media=self)

        self._videoStreams = None
        self._audioStreams = None
        self._subtitleStreams = None

        # data for active sessions
        self.sessionKey = plexobjects.PlexValue(
            data.attrib.get('sessionKey', ''), self)
        self.user = self._findUser(data)
        self.player = self._findPlayer(data)
        self.transcodeSession = self._findTranscodeSession(data)