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

MLMediaLibrary: include episode name in item title for TV Series if available

parent 2b3a2649
......@@ -412,9 +412,10 @@ static NSString *kLastTVDBUpdateServerTime = @"MLLastTVDBUpdateServerTime";
NSNumber *seasonNumber = tvShowEpisodeInfo[@"season"];
NSNumber *episodeNumber = tvShowEpisodeInfo[@"episode"];
NSString *tvShowName = tvShowEpisodeInfo[@"tvShowName"];
NSString *tvEpisodeName = tvShowEpisodeInfo[@"tvEpisodeName"];
BOOL hasNoTvShow = NO;
if (!tvShowName) {
tvShowName = @"Untitled TV MLShow";
tvShowName = @"";
hasNoTvShow = YES;
}
BOOL wasInserted = NO;
......@@ -426,8 +427,9 @@ static NSString *kLastTVDBUpdateServerTime = @"MLLastTVDBUpdateServerTime";
show.name = tvShowName;
[self fetchMetaDataForShow:show];
}
episode.name = tvEpisodeName;
if (hasNoTvShow)
if (!episode.name || [episode.name isEqualToString:@""])
episode.name = file.title;
file.seasonNumber = seasonNumber;
file.episodeNumber = episodeNumber;
......
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