mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Add option to switch the git remote and branch
This commit is contained in:
parent
91716527a4
commit
d1551bd8c7
8 changed files with 169 additions and 29 deletions
|
@ -2588,7 +2588,10 @@ class WebInterface(object):
|
|||
"imgur_client_id": plexpy.CONFIG.IMGUR_CLIENT_ID,
|
||||
"cache_images": checked(plexpy.CONFIG.CACHE_IMAGES),
|
||||
"pms_version": plexpy.CONFIG.PMS_VERSION,
|
||||
"plexpy_auto_update": checked(plexpy.CONFIG.PLEXPY_AUTO_UPDATE)
|
||||
"plexpy_auto_update": checked(plexpy.CONFIG.PLEXPY_AUTO_UPDATE),
|
||||
"git_branch": plexpy.CONFIG.GIT_BRANCH,
|
||||
"git_path": plexpy.CONFIG.GIT_PATH,
|
||||
"git_remote": plexpy.CONFIG.GIT_REMOTE
|
||||
}
|
||||
|
||||
return serve_template(templatename="settings.html", title="Settings", config=config, kwargs=kwargs)
|
||||
|
@ -3342,6 +3345,19 @@ class WebInterface(object):
|
|||
plexpy.CONFIG.write()
|
||||
return self.do_state_change('update', 'Updating', 120)
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth(member_of("admin"))
|
||||
def checkout_git_branch(self, git_remote=None, git_branch=None, **kwargs):
|
||||
if git_branch == plexpy.CONFIG.GIT_BRANCH:
|
||||
logger.error(u"Already on the %s branch" % git_branch)
|
||||
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + "home")
|
||||
|
||||
# Set the new git remote and branch
|
||||
plexpy.CONFIG.__setattr__('GIT_REMOTE', git_remote)
|
||||
plexpy.CONFIG.__setattr__('GIT_BRANCH', git_branch)
|
||||
plexpy.CONFIG.write()
|
||||
return self.do_state_change('checkout', 'Switching Git Branches', 120)
|
||||
|
||||
@cherrypy.expose
|
||||
@requireAuth(member_of("admin"))
|
||||
def get_changelog(self, latest_only=False, update_shown=False, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue