Pluralize function name; Its more clear more than one thing is being deleted

This commit is contained in:
Michael Shepanski 2017-02-19 22:51:17 -05:00
parent ebdc875a06
commit 228f049190
2 changed files with 11 additions and 13 deletions

View file

@ -137,13 +137,12 @@ class Library(PlexObject):
"""
self._server.query('/library/sections/all/refresh?force=1')
def deleteMediaPreview(self):
""" Delete the preview thumbnails for the all librarys.
This cannot be undone. Recreating media preview files can take hours
or even days.
def deleteMediaPreviews(self):
""" Delete the preview thumbnails for the all sections. This cannot be
undone. Recreating media preview files can take hours or even days.
"""
for section in self.sections():
section.deleteMediaPreview()
section.deleteMediaPreviews()
class LibrarySection(PlexObject):
@ -261,10 +260,9 @@ class LibrarySection(PlexObject):
key = '/library/sections/%s/refresh?force=1' % self.key
self._server.query(key)
def deleteMediaPreview(self):
""" Delete the preview thumbnails for items in this library
This cannot be undone. Recreating media preview files can take hours
or even days.
def deleteMediaPreviews(self):
""" Delete the preview thumbnails for items in this library. This cannot
be undone. Recreating media preview files can take hours or even days.
"""
key = '/library/sections/%s/indexes' % self.key
self._server.query(key, method=self._server._session.delete)

View file

@ -99,8 +99,8 @@ def test_library_Library_cancelUpdate(pms):
pms.library.cancelUpdate()
def test_library_Library_deleteMediaPreview(pms):
pms.library.deleteMediaPreview()
def test_library_Library_deleteMediaPreviews(pms):
pms.library.deleteMediaPreviews()
def _test_library_MovieSection_refresh(a_movie_section):
@ -114,8 +114,8 @@ def test_library_MovieSection_update(a_movie_section):
def test_library_MovieSection_cancelUpdate(a_movie_section):
a_movie_section.cancelUpdate()
def test_librarty_deleteMediaPreview(a_movie_section):
a_movie_section.deleteMediaPreview()
def test_librarty_deleteMediaPreviews(a_movie_section):
a_movie_section.deleteMediaPreviews()
def _test_library_MovieSection_refresh(a_movie_section):