-Added Songtexte.com Lyrics Hoster
-Repositioned the load more results button into the outline view -Improved the replacing of html escape characters -Lyrics Hosters can now be dragged into a preferred order in the preference window -Changed results outline's column ordering method -Some code changes -Replaced the Buttons in the lyrics pane with an action button -Preferred order of lyrics hosters will now be saved -Translation Improvements
This commit is contained in:
@@ -29,7 +29,7 @@ AutoLyrics *instace;
|
||||
-(id)init {
|
||||
enabled = NO;
|
||||
replaceOldLyrics = NO;
|
||||
[self setInterval:30];
|
||||
[self setInterval:5];
|
||||
return [super init];
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ AutoLyrics *instace;
|
||||
|
||||
-(void)shouldSetLyrics: (NSTimer *) sender {
|
||||
if (enabled) {
|
||||
iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
|
||||
iTunesApplication *iTunes = [[iLyrics sharediLyrics] iTunes];
|
||||
iTunesTrack *current = [iTunes currentTrack];
|
||||
if ([current name] != nil) {
|
||||
if (replaceOldLyrics || [[current lyrics] length] == 0) {
|
||||
@@ -67,14 +67,14 @@ AutoLyrics *instace;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setLyrics {
|
||||
iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
|
||||
-(void)setLyrics {
|
||||
iTunesApplication *iTunes = [[iLyrics sharediLyrics] iTunes];
|
||||
iTunesTrack *track = [iTunes currentTrack];
|
||||
Magistrix *magistrix = [[Magistrix alloc] init];
|
||||
[magistrix startNewSearchForQuery:[NSString stringWithFormat:@"%@ - %@", [track name], [track artist]]];
|
||||
NSArray *results = [magistrix nextResults];
|
||||
id<LyricsHoster> hoster = [[iLyrics sharediLyrics] preferredHoster];
|
||||
[hoster startNewSearchForQuery:[NSString stringWithFormat:@"%@ - %@", [track name], [track artist]]];
|
||||
NSArray *results = [hoster nextResults];
|
||||
if (results != nil && [results count] > 0) {
|
||||
Lyrics *lyrics = [magistrix lyricsBySearchResult:[results objectAtIndex:0]];
|
||||
Lyrics *lyrics = [hoster lyricsBySearchResult:[results objectAtIndex:0]];
|
||||
[track setLyrics:[lyrics lyrics]];
|
||||
[GrowlApplicationBridge notifyWithTitle:NSLocalizedString(@"Growl.messages.lyricsSent.title", @"") description:[NSString stringWithFormat:NSLocalizedString(@"Growl.messages.lyricsSent.detail", @""), [track name]] notificationName:@"Lyrics sent to iTunes" iconData:nil priority:0 isSticky:NO clickContext:nil];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user