Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
sickrage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
SiCKRAGE
sickrage
Commits
fcdd0e05
Commit
fcdd0e05
authored
Nov 12, 2018
by
echel0n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more UI notifications for version updater.
parent
971fc673
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
changelog.md
changelog.md
+2
-1
sickrage/core/version_updater.py
sickrage/core/version_updater.py
+14
-10
No files found.
changelog.md
View file @
fcdd0e05
# Changelog
-
*
291913e - 2018-11-12: Pre-Release v9.4.31.dev5
-
*
2a2e9cf - 2018-11-12: Added more UI notifications for version updater.
-
*
971fc67 - 2018-11-12: Pre-Release v9.4.31.dev5
-
*
4d0d839 - 2018-11-12: Pre-Release v9.4.31.dev4
-
*
12f8ad6 - 2018-11-12: Pre-Release v9.4.31.dev3
-
*
82115fc - 2018-11-12: Pre-Release v9.4.31.dev2
...
...
sickrage/core/version_updater.py
View file @
fcdd0e05
...
...
@@ -63,21 +63,21 @@ class VersionUpdater(object):
return
sickrage
.
app
.
log
.
info
(
"New update found for SiCKRAGE, starting auto-updater ..."
)
sickrage
.
app
.
alerts
.
message
(
_
(
'New update found for SiCKRAGE, starting auto-updater'
))
sickrage
.
app
.
alerts
.
message
(
_
(
'
Updater'
),
_
(
'
New update found for SiCKRAGE, starting auto-updater'
))
if
self
.
update
():
sickrage
.
app
.
log
.
info
(
"Update was successful!"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Update was successful'
))
sickrage
.
app
.
alerts
.
message
(
_
(
'Update
r'
),
_
(
'Update
was successful'
))
sickrage
.
app
.
shutdown
(
restart
=
True
)
else
:
sickrage
.
app
.
log
.
info
(
"Update failed!"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Update failed!'
))
sickrage
.
app
.
alerts
.
error
(
_
(
'Updater'
),
_
(
'Update failed!'
))
finally
:
self
.
amActive
=
False
def
backup
(
self
):
# Do a system backup before update
sickrage
.
app
.
log
.
info
(
"Config backup in progress..."
)
sickrage
.
app
.
alerts
.
message
(
_
(
'
Backup
'
),
_
(
'Config backup in progress...'
))
sickrage
.
app
.
alerts
.
message
(
_
(
'
Updater
'
),
_
(
'Config backup in progress...'
))
try
:
backupDir
=
os
.
path
.
join
(
sickrage
.
app
.
data_dir
,
'backup'
)
if
not
os
.
path
.
isdir
(
backupDir
):
...
...
@@ -85,25 +85,27 @@ class VersionUpdater(object):
if
backupSR
(
backupDir
,
keep_latest
=
True
):
sickrage
.
app
.
log
.
info
(
"Config backup successful, updating..."
)
sickrage
.
app
.
alerts
.
message
(
_
(
'
Backup
'
),
_
(
'Config backup successful, updating...'
))
sickrage
.
app
.
alerts
.
message
(
_
(
'
Updater
'
),
_
(
'Config backup successful, updating...'
))
return
True
else
:
sickrage
.
app
.
log
.
warning
(
"Config backup failed, aborting update"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Backup
'
),
_
(
'Config backup failed, aborting update'
))
sickrage
.
app
.
alerts
.
error
(
_
(
'Updater
'
),
_
(
'Config backup failed, aborting update'
))
return
False
except
Exception
as
e
:
sickrage
.
app
.
log
.
warning
(
'Update: Config backup failed. Error: {}'
.
format
(
e
))
sickrage
.
app
.
alerts
.
message
(
_
(
'Backup
'
),
_
(
'Config backup failed, aborting update'
))
sickrage
.
app
.
alerts
.
error
(
_
(
'Updater
'
),
_
(
'Config backup failed, aborting update'
))
return
False
@
staticmethod
def
safe_to_update
():
if
sickrage
.
app
.
auto_postprocessor
.
amActive
:
sickrage
.
app
.
log
.
debug
(
"We can't proceed with updating, post-processor is running"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Updater'
),
_
(
"We can't proceed with updating, post-processor is running"
))
return
False
sickrage
.
app
.
show_queue
.
pause
()
sickrage
.
app
.
log
.
debug
(
"Waiting for show queue jobs to finish"
)
sickrage
.
app
.
log
.
debug
(
"Waiting for jobs in show queue to finish before updating"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Updater'
),
_
(
"Waiting for jobs in show queue to finish before updating"
))
while
sickrage
.
app
.
show_queue
.
is_busy
:
sleep
(
1
)
...
...
@@ -182,8 +184,8 @@ class VersionUpdater(object):
return
True
if
webui
:
sickrage
.
app
.
alerts
.
error
(
_
(
"Update
Failed
"
),
_
(
"Update wasn't successful, not restarting. Check your "
"log for more information."
))
sickrage
.
app
.
alerts
.
error
(
_
(
"Update
r
"
),
_
(
"Update wasn't successful, not restarting. Check your "
"log for more information."
))
@
property
def
version
(
self
):
...
...
@@ -474,6 +476,7 @@ class GitUpdateManager(UpdateManager):
self
.
current_branch
))
if
exit_status
==
0
:
sickrage
.
app
.
log
.
info
(
"Updating SiCKRAGE from GIT servers"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Updater'
),
_
(
'Updating SiCKRAGE from GIT servers'
))
Notifiers
.
mass_notify_version_update
(
self
.
get_newest_version
)
self
.
install_requirements
()
return
True
...
...
@@ -749,6 +752,7 @@ class PipUpdateManager(UpdateManager):
__
,
__
,
exit_status
=
self
.
_pip_cmd
(
self
.
_pip_path
,
'install -U --no-cache-dir sickrage'
)
if
exit_status
==
0
:
sickrage
.
app
.
log
.
info
(
"Updating SiCKRAGE from PyPi servers"
)
sickrage
.
app
.
alerts
.
message
(
_
(
'Updater'
),
_
(
'Updating SiCKRAGE from PyPi servers'
))
Notifiers
.
mass_notify_version_update
(
self
.
get_newest_version
)
return
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment