Skip to content

Commit 08bdab2

Browse files
committed
Rename server checkForUpdate to camelCase
* Add deprecation warning to check_for_update
1 parent 6d42030 commit 08bdab2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

plexapi/server.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from plexapi.playlist import Playlist
1616
from plexapi.playqueue import PlayQueue
1717
from plexapi.settings import Settings
18-
from plexapi.utils import cast
18+
from plexapi.utils import cast, deprecated
1919
from requests.status_codes import _codes as codes
2020

2121
# Need these imports to populate utils.PLEXOBJECTS
@@ -374,7 +374,11 @@ def downloadLogs(self, savepath=None, unpack=False):
374374
filepath = utils.download(url, self._token, None, savepath, self._session, unpack=unpack)
375375
return filepath
376376

377+
@deprecated('use "checkForUpdate" instead')
377378
def check_for_update(self, force=True, download=False):
379+
return self.checkForUpdate()
380+
381+
def checkForUpdate(self, force=True, download=False):
378382
""" Returns a :class:`~plexapi.base.Release` object containing release info.
379383
380384
Parameters:
@@ -390,15 +394,15 @@ def check_for_update(self, force=True, download=False):
390394

391395
def isLatest(self):
392396
""" Check if the installed version of PMS is the latest. """
393-
release = self.check_for_update(force=True)
397+
release = self.checkForUpdate(force=True)
394398
return release is None
395399

396400
def installUpdate(self):
397401
""" Install the newest version of Plex Media Server. """
398402
# We can add this but dunno how useful this is since it sometimes
399403
# requires user action using a gui.
400404
part = '/updater/apply'
401-
release = self.check_for_update(force=True, download=True)
405+
release = self.checkForUpdate(force=True, download=True)
402406
if release and release.version != self.version:
403407
# figure out what method this is..
404408
return self.query(part, method=self._session.put)

0 commit comments

Comments
 (0)