Archived
1

-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:
Kim Wittenburg
2012-06-24 14:22:37 +02:00
parent 98b0e70a8b
commit 41b1ef775c
27 changed files with 3611 additions and 2826 deletions

68
iLyrics/MP3Lyrics.m Normal file
View File

@@ -0,0 +1,68 @@
//
// Mp3Lyrics.m
// iLyrics
//
// Created by Kim Wittenburg on 24.06.12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "MP3Lyrics.h"
@implementation MP3Lyrics {
NSString *query;
NSString *firstPage;
int resultCount;
int loadedResults;
}
@synthesize enabled;
-(NSString *)name {
return @"MP3 Lyrics";
}
-(NSDate *)hosterVersion {
return [NSDate dateWithString:@"2012-06-24 15:00:00 +0100"];
}
-(void)startNewSearchForQuery:(NSString *)q {
query = [q stringByFormattingForURL];
int site = loadedResults;
NSString *searchPath = [NSString stringWithFormat:@"http://www.mp3lyrics.org/Search/%@%%7C%i", query, site];
NSURL *searchURL = [NSURL URLWithString:searchPath];
NSError *error;
firstPage = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error];
if (error || firstPage == nil) {
firstPage = nil;
return;
}
if ([firstPage rangeOfString:@"<div class=\"hit_list\">"].location == NSNotFound) {
resultCount = 0;
}
}
-(BOOL)hasMoreResults {
return loadedResults < resultCount;
}
-(NSArray *)nextResults {
}
-(BOOL)canShowInBrowser:(id)result {
}
-(void)showInBrowser:(id)result {
}
-(void)resetLoadedResults {
loadedResults = 0;
}
-(Lyrics *)lyricsBySearchResult:(id)result {
}
@end