From 0da015280412374450b33cdfa99929763b5578a5 Mon Sep 17 00:00:00 2001 From: zvon Date: Wed, 15 Jan 2020 22:34:01 +0100 Subject: [PATCH] Remove whitespace at the end of episodes if there is any --- tv_rename.cpp | 3 +++ 1 file changed, 3 insertions(+) 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(); } } }