Main: fix file_set

This commit is contained in:
zvon 2020-01-15 20:10:47 +01:00
parent 5b38547fe3
commit 1e7a714a62

View File

@ -275,17 +275,17 @@ int main
if ( !FSLib::isDirectory( path ) && FSLib::exists( path ) ) {
// specified file, not directory
auto *file_set = new std::set< string >;
file_set->insert( path );
size_t season_pos{};
if ( !searchSeason( path.c_str(), season_pos ) ) {
std::map< int, string > file_set{};
size_t season_pos{}, ep_pos{};
if ( !searchSeason( path.c_str(), season_pos, ep_pos ) ) {
cerr << "Specified file does not conform to filename pattern, "
<< "cannot rename." << std::endl;
return 1;
} else {
file_set[std::stoi( path.c_str() + ep_pos )] = path;
auto season = std::stoi( path.c_str() + season_pos );
singleSeason( path, show, season, TEXT( "" ), language, pattern,
tv_flags, file_set, true );
tv_flags, &file_set, true );
return 0;
}
} else if ( !FSLib::isDirectory( path ) ) {