Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
luyikei
VLMC
Commits
3f797e4d
Commit
3f797e4d
authored
Jun 21, 2017
by
luyikei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Media: Fix saving/loading sub clips
Somehow we changed the saving format and didn't update it
parent
963f7edf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
src/Library/Library.cpp
src/Library/Library.cpp
+6
-3
src/Media/Media.cpp
src/Media/Media.cpp
+2
-2
No files found.
src/Library/Library.cpp
View file @
3f797e4d
...
...
@@ -83,11 +83,14 @@ Library::postLoad()
for
(
const
auto
&
var
:
m_settings
->
value
(
"medias"
)
->
get
().
toList
()
)
{
auto
map
=
var
.
toMap
();
auto
subClipsMap
=
map
[
"clips"
].
toMap
();
map
[
"clips"
]
=
QVariant
();
auto
m
=
Media
::
fromVariant
(
map
);
addMedia
(
m
);
m
->
loadSubclip
(
subClipsMap
);
if
(
map
.
contains
(
"clips"
)
==
true
)
{
const
auto
&
subClipsList
=
map
[
"clips"
].
toList
();
for
(
const
auto
&
subClip
:
subClipsList
)
m
->
loadSubclip
(
subClip
.
toMap
()
);
}
}
}
...
...
src/Media/Media.cpp
View file @
3f797e4d
...
...
@@ -211,12 +211,12 @@ Media::snapshot()
QSharedPointer
<
Clip
>
Media
::
loadSubclip
(
const
QVariantMap
&
m
)
{
if
(
m
.
contains
(
"
u
uid"
)
==
false
||
m
.
contains
(
"begin"
)
==
false
||
m
.
contains
(
"end"
)
==
false
)
if
(
m
.
contains
(
"
libraryU
uid"
)
==
false
||
m
.
contains
(
"begin"
)
==
false
||
m
.
contains
(
"end"
)
==
false
)
{
vlmcWarning
()
<<
"Invalid clip provided:"
<<
m
;
return
{};
}
const
auto
&
uuid
=
m
[
"
u
uid"
].
toUuid
();
const
auto
&
uuid
=
m
[
"
libraryU
uid"
].
toUuid
();
const
auto
begin
=
m
[
"begin"
].
toLongLong
();
const
auto
end
=
m
[
"end"
].
toLongLong
();
auto
clip
=
QSharedPointer
<
Clip
>::
create
(
sharedFromThis
(),
begin
,
end
,
uuid
);
...
...
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