Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ syntax: glob
.coverage
.idea/
.Python
.vscode
bin/
build
config.ini
Expand Down
12 changes: 2 additions & 10 deletions plexapi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,9 @@ def isFullObject(self):
""" Retruns True if this is already a full object. A full object means all attributes
were populated from the api path representing only this item. For example, the
search result for a movie often only contain a portion of the attributes a full
object (main url) for that movie contain.
object (main url) for that movie would contain.
"""
return not self.key or self.key == self._initpath
return not self.key or (self._details_key or self.key) == self._initpath

def isPartialObject(self):
""" Returns True if this is not a full object. """
Expand Down Expand Up @@ -612,14 +612,6 @@ def _loadData(self, data):
self.playlistItemID = utils.cast(int, data.attrib.get('playlistItemID')) # playlist
self.playQueueItemID = utils.cast(int, data.attrib.get('playQueueItemID')) # playqueue

def isFullObject(self):
""" Retruns True if this is already a full object. A full object means all attributes
were populated from the api path representing only this item. For example, the
search result for a movie often only contain a portion of the attributes a full
object (main url) for that movie contain.
"""
return self._details_key == self._initpath or not self.key

def getStreamURL(self, **params):
""" Returns a stream url that may be used by external applications such as VLC.

Expand Down
2 changes: 1 addition & 1 deletion plexapi/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ def modeUpdate(self, mode=None):
collection = 'plexapi.library.Collections'
collection.updateMode(mode="hide")
"""
mode_dict = {'default': '-2',
mode_dict = {'default': '-1',
'hide': '0',
'hideItems': '1',
'showItems': '2'}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_library_editAdvanced_default(movies):


def test_library_Collection_modeUpdate(collection):
mode_dict = {"default": "-2", "hide": "0", "hideItems": "1", "showItems": "2"}
mode_dict = {"default": "-1", "hide": "0", "hideItems": "1", "showItems": "2"}
for key, value in mode_dict.items():
collection.modeUpdate(key)
collection.reload()
Expand All @@ -269,7 +269,7 @@ def test_library_Colletion_edit(collection):
for field in collection.fields:
if field.name == 'titleSort':
assert collection.titleSort == 'New Title Sort'
assert field.locked == True
assert field.locked is True
collection.edit(**{'titleSort.value': collectionTitleSort, 'titleSort.locked': 0})


Expand Down
4 changes: 2 additions & 2 deletions tests/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ def test_video_edits_locked(movie, episode):
for field in movie.fields:
if field.name == 'titleSort':
assert movie.titleSort == 'New Title Sort'
assert field.locked == True
assert field.locked is True
movie.edit(**{'titleSort.value': movieTitleSort, 'titleSort.locked': 0})

episodeTitleSort = episode.titleSort
Expand All @@ -918,7 +918,7 @@ def test_video_edits_locked(movie, episode):
for field in episode.fields:
if field.name == 'titleSort':
assert episode.titleSort == 'New Title Sort'
assert field.locked == True
assert field.locked is True
episode.edit(**{'titleSort.value': episodeTitleSort, 'titleSort.locked': 0})


Expand Down