From dac1ccc6c45976eb102228693d5925a4f15ef9ce Mon Sep 17 00:00:00 2001 From: zvon Date: Fri, 17 Jan 2020 20:28:44 +0100 Subject: [PATCH] If no episode names found in singleSeason, skip to the end --- tv_rename.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tv_rename.cpp b/tv_rename.cpp index 22bab85..381479b 100644 --- a/tv_rename.cpp +++ b/tv_rename.cpp @@ -306,6 +306,9 @@ void singleSeason( const string &path, string &show, int season, string id, auto renamed_files = getRenamedFiles( show, season, id, language, pattern, linux, *files_ptr, dvd ); + if( renamed_files.empty() ) + goto end; + if ( print || !trust ) { for ( auto renamed = renamed_files.begin(); 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 ) { delete found_files; }