From c31845547bec3cd2ddd223a80e89a470bfe01d63 Mon Sep 17 00:00:00 2001 From: Toilal Date: Sat, 24 Oct 2015 15:43:18 +0200 Subject: [PATCH] Keep ",:;-" when cleaning value --- guessit/rules/common/formatters.py | 2 +- guessit/test/movies.yml | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/guessit/rules/common/formatters.py b/guessit/rules/common/formatters.py index ede730c..2fe2af5 100644 --- a/guessit/rules/common/formatters.py +++ b/guessit/rules/common/formatters.py @@ -17,7 +17,7 @@ def cleanup(input_string): :rtype: """ for sep in seps: - if sep not in ',;': + if sep not in ',:;-': input_string = input_string.replace(sep, ' ') return re.sub(' +', ' ', strip(input_string)) diff --git a/guessit/test/movies.yml b/guessit/test/movies.yml index e1b6674..76be186 100644 --- a/guessit/test/movies.yml +++ b/guessit/test/movies.yml @@ -241,7 +241,7 @@ format: DVD ? Movies/001 __ A classer/Fantomas se déchaine - Louis de Funès.avi -: title: Fantomas se déchaine Louis de Funès +: title: Fantomas se déchaine - Louis de Funès # TODO: Remove author from title, or add a new property like subtitle ... ? Movies/Comme une Image (2004)/Comme.Une.Image.FRENCH.DVDRiP.XViD-NTK.par-www.divx-overnet.com.avi @@ -308,7 +308,7 @@ bonusTitle: Stunts ? OSS_117--Cairo,_Nest_of_Spies.mkv -: title: OSS 117 Cairo, Nest of Spies +: title: OSS 117--Cairo, Nest of Spies ? The Godfather Part 3.mkv ? The Godfather Part III.mkv @@ -323,7 +323,7 @@ : title: The Insider year: 1999 bonusNumber: 2 - bonusTitle: 60 Minutes Interview 1996 + bonusTitle: 60 Minutes Interview-1996 ? Rush.._Beyond_The_Lighted_Stage-x09-Between_Sun_and_Moon-2002_Hartford.mkv : title: Rush Beyond The Lighted Stage @@ -568,4 +568,9 @@ year: 2012 audioCodec: AC3 audioProfile: HQ - releaseGroup: Hive-CM8 \ No newline at end of file + releaseGroup: Hive-CM8 + +? "Star Wars: Episode IV - A New Hope (2004) Special Edition.MKV" +: title: "Star Wars: Episode IV - A New Hope" + year: 2004 + edition: Special Edition \ No newline at end of file