Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
8998be51
Commit
8998be51
authored
Jan 17, 2020
by
Francesc Guasch
Browse files
fix(install): upgrade screenshots from previous releases
parent
5593973c
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
8998be51
...
...
@@ -2539,19 +2539,26 @@ sub _cmd_copy_screenshot {
}
}
sub
_upgrade_screenshots
()
{
sub
_upgrade_screenshots
(
$self
) {
my
$self
=
shift
;
my
$id
=
shift
or
confess
"
ERROR: missing argument id
";
my
$sth
=
$CONNECTOR
->
dbh
->
prepare
("
SELECT file_screenshot FROM domains WHERE id=?
");
$sth
->
execute
(
$id
);
my
(
$file_path
)
=
$sth
->
fetchrow
;
my
$sth
=
$CONNECTOR
->
dbh
->
prepare
(
"
SELECT id, name, file_screenshot FROM domains WHERE file_screenshot like '%'
"
);
$sth
->
execute
();
my
$file
=
new
Image::Magick::
Q16
;
$file
->
Read
(
$file_path
);
$self
->
_data
(
screenshot
=>
encode_base64
(
$file
));
my
$sth_update
=
$CONNECTOR
->
dbh
->
prepare
(
"
UPDATE domains set screenshot = ? WHERE id=?
"
);
while
(
my
(
$id
,
$name
,
$file_path
)
=
$sth
->
fetchrow
)
{
next
if
!
-
e
$file_path
;
warn
"
INFO: converting screenshot from
$name
";
my
$file
=
new
Image::Magick::
Q16
;
$file
->
Read
(
$file_path
);
eval
{
$sth_update
->
execute
(
encode_base64
(
$file
),
$id
);
};
warn
$@
;
}
}
sub
_cmd_create
{
...
...
lib/Ravada/WebSocket.pm
View file @
8998be51
...
...
@@ -10,7 +10,7 @@ use Moose;
no
warnings
"
experimental::signatures
";
use
feature
qw(signatures)
;
my
$DEBUG
=
1
;
my
$DEBUG
=
0
;
has
clients
=>
(
is
=>
'
ro
'
...
...
Write
Preview
Supports
Markdown
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