Commit 5dd157d2 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Title Decrapifier: make sure not to ever return an empty tv show name

parent b4a835ee
Version 2.2.1
-------------
- FIX: incorrect return value for untitled TV shows
Version 2.2
-----------
- FIX: correct subitem behavior of MLShow and MLAlbum on removal
......
......@@ -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));
else
episode = numberFromTwoChars(c(str,i+4), c(str,i+5));
NSString *tvShowName = i > 0 ? [str substringToIndex:i] : nil;
NSString *tvShowName = i > 0 ? [str substringToIndex:i] : NSLocalizedString(@"UNTITLED_SHOW", @"");
tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : nil;
NSString *episodeName = stringLength > i + 4 ? [str substringFromIndex:i+6] : nil;
......@@ -167,7 +167,7 @@ static inline NSNumber *numberFromThreeChars(char high, char mid, char low)
{
NSNumber *season = [NSNumber numberWithInt:intFromChar(c(str,i))];
NSNumber *episode = numberFromTwoChars(c(str,i+2), c(str,i+3));
NSString *tvShowName = i > 0 ? [str substringToIndex:i] : nil;
NSString *tvShowName = i > 0 ? [str substringToIndex:i] : NSLocalizedString(@"UNTITLED_SHOW", @"");
tvShowName = tvShowName ? [[MLTitleDecrapifier decrapify:tvShowName] capitalizedString] : 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