If no episode names found in singleSeason, skip to the end

This commit is contained in:
zvon 2020-01-17 20:28:44 +01:00
parent 586d0d90dc
commit dac1ccc6c4

View File

@ -306,6 +306,9 @@ void singleSeason( const string &path, string &show, int season, string id,
auto renamed_files = getRenamedFiles( show, season, id, language, pattern, auto renamed_files = getRenamedFiles( show, season, id, language, pattern,
linux, *files_ptr, dvd ); linux, *files_ptr, dvd );
if( renamed_files.empty() )
goto end;
if ( print || !trust ) { if ( print || !trust ) {
for ( auto renamed = renamed_files.begin(); for ( auto renamed = renamed_files.begin();
renamed != renamed_files.end(); ++renamed ) { renamed != renamed_files.end(); ++renamed ) {
@ -335,6 +338,7 @@ void singleSeason( const string &path, string &show, int season, string id,
} }
} }
end:
if ( found_files != nullptr ) { if ( found_files != nullptr ) {
delete found_files; delete found_files;
} }