diff --git a/tv_rename.cpp b/tv_rename.cpp index f333834..6979308 100644 --- a/tv_rename.cpp +++ b/tv_rename.cpp @@ -140,6 +140,9 @@ std::vector< string > getEpisodeNames( const string &id, const string &season, episodes.resize( index ); index--; episodes[index] = toString( x["episodeName"].get() ); + // some eps have whitespace at the end + while( isspace( episodes[index].back() ) ) + episodes[index].pop_back(); } } }