Skip to content

Commit da11812

Browse files
authored
Merge pull request #583 from pkkid/clean_optimize
Updating cleanBundles() and optimize() methods
2 parents 114d907 + 5db6f49 commit da11812

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plexapi/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def cleanBundles(self):
110110
server will automatically clean up old bundles once a week as part of Scheduled Tasks.
111111
"""
112112
# TODO: Should this check the response for success or the correct mediaprefix?
113-
self._server.query('/library/clean/bundles')
113+
self._server.query('/library/clean/bundles?async=1', method=self._server._session.put)
114114

115115
def emptyTrash(self):
116116
""" If a library has items in the Library Trash, use this option to empty the Trash. """
@@ -122,7 +122,7 @@ def optimize(self):
122122
For example, if you have deleted or added an entire library or many items in a
123123
library, you may like to optimize the database.
124124
"""
125-
self._server.query('/library/optimize')
125+
self._server.query('/library/optimize?async=1', method=self._server._session.put)
126126

127127
def update(self):
128128
""" Scan this library for new items."""

0 commit comments

Comments
 (0)