diff --git a/plexapi/library.py b/plexapi/library.py index 569645e1..9c705f4c 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -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) diff --git a/tests/test_library.py b/tests/test_library.py index 3f3907d1..99f2bdfa 100644 --- a/tests/test_library.py +++ b/tests/test_library.py @@ -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):