Main: fix file_set
This commit is contained in:
parent
5b38547fe3
commit
1e7a714a62
10
main.cpp
10
main.cpp
@ -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 ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user