Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
medialibrary
Commits
247865d9
Commit
247865d9
authored
Dec 31, 2015
by
Hugo Beauzée-Luyssen
Browse files
Parser: Update progress for all operations
parent
9afc0b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Parser.cpp
View file @
247865d9
...
...
@@ -73,7 +73,7 @@ void Parser::parse( std::shared_ptr<Media> file )
if
(
m_services
.
size
()
==
0
)
return
;
m_tasks
.
push
(
new
Task
(
file
,
m_services
,
m_callback
)
);
++
m_opToDo
;
m_opToDo
+=
m_services
.
size
()
;
updateStats
();
if
(
m_paused
==
false
)
m_cond
.
notify_all
();
...
...
@@ -180,12 +180,13 @@ Parser::Task::Task(std::shared_ptr<Media> file, Parser::ServiceList& serviceList
void
Parser
::
done
(
std
::
shared_ptr
<
Media
>
file
,
IMetadataService
::
Status
status
,
void
*
data
)
{
++
m_opDone
;
updateStats
();
Task
*
t
=
reinterpret_cast
<
Task
*>
(
data
);
if
(
status
==
IMetadataService
::
Status
::
TemporaryUnavailable
||
status
==
IMetadataService
::
Status
::
Fatal
)
{
++
m_opDone
;
updateStats
();
delete
t
;
return
;
}
...
...
@@ -198,8 +199,6 @@ void Parser::done(std::shared_ptr<Media> file, IMetadataService::Status status,
++
t
->
it
;
if
(
t
->
it
==
t
->
end
)
{
++
m_opDone
;
updateStats
();
file
->
markParsed
();
delete
t
;
return
;
...
...
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