Commit b2af1102 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Title Decrapifier: fix tv show title corruption

parent 4a06aa7f
...@@ -138,7 +138,7 @@ static inline NSNumber *numberFromThreeChars(char high, char mid, char low) ...@@ -138,7 +138,7 @@ static inline NSNumber *numberFromThreeChars(char high, char mid, char low)
episode = numberFromThreeChars(c(str,i+4), c(str,i+5), c(str,i+6)); episode = numberFromThreeChars(c(str,i+4), c(str,i+5), c(str,i+6));
else else
episode = numberFromTwoChars(c(str,i+4), c(str,i+5)); episode = numberFromTwoChars(c(str,i+4), c(str,i+5));
NSString *tvShowName = i > 0 ? [str substringToIndex:i-1] : nil; NSString *tvShowName = i > 0 ? [str substringToIndex:i] : nil;
tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : nil; tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : nil;
NSString *episodeName = stringLength > i + 4 ? [str substringFromIndex:i+6] : nil; NSString *episodeName = stringLength > i + 4 ? [str substringFromIndex:i+6] : nil;
...@@ -174,7 +174,7 @@ static inline NSNumber *numberFromThreeChars(char high, char mid, char low) ...@@ -174,7 +174,7 @@ static inline NSNumber *numberFromThreeChars(char high, char mid, char low)
{ {
NSNumber *season = [NSNumber numberWithInt:intFromChar(c(str,i))]; NSNumber *season = [NSNumber numberWithInt:intFromChar(c(str,i))];
NSNumber *episode = numberFromTwoChars(c(str,i+2), c(str,i+3)); NSNumber *episode = numberFromTwoChars(c(str,i+2), c(str,i+3));
NSString *tvShowName = i > 0 ? [str substringToIndex:i-1] : nil; NSString *tvShowName = i > 0 ? [str substringToIndex:i] : nil;
tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : nil; tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : nil;
NSString *episodeName = stringLength > i + 4 ? [str substringFromIndex:i+4] : nil; NSString *episodeName = stringLength > i + 4 ? [str substringFromIndex:i+4] : nil;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment