Skip to content

Commit

Permalink
fixed #38
Browse files Browse the repository at this point in the history
  • Loading branch information
krzemin committed Nov 26, 2015
1 parent 54a5b83 commit 3d1f0a6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/engines/qnapiabstractengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,16 @@ bool QNapiAbstractEngine::match()

QString targetExtension = stf.suffix();

if(!GlobalConfig().ppSubFormat().isEmpty() && GlobalConfig().ppSubExtension().isEmpty())
if(GlobalConfig().ppEnabled())
{
targetExtension = GlobalFormatsRegistry().select(GlobalConfig().ppSubFormat())->defaultExtension();
}
else if(!GlobalConfig().ppSubExtension().isEmpty())
{
targetExtension = GlobalConfig().ppSubExtension();
if(!GlobalConfig().ppSubFormat().isEmpty() && GlobalConfig().ppSubExtension().isEmpty())
{
targetExtension = GlobalFormatsRegistry().select(GlobalConfig().ppSubFormat())->defaultExtension();
}
else if(!GlobalConfig().ppSubExtension().isEmpty())
{
targetExtension = GlobalConfig().ppSubExtension();
}
}

QFileInfo mf(movie);
Expand Down

0 comments on commit 3d1f0a6

Please sign in to comment.