Commit b3052d79 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

IParserService: Add a targetedStep member function

parent 1856e8bf
......@@ -885,4 +885,9 @@ bool MetadataParser::isCompleted( const parser::Task& task ) const
return task.isStepCompleted( parser::Task::ParserStep::MetadataAnalysis );
}
parser::Task::ParserStep MetadataParser::targetedStep() const
{
return parser::Task::ParserStep::MetadataAnalysis;
}
}
......@@ -44,6 +44,7 @@ protected:
virtual void onFlushing() override;
virtual void onRestarted() override;
virtual bool isCompleted( const parser::Task& task ) const override;
virtual parser::Task::ParserStep targetedStep() const override;
bool addPlaylistMedias( parser::Task& task ) const;
void addPlaylistElement( parser::Task& task, std::shared_ptr<Playlist> playlistPtr,
......
......@@ -121,6 +121,11 @@ void VLCMetadataService::onRestarted()
{
}
parser::Task::ParserStep VLCMetadataService::targetedStep() const
{
return parser::Task::ParserStep::MetadataExtraction;
}
void VLCMetadataService::mediaToItem( VLC::Media& media, parser::Task::Item& item )
{
item.setMeta( parser::Task::Item::Metadata::Title,
......
......@@ -49,6 +49,7 @@ private:
virtual bool isCompleted( const parser::Task& task ) const override;
virtual void onFlushing() override;
virtual void onRestarted() override;
virtual parser::Task::ParserStep targetedStep() const override;
void mediaToItem( VLC::Media& media, parser::Task::Item& item );
......
......@@ -58,6 +58,11 @@ public:
*/
virtual bool isCompleted( const parser::Task& task ) const = 0;
/**
* @brief targetedStep Returns the ParserStep targeted by this service.
*/
virtual parser::Task::ParserStep targetedStep() const = 0;
/**
* @brief initialize Run service specific initialization.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment