Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SiCKRAGE
sickrage
Commits
0972ec50
Commit
0972ec50
authored
Nov 10, 2018
by
echel0n
Browse files
Removed restoring of application ID from backup/restore functions
parent
2cfa68ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
changelog.md
View file @
0972ec50
# Changelog
-
*
9c6cc9e - 2018-11-10: Release v9.4.25
-
*
bce57f6 - 2018-11-10: Removed restoring of application ID from backup/restore functions
-
*
9cf70c3 - 2018-11-10: Release v9.4.25
-
*
af3348b - 2018-11-10: Refactored misc logging errors to warnings.
-
*
73acd71 - 2018-11-09: Release v9.4.24
-
*
ede2f85 - 2018-11-09: Added threaded event queue. Fixed duplicate notifications.
...
...
sickrage/core/helpers/__init__.py
View file @
0972ec50
...
...
@@ -45,7 +45,6 @@ import rarfile
import
requests
import
six
from
bs4
import
BeautifulSoup
from
configobj
import
ConfigObj
import
sickrage
from
sickrage.core.common
import
Quality
,
SKIPPED
,
WANTED
,
FAILED
,
UNAIRED
...
...
@@ -928,8 +927,7 @@ def create_zipfile(fileList, archive, arcname=None):
return
False
def
restoreConfigZip
(
archive
,
targetDir
,
restore_appid
=
True
,
restore_database
=
True
,
restore_config
=
True
,
restore_cache
=
True
):
def
restoreConfigZip
(
archive
,
targetDir
,
restore_database
=
True
,
restore_config
=
True
,
restore_cache
=
True
):
"""
Restores a backup ZIP file back in place
...
...
@@ -962,12 +960,6 @@ def restoreConfigZip(archive, targetDir, restore_appid=True, restore_database=Tr
zip_file
.
extract
(
member
,
targetDir
)
if
restore_config
and
not
restore_appid
:
cfg
=
ConfigObj
(
os
.
path
.
join
(
targetDir
,
'config.ini'
),
indent_type
=
' '
,
encoding
=
'utf8'
)
if
'app_id'
in
cfg
[
'General'
]:
del
cfg
[
'General'
][
'app_id'
]
cfg
.
write
()
return
True
except
Exception
as
e
:
sickrage
.
app
.
log
.
error
(
"Zip extraction error: {}"
.
format
(
e
))
...
...
sickrage/core/webserver/views.py
View file @
0972ec50
...
...
@@ -3905,19 +3905,18 @@ class ConfigBackupRestore(Config):
return
finalResult
@
staticmethod
def
restore
(
backupFile
=
None
,
restore_appid
=
None
,
restore_database
=
None
,
restore_config
=
None
,
restore_cache
=
None
):
def
restore
(
backupFile
=
None
,
restore_database
=
None
,
restore_config
=
None
,
restore_cache
=
None
):
finalResult
=
''
if
backupFile
:
source
=
backupFile
target_dir
=
os
.
path
.
join
(
sickrage
.
app
.
data_dir
,
'restore'
)
restore_appid
=
checkbox_to_value
(
restore_appid
)
restore_database
=
checkbox_to_value
(
restore_database
)
restore_config
=
checkbox_to_value
(
restore_config
)
restore_cache
=
checkbox_to_value
(
restore_cache
)
if
restoreConfigZip
(
source
,
target_dir
,
restore_appid
,
restore_database
,
restore_config
,
restore_cache
):
if
restoreConfigZip
(
source
,
target_dir
,
restore_database
,
restore_config
,
restore_cache
):
finalResult
+=
_
(
"Successfully extracted restore files to "
+
target_dir
)
finalResult
+=
_
(
"<br>Restart sickrage to complete the restore."
)
else
:
...
...
sickrage/core/webserver/views/config/backup_restore.mako
View file @
0972ec50
...
...
@@ -66,15 +66,6 @@
<br/>
<div class="form-row">
<div class="col-md-12">
<label for="restore_appid">
<input type="checkbox" class="toggle color-primary is-material" name="restore_appid" id="restore_appid" checked/>
${_('Restore application id (requires restoring config)')}
</label>
</div>
</div>
<div class="form-row">
<div class="col-md-12">
<label for="restore_database">
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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