Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions DynamicLyrics/LyricX/MainController.m
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,24 @@ - (void) WorkingThread:(NSMutableDictionary*)tmpDict

NSString *SongTitle = [iTunesCurrentTrack name];
NSString *SongArtist = [iTunesCurrentTrack artist];
NSString *SongEmbeddedLyrics = [iTunesCurrentTrack lyrics];

if(SongTitle == nil) {
self.CurrentSongLyrics = @"";
}else{
self.CurrentSongLyrics = [NSString stringWithFormat:@"%@ - %@",SongTitle,SongArtist];
}
[nc postNotificationName:@"LyricsChanged" object:self userInfo:[NSDictionary dictionaryWithObject:self.CurrentSongLyrics forKey:@"Lyrics"]];


if ([userDefaults valueForKey:[NSString stringWithFormat:@"%@%@",SongArtist,SongTitle]])

if([SongEmbeddedLyrics length] != 0){
self.SongLyrics = SongEmbeddedLyrics;
CurrentLyric = 0;
LyricsDelay = [userDefaults floatForKey:[NSString stringWithFormat:@"Delay%@%@",SongArtist,SongTitle]];
[currentDelayMenuItem setTitle:[NSString stringWithFormat:@"%@ %.2fs",NSLocalizedString(@"CurrentDelay", nil),0 - LyricsDelay]];

[self Anylize];
}
else if ([userDefaults valueForKey:[NSString stringWithFormat:@"%@%@",SongArtist,SongTitle]])
{
self.SongLyrics = [NSString stringWithString:[userDefaults valueForKey:[NSString stringWithFormat:@"%@%@",SongArtist,SongTitle]]];

Expand Down