diff --git a/Changelog.rtf b/Changelog.rtf index 1f48098..a6c5471 100644 --- a/Changelog.rtf +++ b/Changelog.rtf @@ -64,4 +64,28 @@ -Fixed a bug: Returned false results when having a "&" in the query\ -Fixed a resource bug\ -Fixed special characters in url bug (final)\ -} \ No newline at end of file +\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc + +\i \cf0 06/23/2012\ +\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\i0 \cf0 -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\ +\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\b \cf0 Release No. 1.2 +\b0 - +\i 06/24/2012\ +\ +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural + +\i0 \cf0 -Preferred order of lyrics hosters will now be saved\ +-Translation Improvements} \ No newline at end of file diff --git a/de.lproj/Localizable.strings b/de.lproj/Localizable.strings index 560c767..e81e57c 100644 --- a/de.lproj/Localizable.strings +++ b/de.lproj/Localizable.strings @@ -1,78 +1,103 @@ -/* Standards */ +/* ---------- Standards - Werden in Warnmeldungen angezeigt ---------- */ "OK" = "OK"; "Yes" = "Ja"; "No" = "Nein"; -/* "No Selection" label(s) in the main window */ + +/* ---------- iLyrics - Hauptfenster ---------- */ + +//----- Angezeigte Texte + +/* Wird im PopUp Button im Ergebniss-Bereich angezeigt */ +"iLyrics.text.loadNextResultsFrom" = "Weitere Ergebnisse laden von..."; + +/* "Keine Auswahl" - Texte im Hauptfenster */ "iLyrics.text.noSelection" = "Keine Auswahl"; -/* Preference Items */ -"iLyrics.text.enableAutoLyrics" = "Auto-Lyrics einschalten"; +//----- Warnmeldungen -"iLyrics.text.disableAutoLyrics" = "Auto-Lyrics ausschalten"; +//Songtextsuche (Aufgerufen, wenn der Benutzer im Suchfeld die Eingabe mit ↩ (Eingabetaste) bestätigt) -/* Text displayed when a lyrics hoster does not return a valid NSDate in it's hosterVersion method */ -"iLyrics.text.illegalDateFormat" = "Keine Angabe"; +/* Ein Netzwerkfehler ist aufgetreten, während die Ergebnisse geladen wurden */ +"iLyrics.messages.networkOrQueryError.title" = "Sie sind nicht mit demInternet verbunden."; +"iLyrics.messages.networkOrQueryError.detail" = "Überprüfen Sie Ihre WLAN oder Ethernet Verbindung und versuchen Sie es erneut. Weitere Informationen erhalten Sie mit der Netzwerkdiagnose."; -/* Preferences */ -/* Search Token Replacements */ -"iLyrics.searchToken.%name%" = "Songname"; +/* Die Suche ergab keine Ergebnisse */ +"iLyrics.messages.noResults.title" = "Ihre Suche ergab keine Ergebnisse."; +"iLyrics.messages.noResults.detail" = "Keine der Songtextseiten bietet einen Songtext an, der zu Ihrer Suche passt."; -"iLyrics.searchToken.%artist%" = "Interpret"; +/* Fehler beim Speichern eines Songtextes */ +"iLyrics.messages.error.saveLyrics.title" = "Der Songtext konnte nicht gesichert werden."; +"iLyrics.messages.error.saveLyrics.detail" = "Prüfen Sie, ob Sie die Schreibberechtigung am ausgewählten Ort besitzen."; -"iLyrics.searchToken.%album%" = "Album"; -/* Magistrix Hoster */ -"Magistrix.text.noPreview" = "Keine Vorschau verfügbar."; +/* ---------- iLyrics - Einstellungsfenster ---------- */ -"Hoster.text.noNetwork" = "Keine Netzwerkverbindung."; +//----- Angezeigte Texte -"Hoster.messages.networkOrQueryError.title" = "Sie sind zur Zeit nicht mit dem Internet verbunden oder haben einen ungültigen Suchtext eingegeben."; +/* Fenstertitel, wenn der Allgemein-Tab aktiv ist (Dies ist nicht die Beschriftung in der Symbolleiste) */ +"iLyrics.preferences.text.general" = "Allgemein"; -"Hoster.messages.networkOrQueryError.detail" = "1. Prüfen Sie, ob ihre WLAN oder Ethernet-Verbndung korrekt funktioniert. Weitere Informationenen erhalten Sie mit dem Netzwerkdiagnose Programm.\n2. Entfernen Sie alle Sonderzeichen (§$&€) aus dem Suchfeld und versuchen Sie es erneut."; +/* Fenstertitel, wenn der Auto-Lyrics-Tab aktiv ist (Dies ist nicht die Beschriftung in der Symbolleiste) */ +"iLyrics.preferences.text.auto-lyrics" = "Auto-Lyrics"; +/* Auto-Lyrics texte */ +"iLyrics.preferences.text.enableAutoLyrics" = "Auto-Lyrics einschalten"; + +"iLyrics.preferences.text.disableAutoLyrics" = "Auto-Lyrics ausschalten"; + + +/* ---------- Songtextseiten ---------- */ + +//----- Angezeigte Texte + +/* Dies wird als Titel, Interpret und Songtexte angezeigt, wenn keine Internetverbindung besteht */ +"Hoster.text.noNetwork" = "Keine Internetverbiindung."; + +/* Die wird im Vorschaubereich angezeigt, wenn keine Vorschau erfügbar ist */ +"Hoster.text.noPreviewAvailable" = "Keine Vorschau verfügbar."; + +//----- Warnmeldungen (%hoster% wird mit dem Namen der Songtextseite ersetzt) + +/* Es ist ein Netzwerkfehler aufgetreten, während ein Songtext geladen wurde */ +"Hoster.messages.networkOrQueryError.title" = "Der Songtext konnte nicht geladen werden, da Sie nicht mit dem Internet verbunden sind."; +"Hoster.messages.networkOrQueryError.detail" = "Überprüfen Sie Ihre WLAN oder Ethernet Verbindung und versuchen Sie es erneut. Weitere Informationen erhalten Sie mit der Netzwerkdiagnose."; + +/* (Veraltet - Dieser Text sollte nicht mehr verwendet werden, da er durch die hasMoreResults Methode des LyricsHoster-Protokolls hinfällig geworden ist) */ "Hoster.messages.noResults.title" = "Ihre Suche ergab keine Ergebnisse."; +"Hoster.messages.noResults.detail" = "%hoster% bietet leider keine Songtexte an, die zu Ihrer Suche passen."; -"Hoster.messages.noResults.detail" = "Magistrix.de hat keine Songtexte in der Datenbank, die mit der Suchanfrage übereinstimmen."; +/* Sollte niemals verwendet werden - Dies bedeutet, dass ein Fehler beim verarbeiten einer Seite aufgetreten ist. (Das kann vorkommen, wenn die Seiten aktualisiert werden und z.B. neue Features eingebaut werden.) */ +"Magistrix.messages.unknownPage.title" = "Es ist ein Fehler beim Verarbeiten Ihrer Anfrage aufgetreten."; +"Magistrix.messages.unknownPage.detail" = "Normalerweise kann dieses Problem behoben werden, indem Sie die neuste Version von iLyrics herunterladen."; -"Magistrix.messages.unknownPage.title" = "Ein Fehler ist beim Verarbeiten der Anfrage aufgetreten."; -"Magistrix.messages.unknownPage.detail" = "Normalerweise kann dieses Problem behoben werden, wenn Sie die neuste Version von iLyrics laden."; +/* ---------- iTunes Verbindung ---------- */ -/* iTunes connection */ -/* By text used in the artist menu item where %@ is the artist */ -"iTunes.text.byFormat" = "von %@"; +//----- Warnmeldungen -/* iTunes (error) messages */ -"iTunes.messages.iTunesIdle.title" = "iTunes ist zurzeit nicht geöffnet."; +/* Es wird kein Titel wiedergegeben */ +"iTunes.messages.noTrackPlaying.title" = "iTunes spielt zur Zeit keine Musik."; +"iTunes.messages.noTrackPlaying.detail" = "Geben Sie einen Titel mit iTunes wieder oder wählen Sie \"Wiedergabe/Pause\" aus dem iTunes Menu, um diese Funktion zu verwenden."; -"iTunes.messages.iTunesIdle.detail" = "Öffnen Sie iTunes um dieses Feature nutzen zu können."; +/* Soll der gesicherte Songtext ersetzt werden */ +"iTunes.messages.replaceLyrics.title" = "Der aktuelle iTunes Titel hat bereits einen Songtext. Möchten Sie diesen ersetzen?"; +"iTunes.messages.replaceLyrics.detail" = "Der alte Songtext kann nicht wiederhergestellt werden."; -"iTunes.messages.noTrackPlaying.title" = "iTunes spielt zurzeit keine Musik."; +/* ---------- Spotify Verbindung ---------- */ -"iTunes.messages.noTrackPlaying.detail" = "Starten sie die Wiedergabe über iTunes oder über den \"Play/Pause\" Button."; +/* Es wird kein Titel wiedergegeben */ +"Spotify.messages.noTrackPlaying.title" = "Spotify spielt zur Zeit keine Musik."; +"Spotify.messages.noTrackPlaying.detail" = "Geben Sie einen Titel in Spotify wieder, um diese Funktion zu verwenden."; -"iTunes.messages.replaceLyrics.title" = "Der aktuelle iTunes Titel hat bereits einen Songtext. Möchten Sie ihn ersetzen?"; +/* ---------- Growl Benachrichtigungen ---------- */ -"iTunes.messages.replaceLyrics.detail" = "Beim Eretzen geht der alte Songtext vollständig verloren. Diese Aktion kann nicht wiederrufen werden."; - -/* Spotify Messages */ -"Spotify.messages.noTrackPlaying.title" = "Spotify spielt zut Zeit keine Musik."; - -"Spotify.messages.noTrackPlaying.detail" = "Starten Sie die Wiedergabe in Spotify, um diese Funktion zu verwenden."; - -/* Error while saving */ -"messages.error.saveLyrics.title" = "Der Songtext konnte nicht gespeichert werden."; - -"messages.error.saveLyrics.detail" = "Prüfen Sie, ob Sie Schreibberechtigung an diesem Ort haben."; - -/* Growl */ -"Growl.messages.lyricsSaved.title" = "Songtext gespeichert"; - -"Growl.messages.lyricsSaved.detail" = "nach \"%@\""; +/* Ein Songtext wurde erfolgreich gesichert (In der detailierten Beschreibung %@ ist der Name der Datei) */ +"Growl.messages.lyricsSaved.title" = "Songtext gesichert"; +"Growl.messages.lyricsSaved.detail" = "nach \"%@\"."; +/* Ein Songtext wurde erfolgreich an iTunes übermittelt (In der detailierten Beschreibung %@ ist der Name des iTunes Titels) */ "Growl.messages.lyricsSent.title" = "Songtext an iTunes gesendet"; - -"Growl.messages.lyricsSent.detail" = "Songtext an \"%@\" gesendet."; +"Growl.messages.lyricsSent.detail" = "Songtext an \"%@\" gesendet."; \ No newline at end of file diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings index a34b8bb..f8a2940 100644 --- a/en.lproj/Localizable.strings +++ b/en.lproj/Localizable.strings @@ -1,79 +1,103 @@ -/* Standards */ +/* ---------- Standards - Used in Alert sheets and dialogs ---------- */ "OK" = "OK"; "Yes" = "Yes"; "No" = "No"; + +/* ---------- iLyrics - Main Window ---------- */ + +//----- Displayed Texts + +/* Used in the NSPopUpButton inside the results outline */ +"iLyrics.text.loadNextResultsFrom" = "Load more results from..."; + /* "No Selection" label(s) in the main window */ "iLyrics.text.noSelection" = "No Selection"; -/* Preference Items */ -"iLyrics.text.enableAutoLyrics" = "Enable Auto-Lyrics"; +//----- Alert Texts -"iLyrics.text.disableAutoLyrics" = "Disable Auto-Lyrics"; +//Lyrics Search (Called when the user presses ↩ (Enter) on the search field) -/* Text displayed when a lyrics hoster does not return a valid NSDate in it's hosterVersion method */ -"iLyrics.text.illegalDateFormat" = "No Specification"; +/* A Network error occured while loading search results */ +"iLyrics.messages.networkOrQueryError.title" = "You are not connected to the internet."; +"iLyrics.messages.networkOrQueryError.detail" = "Check if you are connected through WLAN or Ethernet. Use the Network Diagnostics for more information."; -/* Preferences */ -/* Search Token Replacements */ -"iLyrics.searchToken.%name%" = "Song Name"; - -"iLyrics.searchToken.%artist%" = "Artist"; - -"iLyrics.searchToken.%album%" = "Album"; - -/* Magistrix Hoster */ -"Magistrix.text.noPreview" = "No Preview available."; - -"Hoster.text.noNetwork" = "No Network connection"; - -"Hoster.messages.networkOrQueryError.title" = "You are not connected to the internet or you entered an invalid query."; - -"Hoster.messages.networkOrQueryError.detail" = "1. Check if you are connected through WLAN or Ethernet. Use the Network Diagnostics for more information.\n2. Try to remove any special characters (&%$§€) and try again."; - -"Hoster.messages.noResults.title" = "Your search did not return any results."; - -"Hoster.messages.noResults.detail" = "Magistrix.de does not provide any lyrics for this search."; - -"Magistrix.messages.unknownPage.title" = "There occured an error while parsing the request."; - -"Magistrix.messages.unknownPage.detail" = "Normally this can be fixed by getting the newest versin of iLyrics."; - -/* iTunes connection */ -/* By text used in the artist menu item where %@ is the artist */ -"iTunes.text.byFormat" = "by %@"; - -/* iTunes (error) messages */ -"iTunes.messages.iTunesIdle.title" = "iTunes is idle."; - -"iTunes.messages.iTunesIdle.detail" = "Please start iTunes to use this feature."; - -"iTunes.messages.noTrackPlaying.title" = "iTunes does currently not play any music."; - -"iTunes.messages.noTrackPlaying.detail" = "Play a track using iTunes or select \"Play/Pause\" from the iTunes menu."; - -"iTunes.messages.replaceLyrics.title" = "The current iTunes track already has lyrics. Do you want to replace them?"; - -"iTunes.messages.replaceLyrics.detail" = "If you replace the old lyrics they can not be restored anymore."; - -/* Spotify Messages */ -"Spotify.messages.noTrackPlaying.title" = "Spotify does currently not play any music."; - -"Spotify.messages.noTrackPlaying.detail" = "Play a track in Spotify to use this feature."; +/* The search did not return any results */ +"iLyrics.messages.noResults.title" = "Your search did not return any results."; +"iLyrics.messages.noResults.detail" = "None of the hosters provides any songtexts matching to the entered query."; /* Error while saving */ -"messages.error.saveLyrics.title" = "The Lyrics could not be saved."; +"iLyrics.messages.error.saveLyrics.title" = "The Lyrics could not be saved."; +"iLyrics.messages.error.saveLyrics.detail" = "Ceck if you have the rights to write to the selected location."; -"messages.error.saveLyrics.detail" = "Ceck if you have the rights to write to the selected location."; -/* Growl */ +/* ---------- iLyrics - Preference Window ---------- */ + +//----- Displayed Texts + +/* Window title when the general tab is active (This is not the label for the toolbar item) */ +"iLyrics.preferences.text.general" = "General"; + +/* Window title when the Auto-Lyrics tab is active (This is not the label for the toolbar item) */ +"iLyrics.preferences.text.auto-lyrics" = "Auto-Lyrics"; + +/* Auto-Lyrics texts */ +"iLyrics.preferences.text.enableAutoLyrics" = "Enable Auto-Lyrics"; + +"iLyrics.preferences.text.disableAutoLyrics" = "Disable Auto-Lyrics"; + + +/* ---------- Lyrics Hosters ---------- */ + +//----- Displayed Texts + +/* Displayed as song name, artist and lyrics when network connection failed */ +"Hoster.text.noNetwork" = "No Network connection."; + +/* Displayed in the preview area if no preview is available */ +"Hoster.text.noPreviewAvailable" = "No Preview available."; + +//----- Alert Texts (%hoster% will be replaced with the name of the hoster) + +/* A Network error occured while loading a lyric */ +"Hoster.messages.networkOrQueryError.title" = "You are not connected to the internet."; +"Hoster.messages.networkOrQueryError.detail" = "Check if you are connected through WLAN or Ethernet. Use the Network Diagnostics for more information."; + +/* (Deprecated - Should not be used because of the hasMoreResults method of the LyricsHoster protocol) */ +"Hoster.messages.noResults.title" = "Your search did not return any results."; +"Hoster.messages.noResults.detail" = "%hoster% does not provide any lyrics matching to the entered query."; + +/* Should never be used - This means that a parsing error occured */ +"Magistrix.messages.unknownPage.title" = "There occured an error while parsing the request."; +"Magistrix.messages.unknownPage.detail" = "Normally this can be fixed by getting the newest versin of iLyrics."; + + +/* ---------- iTunes Connection ---------- */ + +//----- Alert Texts + +/* No Track is currently playing */ +"iTunes.messages.noTrackPlaying.title" = "iTunes does currently not play any music."; +"iTunes.messages.noTrackPlaying.detail" = "Play a track using iTunes or select \"Play/Pause\" from the iTunes menu."; + +/* Ask the user wether to replace the old lyrics */ +"iTunes.messages.replaceLyrics.title" = "The current iTunes track already has lyrics. Do you want to replace them?"; +"iTunes.messages.replaceLyrics.detail" = "If you replace the old lyrics they can not be restored anymore."; + +/* ---------- Spotify Connection ---------- */ + +/* No Track is currentlx playing */ +"Spotify.messages.noTrackPlaying.title" = "Spotify does currently not play any music."; +"Spotify.messages.noTrackPlaying.detail" = "Play a track in Spotify to use this feature."; + +/* ---------- Growl Notifications ---------- */ + +/* A lyric was successfully saved to a file (in the detail message %@ is the filename) */ "Growl.messages.lyricsSaved.title" = "Lyrics Saved"; +"Growl.messages.lyricsSaved.detail" = "to \"%@\"."; -"Growl.messages.lyricsSaved.detail" = "to \"%@\""; - +/* A lyric was successfully saved to the current iTunes song (in the detail message %@ is the name of the iTunes song) */ "Growl.messages.lyricsSent.title" = "Lyrics sent to iTunes"; - -/* %@ is the name of the song */ -"Growl.messages.lyricsSent.detail" = "Lyrics sent to \"%@\"."; +"Growl.messages.lyricsSent.detail" = "Lyrics sent to \"%@\"."; \ No newline at end of file diff --git a/iLyrics.xcodeproj/project.pbxproj b/iLyrics.xcodeproj/project.pbxproj index cbd7f78..155c009 100644 --- a/iLyrics.xcodeproj/project.pbxproj +++ b/iLyrics.xcodeproj/project.pbxproj @@ -12,7 +12,6 @@ 3B20EF381584EA9A006C0CDF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF371584EA9A006C0CDF /* main.m */; }; 3B20EF3C1584EA9A006C0CDF /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF3A1584EA9A006C0CDF /* Credits.rtf */; }; 3B20EF3F1584EA9A006C0CDF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */; }; - 3B20EF421584EA9A006C0CDF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF401584EA9A006C0CDF /* MainMenu.xib */; }; 3B20EF491584EAA3006C0CDF /* iLyrics.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF481584EAA3006C0CDF /* iLyrics.icns */; }; 3B20EF4D1584EAAD006C0CDF /* iTunes.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF4A1584EAAD006C0CDF /* iTunes.icns */; }; 3B20EF4E1584EAAD006C0CDF /* Diamond.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */; }; @@ -20,11 +19,16 @@ 3B20EF521584EAF8006C0CDF /* MainController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF511584EAF8006C0CDF /* MainController.m */; }; 3B20EF551584ECD9006C0CDF /* Lyrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF541584ECD9006C0CDF /* Lyrics.m */; }; 3B20EF5C1584F34E006C0CDF /* SearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF5B1584F34E006C0CDF /* SearchResult.m */; }; - 3B20EF6115853345006C0CDF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF6315853345006C0CDF /* Localizable.strings */; }; 3B2DC55B158CD31E00C004A4 /* PreferencesWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B2DC55A158CD31E00C004A4 /* PreferencesWindow.m */; }; + 3B3A377C15972079002085CE /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B3A377E15972079002085CE /* MainMenu.xib */; }; + 3B3A3781159727FE002085CE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B3A3783159727FE002085CE /* Localizable.strings */; }; + 3B3A378715973040002085CE /* MP3Lyrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B3A378615973040002085CE /* MP3Lyrics.m */; }; + 3B5E8BA2159496DA0028363E /* Songtexte.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5E8BA1159496DA0028363E /* Songtexte.m */; }; + 3B5E8BA515949B380028363E /* LyricsHosterUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5E8BA415949B380028363E /* LyricsHosterUtil.m */; }; 3B5E8ED2158E7AC40082A769 /* Spotify.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B5E8ED1158E7AC40082A769 /* Spotify.icns */; }; 3B73010E158CDF7200D3AF26 /* AutoLyrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B73010D158CDF7200D3AF26 /* AutoLyrics.m */; }; 3B81D4FE1586248F00916CE3 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B81D4FD1586248F00916CE3 /* ScriptingBridge.framework */; }; + 3B9A33611590BDE700B844EF /* iLyrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B9A33601590BDE700B844EF /* iLyrics.m */; }; 3BBD9B76158C873F00A5CD2C /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BBD9B75158C873F00A5CD2C /* Growl.framework */; }; 3BBD9B78158C876200A5CD2C /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3BBD9B75158C873F00A5CD2C /* Growl.framework */; }; 3BBD9B7A158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict in Resources */ = {isa = PBXBuildFile; fileRef = 3BBD9B79158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict */; }; @@ -58,7 +62,6 @@ 3B20EF3B1584EA9A006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 3B20EF3D1584EA9A006C0CDF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 3B20EF411584EA9A006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 3B20EF481584EAA3006C0CDF /* iLyrics.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = iLyrics.icns; sourceTree = ""; }; 3B20EF4A1584EAAD006C0CDF /* iTunes.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = iTunes.icns; sourceTree = ""; }; 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Diamond.tiff; sourceTree = ""; }; @@ -70,17 +73,27 @@ 3B20EF5A1584F34E006C0CDF /* SearchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchResult.h; sourceTree = ""; }; 3B20EF5B1584F34E006C0CDF /* SearchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchResult.m; sourceTree = ""; }; 3B20EF5D1584F458006C0CDF /* LyricsHoster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LyricsHoster.h; sourceTree = ""; }; - 3B20EF6215853345006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 3B2DC558158CCE8100C004A4 /* Changelog.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Changelog.rtf; sourceTree = SOURCE_ROOT; }; 3B2DC559158CD31E00C004A4 /* PreferencesWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesWindow.h; sourceTree = ""; }; 3B2DC55A158CD31E00C004A4 /* PreferencesWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesWindow.m; sourceTree = ""; }; + 3B3A377D15972079002085CE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 3B3A378015972080002085CE /* de */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = de; path = de.lproj/MainMenu.xib; sourceTree = ""; }; + 3B3A3782159727FE002085CE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 3B3A378415972803002085CE /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 3B3A378515973040002085CE /* MP3Lyrics.h */ = {isa = PBXFileReference; fileEncoding = 4; path = MP3Lyrics.h; sourceTree = ""; }; + 3B3A378615973040002085CE /* MP3Lyrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MP3Lyrics.m; sourceTree = ""; }; + 3B5E8BA0159496DA0028363E /* Songtexte.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Songtexte.h; sourceTree = ""; }; + 3B5E8BA1159496DA0028363E /* Songtexte.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Songtexte.m; sourceTree = ""; }; + 3B5E8BA315949B380028363E /* LyricsHosterUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LyricsHosterUtil.h; sourceTree = ""; }; + 3B5E8BA415949B380028363E /* LyricsHosterUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LyricsHosterUtil.m; sourceTree = ""; }; 3B5E8ECD158E788D0082A769 /* Spotify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Spotify.h; sourceTree = ""; }; 3B5E8ED1158E7AC40082A769 /* Spotify.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Spotify.icns; sourceTree = ""; }; 3B73010C158CDF7200D3AF26 /* AutoLyrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutoLyrics.h; sourceTree = ""; }; 3B73010D158CDF7200D3AF26 /* AutoLyrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AutoLyrics.m; sourceTree = ""; }; 3B81D4FD1586248F00916CE3 /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = System/Library/Frameworks/ScriptingBridge.framework; sourceTree = SDKROOT; }; 3B81D5041586298100916CE3 /* iTunes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTunes.h; sourceTree = ""; }; - 3BBD9B72158C7F8A00A5CD2C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 3B9A335F1590BDE700B844EF /* iLyrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iLyrics.h; sourceTree = ""; }; + 3B9A33601590BDE700B844EF /* iLyrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iLyrics.m; sourceTree = ""; }; 3BBD9B74158C86DA00A5CD2C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = de; path = de.lproj/Credits.rtf; sourceTree = ""; }; 3BBD9B75158C873F00A5CD2C /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = ""; }; 3BBD9B79158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Growl Registration Ticket.growlRegDict"; sourceTree = ""; }; @@ -88,7 +101,6 @@ 3BE95010158A269D00E78FEF /* Magistrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Magistrix.m; sourceTree = ""; }; 3BE95015158A291500E78FEF /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesController.h; sourceTree = ""; }; 3BE95016158A291500E78FEF /* PreferencesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesController.m; sourceTree = ""; }; - 3BFDD3FA158D420400BF32B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = de; path = de.lproj/MainMenu.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -148,15 +160,17 @@ isa = PBXGroup; children = ( 3B2DC558158CCE8100C004A4 /* Changelog.rtf */, + 3B9A335F1590BDE700B844EF /* iLyrics.h */, + 3B9A33601590BDE700B844EF /* iLyrics.m */, + 3B73010C158CDF7200D3AF26 /* AutoLyrics.h */, + 3B73010D158CDF7200D3AF26 /* AutoLyrics.m */, 3B20EF3D1584EA9A006C0CDF /* AppDelegate.h */, 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */, - 3B20EF401584EA9A006C0CDF /* MainMenu.xib */, + 3B3A377E15972079002085CE /* MainMenu.xib */, 3B2DC559158CD31E00C004A4 /* PreferencesWindow.h */, 3B2DC55A158CD31E00C004A4 /* PreferencesWindow.m */, 3BE95015158A291500E78FEF /* PreferencesController.h */, 3BE95016158A291500E78FEF /* PreferencesController.m */, - 3B73010C158CDF7200D3AF26 /* AutoLyrics.h */, - 3B73010D158CDF7200D3AF26 /* AutoLyrics.m */, 3B20EF501584EAF8006C0CDF /* MainController.h */, 3B20EF511584EAF8006C0CDF /* MainController.m */, 3B20EF5A1584F34E006C0CDF /* SearchResult.h */, @@ -186,9 +200,15 @@ 3B20EF591584F31D006C0CDF /* Lyrics Hoster */ = { isa = PBXGroup; children = ( + 3B20EF5D1584F458006C0CDF /* LyricsHoster.h */, 3BE9500F158A269D00E78FEF /* Magistrix.h */, 3BE95010158A269D00E78FEF /* Magistrix.m */, - 3B20EF5D1584F458006C0CDF /* LyricsHoster.h */, + 3B5E8BA0159496DA0028363E /* Songtexte.h */, + 3B5E8BA1159496DA0028363E /* Songtexte.m */, + 3B3A378515973040002085CE /* MP3Lyrics.h */, + 3B3A378615973040002085CE /* MP3Lyrics.m */, + 3B5E8BA315949B380028363E /* LyricsHosterUtil.h */, + 3B5E8BA415949B380028363E /* LyricsHosterUtil.m */, ); name = "Lyrics Hoster"; sourceTree = ""; @@ -202,7 +222,7 @@ 3B20EF4A1584EAAD006C0CDF /* iTunes.icns */, 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */, 3B20EF4C1584EAAD006C0CDF /* Download-icon.icns */, - 3B20EF6315853345006C0CDF /* Localizable.strings */, + 3B3A3783159727FE002085CE /* Localizable.strings */, ); name = Resources; sourceTree = ""; @@ -261,12 +281,12 @@ files = ( 3B20EF361584EA9A006C0CDF /* InfoPlist.strings in Resources */, 3B20EF3C1584EA9A006C0CDF /* Credits.rtf in Resources */, - 3B20EF421584EA9A006C0CDF /* MainMenu.xib in Resources */, + 3B3A377C15972079002085CE /* MainMenu.xib in Resources */, 3B20EF491584EAA3006C0CDF /* iLyrics.icns in Resources */, 3B20EF4D1584EAAD006C0CDF /* iTunes.icns in Resources */, 3B20EF4E1584EAAD006C0CDF /* Diamond.tiff in Resources */, 3B20EF4F1584EAAD006C0CDF /* Download-icon.icns in Resources */, - 3B20EF6115853345006C0CDF /* Localizable.strings in Resources */, + 3B3A3781159727FE002085CE /* Localizable.strings in Resources */, 3BBD9B7A158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict in Resources */, 3B5E8ED2158E7AC40082A769 /* Spotify.icns in Resources */, ); @@ -288,6 +308,10 @@ 3BE95017158A291500E78FEF /* PreferencesController.m in Sources */, 3B2DC55B158CD31E00C004A4 /* PreferencesWindow.m in Sources */, 3B73010E158CDF7200D3AF26 /* AutoLyrics.m in Sources */, + 3B9A33611590BDE700B844EF /* iLyrics.m in Sources */, + 3B5E8BA2159496DA0028363E /* Songtexte.m in Sources */, + 3B5E8BA515949B380028363E /* LyricsHosterUtil.m in Sources */, + 3B3A378715973040002085CE /* MP3Lyrics.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -311,20 +335,20 @@ name = Credits.rtf; sourceTree = ""; }; - 3B20EF401584EA9A006C0CDF /* MainMenu.xib */ = { + 3B3A377E15972079002085CE /* MainMenu.xib */ = { isa = PBXVariantGroup; children = ( - 3B20EF411584EA9A006C0CDF /* en */, - 3BFDD3FA158D420400BF32B0 /* de */, + 3B3A377D15972079002085CE /* en */, + 3B3A378015972080002085CE /* de */, ); name = MainMenu.xib; sourceTree = ""; }; - 3B20EF6315853345006C0CDF /* Localizable.strings */ = { + 3B3A3783159727FE002085CE /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 3B20EF6215853345006C0CDF /* en */, - 3BBD9B72158C7F8A00A5CD2C /* de */, + 3B3A3782159727FE002085CE /* en */, + 3B3A378415972803002085CE /* de */, ); name = Localizable.strings; sourceTree = ""; diff --git a/iLyrics/AppDelegate.m b/iLyrics/AppDelegate.m index cff1582..ea4b98b 100644 --- a/iLyrics/AppDelegate.m +++ b/iLyrics/AppDelegate.m @@ -7,13 +7,11 @@ // #import "AppDelegate.h" -#import "Magistrix.h" @implementation AppDelegate { iTunesApplication *iTunes; NSArray *keyTokens; NSMutableArray *searchFormat; - Magistrix *magistrix; } @synthesize window; @@ -24,8 +22,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - magistrix = [[Magistrix alloc] init]; - [preferencesController addHoster:magistrix]; keyTokens = [NSArray arrayWithObjects:@"%name%", @"%artist%", @"%album%", nil]; [window setExcludedFromWindowsMenu:YES]; iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; @@ -45,6 +41,7 @@ NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setBool:[quitWhenAllWindowClosedCheckBox state] == NSOnState forKey:@"Quit when all windows are closed"]; [mainController saveToDefalts:defaults]; + [[iLyrics sharediLyrics] saveToDefaults:defaults]; [[AutoLyrics autoLyrics] saveToDefaults:defaults]; [defaults synchronize]; return NSTerminateNow; diff --git a/iLyrics/AutoLyrics.h b/iLyrics/AutoLyrics.h index 2f5c5a9..e043060 100644 --- a/iLyrics/AutoLyrics.h +++ b/iLyrics/AutoLyrics.h @@ -9,7 +9,8 @@ #import #import #import "iTunes.h" -#import "Magistrix.h" +#import "LyricsHoster.h" +#import "iLyrics.h" @interface AutoLyrics : NSObject diff --git a/iLyrics/AutoLyrics.m b/iLyrics/AutoLyrics.m index c17ce66..af4fa1e 100644 --- a/iLyrics/AutoLyrics.m +++ b/iLyrics/AutoLyrics.m @@ -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 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]; diff --git a/iLyrics/LyricsHoster.h b/iLyrics/LyricsHoster.h index 992a59c..5cb137f 100644 --- a/iLyrics/LyricsHoster.h +++ b/iLyrics/LyricsHoster.h @@ -7,11 +7,13 @@ // #import -#import "SearchResult.h" #import "Lyrics.h" +#import "LyricsHosterUtil.h" @protocol LyricsHoster +@property BOOL enabled; + -(NSString*) name; -(NSDate*) hosterVersion; @@ -25,7 +27,12 @@ -(void) resetLoadedResults; +-(BOOL) canShowInBrowser:(id)result; + +-(void) showInBrowser:(id)result; + //Return nil for a "network error" --(Lyrics*) lyricsBySearchResult: (SearchResult *) result; +//parameter should be a SearchResult instance +-(Lyrics*) lyricsBySearchResult: (id) result; @end diff --git a/iLyrics/LyricsHosterUtil.h b/iLyrics/LyricsHosterUtil.h new file mode 100644 index 0000000..bd83cb5 --- /dev/null +++ b/iLyrics/LyricsHosterUtil.h @@ -0,0 +1,14 @@ +// +// LyricsHosterUtil.h +// iLyrics +// +// Created by Kim Wittenburg on 22.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface NSString(LyricsHosterUtil) +-(NSString *) stringByRemovingHTMLTags; +-(NSString *) stringByFormattingForURL; +@end diff --git a/iLyrics/LyricsHosterUtil.m b/iLyrics/LyricsHosterUtil.m new file mode 100644 index 0000000..080a76a --- /dev/null +++ b/iLyrics/LyricsHosterUtil.m @@ -0,0 +1,23 @@ +// +// LyricsHosterUtil.m +// iLyrics +// +// Created by Kim Wittenburg on 22.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "LyricsHosterUtil.h" + +@implementation NSString(LyricsHosterUtil) + +-(NSString*) stringByRemovingHTMLTags { + return [[[[[[[[[[[[[[[self + stringByReplacingOccurrencesOfString:@"\n" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@"\n\n"] stringByReplacingOccurrencesOfString:@"
" withString:@"\n"] stringByReplacingOccurrencesOfString:@"
" withString:@"\n"] stringByReplacingOccurrencesOfString:@""" withString:@"\""] stringByReplacingOccurrencesOfString:@"&" withString:@"&"] stringByReplacingOccurrencesOfString:@"'" withString:@"'"] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; +} + +-(NSString *) stringByFormattingForURL { + //Can replace äöü with aou, no difference in results + NSCharacterSet *characters = [[NSCharacterSet alphanumericCharacterSet] invertedSet]; + return [[[self stringByReplacingOccurrencesOfString:@" " withString:@"+"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:characters]; +} +@end diff --git a/iLyrics/MP3Lyrics.h b/iLyrics/MP3Lyrics.h new file mode 100644 index 0000000..58010bc --- /dev/null +++ b/iLyrics/MP3Lyrics.h @@ -0,0 +1,14 @@ +// +// Mp3Lyrics.h +// iLyrics +// +// Created by Kim Wittenburg on 24.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import "LyricsHoster.h" + +@interface MP3Lyrics : NSObject + +@end diff --git a/iLyrics/MP3Lyrics.m b/iLyrics/MP3Lyrics.m new file mode 100644 index 0000000..8ae31b5 --- /dev/null +++ b/iLyrics/MP3Lyrics.m @@ -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:@"
"].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 diff --git a/iLyrics/Magistrix.h b/iLyrics/Magistrix.h index 9cd441b..8585575 100644 --- a/iLyrics/Magistrix.h +++ b/iLyrics/Magistrix.h @@ -5,6 +5,7 @@ // Created by Kim Wittenburg on 14.06.12. // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // +// Representing http://www.magistrix.de #import #import "LyricsHoster.h" diff --git a/iLyrics/Magistrix.m b/iLyrics/Magistrix.m index 2b91c8b..d4c8a19 100644 --- a/iLyrics/Magistrix.m +++ b/iLyrics/Magistrix.m @@ -6,9 +6,9 @@ // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // // -//TODO: Use correct Date #import "Magistrix.h" +#import "SearchResult.h" typedef enum { LyricsPage, @@ -21,8 +21,11 @@ typedef enum { NSString *query; int loadedResults; int resultCount; + NSString *firstPage; } +@synthesize enabled; + -(NSString*) name { return @"Magistrix"; } @@ -34,6 +37,23 @@ typedef enum { -(void) startNewSearchForQuery: (NSString*) q { [self resetLoadedResults]; query = q; + int site = (loadedResults/10) + 1; + NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [query stringByFormattingForURL], site]; + NSURL *searchURL = [NSURL URLWithString:searchPath]; + NSError *error; + firstPage = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error]; + if (error || firstPage == nil) { + firstPage = nil; + return; + } + PageType type = [self typeOfPage:firstPage]; + if (type == ResultsPage) { + [self shouldSetResultCountFromPage:firstPage]; + } else if (type == LyricsPage) { + resultCount = 1; + } else { + resultCount = 0; + } } -(BOOL) hasMoreResults { @@ -42,38 +62,33 @@ typedef enum { -(NSArray*) nextResults { int site = (loadedResults/10) + 1; - NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [self stringByFormattingQuery:query], site]; + NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [query stringByFormattingForURL] , site]; NSURL *searchURL = [NSURL URLWithString:searchPath]; - NSError *error; - NSString *page = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error]; - if (error) { - //Network error or invalid query - return nil; + NSString *page; + if (site == 1 && firstPage != nil) { + page = firstPage; + } else { + NSError *error; + page = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error]; + if (error) { + //Network error or invalid query + return nil; + } } PageType pType = [self typeOfPage:page]; if (pType == LyricsPage) { - resultCount = 1; loadedResults = 1; return [NSArray arrayWithObject:[self searchResultFromLyricsPage:page atURL:searchURL]]; } else if (pType == ResultsPage) { - [self shouldSetResultCountFromPage:page]; return [self searchResultsFromPage:page]; } else if (pType == NoResultsPage) { - resultCount = 0; return [[NSArray alloc] init]; } else { NSRunAlertPanel(NSLocalizedString(@"Magistrix.messages.unknownPage.title", @""), NSLocalizedString(@"Magistrix.messages.unknownPage.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); - resultCount = 0; return [[NSArray alloc] init]; } } --(NSString *) stringByFormattingQuery: (NSString *) q { - //Can replace äöü with aou, no difference in results - NSCharacterSet *characters = [[NSCharacterSet alphanumericCharacterSet] invertedSet]; - return [[[q stringByReplacingOccurrencesOfString:@" " withString:@"+"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] stringByTrimmingCharactersInSet:characters]; -} - -(PageType) typeOfPage: (NSString *) page { if ([page rangeOfString:@"Songtext-Suche"].location != NSNotFound) { if ([page rangeOfString:@"
"].location != NSNotFound) { @@ -96,12 +111,12 @@ typedef enum { int artistEnd = artistEndTag.location; int songNameStart = NSMaxRange(artistEndTag); int songNameEnd = headingEnd; - NSString *artist = [self stringByRemovingHTMLTags:[page substringWithRange:NSMakeRange(artistStart, artistEnd-artistStart)]]; + NSString *artist = [[page substringWithRange:NSMakeRange(artistStart, artistEnd-artistStart)] stringByRemovingHTMLTags]; NSString *songName = [page substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)]; //Remove the " Lyric" and the " – " from the Song name - songName = [self stringByRemovingHTMLTags:[[songName substringToIndex:[songName length]-[@" Lyric" length]] substringFromIndex:[@" – " length]]]; + songName = [[[songName substringToIndex:[songName length]-[@" Lyric" length]] substringFromIndex:[@" – " length]] stringByRemovingHTMLTags]; NSString *preview = [self lyricsFromPage:page]; - return [[SearchResult alloc]initWithName:songName fromArtist:artist preview:preview link:url]; + return [[SearchResult alloc]initWithName:songName fromArtist:artist preview:preview link:url loadedByHoster:self]; } -(NSArray*) searchResultsFromPage: (NSString *) page { @@ -139,8 +154,7 @@ typedef enum { NSRange artistStartRange = [tag rangeOfString:@">"]; int artistEndIndex = [tag rangeOfString:@"<" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:artistStartRange]].location; int artistStartIndex = NSMaxRange(artistStartRange); - NSString *artist = [self stringByRemovingHTMLTags:[tag substringWithRange:NSMakeRange(artistStartIndex, artistEndIndex-artistStartIndex)]]; - + NSString *artist = [[tag substringWithRange:NSMakeRange(artistStartIndex, artistEndIndex-artistStartIndex)] stringByRemovingHTMLTags]; NSRange restRange = [self restRangeFromString:tag subtractingRange:NSMakeRange(artistEndIndex, [@"" length])]; NSRange songNameTagStartRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]]); int songNameEnd = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]].location; - NSString *songName = [self stringByRemovingHTMLTags:[tag substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)]]; + NSString *songName = [[tag substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)] stringByRemovingHTMLTags]; int previewStart = songNameEnd + [@"" length] + [@"\n

" length]; NSRange previewRestRange = NSMakeRange(previewStart, [tag length]-previewStart); int previewEnd = [tag rangeOfString:@"

" options:NSCaseInsensitiveSearch range:previewRestRange].location; - NSString *preview = [self stringByRemovingHTMLTags:[tag substringWithRange:NSMakeRange(previewStart, previewEnd-previewStart)]]; - return [[SearchResult alloc] initWithName:songName fromArtist:artist preview:preview link:link]; + NSString *preview = [[tag substringWithRange:NSMakeRange(previewStart, previewEnd-previewStart)] stringByRemovingHTMLTags]; + return [[SearchResult alloc] initWithName:songName fromArtist:artist preview:preview link:link loadedByHoster:self]; } -(NSURL*) urlFromHref: (NSString *) link { @@ -164,9 +178,6 @@ typedef enum { } } --(NSString*) stringByRemovingHTMLTags: (NSString *)string { - return [[[[[[[[[[[string stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@""] stringByReplacingOccurrencesOfString:@"
" withString:@""] stringByReplacingOccurrencesOfString:@""" withString:@"\""] stringByReplacingOccurrencesOfString:@"&" withString:@"&"]; -} -(NSRange) restRangeFromString: (NSString *) page subtractingRange: (NSRange) aRange { int loc = NSMaxRange(aRange); @@ -174,7 +185,7 @@ typedef enum { } -(void) shouldSetResultCountFromPage: (NSString *) page { - if (resultCount == 0) { + if (resultCount <= 0) { //Nothing loaded before NSRange resultsLabelStartRange = [page rangeOfString:@"

Ergebnisse 1 bis "]; int resultsLabelEnd = [page rangeOfString:@"

" options:NSCaseInsensitiveSearch range:[self restRangeFromString:page subtractingRange:resultsLabelStartRange]].location; @@ -196,6 +207,7 @@ typedef enum { -(void) resetLoadedResults { loadedResults = 0; + firstPage = nil; } -(Lyrics*) lyricsBySearchResult: (SearchResult *) result { @@ -208,13 +220,20 @@ typedef enum { return [[Lyrics alloc] initWithName:[result name] byArtist:[result artist] withLyrics:lyrics]; } - -(NSString *) lyricsFromPage: (NSString *)page { int lyricsStart = NSMaxRange([page rangeOfString:@"
"]) + [@"\n" length]; NSRange restRange = NSMakeRange(lyricsStart, [page length]-lyricsStart); int lyricsEnd = [page rangeOfString:@"
" options:NSCaseInsensitiveSearch range:restRange].location; - NSString *lyrics = [self stringByRemovingHTMLTags:[page substringWithRange:NSMakeRange(lyricsStart, lyricsEnd-lyricsStart)]]; + NSString *lyrics = [[page substringWithRange:NSMakeRange(lyricsStart, lyricsEnd-lyricsStart)] stringByRemovingHTMLTags]; return lyrics; } +-(BOOL)canShowInBrowser:(id)result { + return YES; +} + +-(void)showInBrowser:(id)result { + [[NSWorkspace sharedWorkspace] openURL:[result link]]; +} + @end diff --git a/iLyrics/MainController.h b/iLyrics/MainController.h index 35a4a3d..60a2c5e 100644 --- a/iLyrics/MainController.h +++ b/iLyrics/MainController.h @@ -6,37 +6,24 @@ // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // -#import -#import -#import -#import -#import "iTunes.h" -#import "Spotify.h" -#import "Magistrix.h" -#import "SearchResult.h" -#import "Lyrics.h" -#import +#import "iLyrics.h" @interface MainController : NSObject @property (weak) IBOutlet NSMenuItem *iLyricsMenuItem; @property (unsafe_unretained) IBOutlet NSWindow *window; @property (weak) IBOutlet NSSearchField *searchField; @property (weak) IBOutlet NSOutlineView *resultsOutline; -@property (weak) IBOutlet NSButton *loadMoreResultsButton; @property (weak) IBOutlet NSButton *showPreviewCheckBox; @property (weak) IBOutlet NSPopover *previewPopover; @property (unsafe_unretained) IBOutlet NSTextView *previewTextArea; @property (weak) IBOutlet NSTextField *songLabel; @property (weak) IBOutlet NSTextField *artistLabel; -@property (weak) IBOutlet NSButton *sendToiTunesButton; -@property (weak) IBOutlet NSButton *downloadLyricsButton; @property (unsafe_unretained) IBOutlet NSTextView *lyricsArea; @property (readonly) Lyrics *currentLyrics; - (IBAction)getCurrentiTunesSong:(id)sender; - (IBAction)getCurrentSpotifySong:(id)sender; - (IBAction)startNewSearch:(id)sender; -- (IBAction)loadNextResults:(id)sender; - (IBAction)resetLoadedResults:(id)sender; - (IBAction)lyricsSelectionChanged:(NSOutlineView *)sender; - (IBAction)sendLyricsToiTunes:(id)sender; diff --git a/iLyrics/MainController.m b/iLyrics/MainController.m index 6049ae1..a28c1cd 100644 --- a/iLyrics/MainController.m +++ b/iLyrics/MainController.m @@ -10,46 +10,46 @@ @implementation MainController { NSMutableArray *loadedResults; - id currentHoster; BOOL lyricsSelected; NSInteger selectedSavePanelButton; NSURL *saveFile; - iTunesApplication *iTunes; - SpotifyApplication *spotify; Lyrics *currentLyrics; int selectedRow; + iLyrics *ilyrics; } @synthesize iLyricsMenuItem; @synthesize window; @synthesize searchField; @synthesize resultsOutline; -@synthesize loadMoreResultsButton; @synthesize showPreviewCheckBox; @synthesize previewPopover; @synthesize previewTextArea; @synthesize songLabel; @synthesize artistLabel; -@synthesize sendToiTunesButton; -@synthesize downloadLyricsButton; @synthesize lyricsArea; -(id)init { - iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; - spotify = [SBApplication applicationWithBundleIdentifier:@"com.spotify.client"]; loadedResults = [[NSMutableArray alloc] init]; - currentHoster = [[Magistrix alloc] init]; + ilyrics = [iLyrics sharediLyrics]; return [super init]; } +-(void)awakeFromNib { + [self lyricsSelectionChanged:resultsOutline]; +} + #pragma mark - #pragma mark Outline view Data Source and Delegate -(NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { - return item == nil ? [loadedResults count] : 0; + return item == nil ? [loadedResults count] + 1 : 1; } -(id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item { + if (index == [outlineView numberOfRows]-1) { + return NSLocalizedString(@"iLyrics.text.loadMoreResults", @""); + } return [loadedResults objectAtIndex:index]; } @@ -58,18 +58,41 @@ } -(id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { + if ([item isKindOfClass:[NSString class]]) { + return item; + } if ([[tableColumn identifier] isEqualToString:@"song"]) { return [item name]; - } else { + } else if ([[tableColumn identifier] isEqualToString:@"artist"]) { return [item artist]; + } else { + return [[item loadedByHoster] name]; + } +} + +-(NSCell *)outlineView:(NSOutlineView *)outlineView dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item { + if ([item isKindOfClass:[NSString class]]) { + NSPopUpButtonCell *cell = [[NSPopUpButtonCell alloc] init]; + NSMenu *menu = [[NSMenu alloc] init]; + NSMenuItem *titleItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"iLyrics.text.loadNextResultsFrom", @"") action:@selector(nothingResponsible:soDisable:titleItem:) keyEquivalent:@""]; + [menu addItem:titleItem]; + for (id hoster in [ilyrics lyricsHosters]) { + NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithFormat:@" %@", [hoster name]] action:@selector(loadNextResults:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menu addItem:menuItem]; + } + [cell setMenu:menu]; + [cell setControlSize:NSMiniControlSize]; + return cell; } return nil; } - -(NSString *)outlineView:(NSOutlineView *)outlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn item:(id)item mouseLocation:(NSPoint)mouseLocation { //item is an instance of SearchResult - [self shouldShowPreviewForCellRect:*rect searchResult:item]; + if ([item isKindOfClass:[SearchResult class]]) { + [self shouldShowPreviewForCellRect:*rect searchResult:item]; + } return nil; } @@ -77,11 +100,7 @@ #pragma mark Responding to Lyrics Search - (IBAction)getCurrentiTunesSong:(id)sender { - iTunesTrack *track = [iTunes currentTrack]; - if (track == nil) { - NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.iTunesIdle.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iTunes.messages.iTunesIdle.detail", @"")); - return; - } + iTunesTrack *track = [[ilyrics iTunes] currentTrack]; NSString *name = [track name]; NSString *artist = [track artist]; if (name == nil) { @@ -94,7 +113,7 @@ } - (IBAction)getCurrentSpotifySong:(id)sender { - SpotifyTrack *track = [spotify currentTrack]; + SpotifyTrack *track = [[ilyrics spotify] currentTrack]; NSString *name = [track name]; NSString *artist = [track artist]; if (name == nil) { @@ -109,36 +128,97 @@ - (IBAction)startNewSearch:(id)sender { [self resetLoadedResults:sender]; if ([[searchField stringValue] length] > 0) { - [currentHoster startNewSearchForQuery:[searchField stringValue]]; - [self loadNextResults:sender]; + for (id hoster in [ilyrics lyricsHosters]) { + [hoster startNewSearchForQuery:[searchField stringValue]]; + } + //Load first results + BOOL networkError = YES; + BOOL resultsFound = NO; + for (id hoster in [ilyrics lyricsHosters]) { + NSArray *results = [hoster nextResults]; + if (results) { + networkError = NO; + if ([results count] > 0) { + resultsFound = YES; + [loadedResults addObjectsFromArray:results]; + [resultsOutline reloadData]; + break; + } + } else { + networkError = networkError && YES; + } + } + if (networkError) { + [self presentNetworkErrorWithHoster:nil]; + } else if (!resultsFound) { + [self presentNoResultsErrorWithHoster:nil]; + } } + [self lyricsSelectionChanged:resultsOutline]; } -- (IBAction)loadNextResults:(id)sender { - NSArray *nextResults = [currentHoster nextResults]; - [loadMoreResultsButton setEnabled:[currentHoster hasMoreResults]]; +- (void)loadNextResults:(id)sender{ + [self loadNextResultsFromHoster:[ilyrics hosterWithName:[sender title]]]; +} + +- (void) loadNextResultsFromHoster: (id) hoster { + if (hoster == nil) { + return; + } + NSArray *nextResults = [hoster nextResults]; if (nextResults == nil) { - NSRunCriticalAlertPanel(NSLocalizedString(@"Hoster.messages.networkOrQueryError.title", @""), NSLocalizedString(@"Hoster.messages.networkOrQueryError.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + [self presentNetworkErrorWithHoster:hoster]; return; } if ([nextResults count] == 0) { - NSRunAlertPanel(NSLocalizedString(@"Hoster.messages.noResults.title", @""), NSLocalizedString(@"Hoster.messages.noResults.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + [self presentNoResultsErrorWithHoster:hoster]; return; } [loadedResults addObjectsFromArray:nextResults]; [resultsOutline reloadData]; } +-(void)presentNetworkErrorWithHoster: (id)hoster { + NSString *title; + NSString *detail; + if (hoster) { + title = [NSLocalizedString(@"Hoster.messages.networkOrQueryError.title", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[hoster name]]; + detail = [NSLocalizedString(@"Hoster.messages.networkOrQueryError.detail", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[hoster name]]; + } else { + title = NSLocalizedString(@"iLyrics.messages.networkOrQueryError.title", @""); + detail = NSLocalizedString(@"iLyrics.messages.networkOrQueryError.detail", @""); + } + NSRunCriticalAlertPanel(title, detail, NSLocalizedString(@"OK", @""), nil, nil); +} + +-(void)presentNoResultsErrorWithHoster: (id)hoster { + NSString *title; + NSString *detail; + if (hoster) { + title = [NSLocalizedString(@"Hoster.messages.noResults.title", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[hoster name]]; + detail = [NSLocalizedString(@"Hoster.messages.noResults.detail", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[hoster name]]; + } else { + title = NSLocalizedString(@"iLyrics.messages.noResults.title", @"") ; + detail = NSLocalizedString(@"iLyrics.messages.noResults.detail", @""); + } + NSRunAlertPanel(title, detail, NSLocalizedString(@"OK", @""), nil, nil); + +} + -(IBAction)resetLoadedResults:(id)sender { - [currentHoster resetLoadedResults]; + for (id hoster in [ilyrics lyricsHosters]) { + [hoster resetLoadedResults]; + } [loadedResults removeAllObjects]; [resultsOutline reloadData]; - [loadMoreResultsButton setEnabled:[currentHoster hasMoreResults]]; [self lyricsSelectionChanged:resultsOutline]; } - (IBAction)lyricsSelectionChanged:(NSOutlineView *)sender { int index = [sender selectedRow]; + if (index == [sender numberOfRows]-1) { + index = -1; + } if (index < 0) { lyricsSelected = NO; currentLyrics = nil; @@ -151,10 +231,12 @@ if (selectedRow != index) { lyricsSelected = YES; SearchResult *result = [loadedResults objectAtIndex:index]; - Lyrics *lyrics = [currentHoster lyricsBySearchResult:result]; + Lyrics *lyrics = [[result loadedByHoster] lyricsBySearchResult:result]; currentLyrics = lyrics; if (lyrics == nil) { - NSRunCriticalAlertPanel(NSLocalizedString(@"Hoster.messages.networkError.title", @""), NSLocalizedString(@"Hoster.messages.networkError.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + NSString *title = [NSLocalizedString(@"Hoster.messages.networkOrQueryError.title", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[[result loadedByHoster] name]]; + NSString *detail = [NSLocalizedString(@"Hoster.messages.networkOrQueryError.detail", @"") stringByReplacingOccurrencesOfString:@"%hoster%" withString:[[result loadedByHoster] name]]; + NSRunCriticalAlertPanel(title, detail, NSLocalizedString(@"OK", @""), nil, nil); NSString *noNetwork = NSLocalizedString(@"Hoster.text.noNetwork", @""); [songLabel setStringValue:noNetwork]; [artistLabel setStringValue:noNetwork]; @@ -176,14 +258,14 @@ NSString *lyrics = [result preview]; if (lyrics) { rect.size.width = [resultsOutline frame].size.width; - [previewTextArea setString:lyrics]; + [previewTextArea setString:lyrics==nil?NSLocalizedString(@"Hoster.text.noPreviewAvailable", @""):lyrics]; [previewPopover showRelativeToRect:rect ofView:resultsOutline preferredEdge:NSMaxXEdge]; } } } - (IBAction)sendLyricsToiTunes:(id)sender { - iTunesTrack *track = [iTunes currentTrack]; + iTunesTrack *track = [[ilyrics iTunes] currentTrack]; NSString *name = [track name]; if (name == nil) { NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.noTrackPlaying.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iTunes.messages.noTrackPlaying.detail", @"")); @@ -199,7 +281,7 @@ - (void)replaceLyricsSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { if (returnCode == NSAlertDefaultReturn) { - iTunesTrack *track = [iTunes currentTrack]; + iTunesTrack *track = [[ilyrics iTunes] currentTrack]; [track setLyrics:[lyricsArea string]]; [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]; } @@ -225,8 +307,8 @@ if (row < 0) { row = [resultsOutline selectedRow]; } - NSURL *link = [[loadedResults objectAtIndex:row] link]; - [[NSWorkspace sharedWorkspace] openURL:link]; + SearchResult *result = [loadedResults objectAtIndex:row]; + [[result loadedByHoster] showInBrowser:result]; } -(void) savePanelDidClose: (NSNotification *) notification{ @@ -234,7 +316,7 @@ if (selectedSavePanelButton == NSOKButton) { BOOL success = [[[lyricsArea string] dataUsingEncoding:NSUTF8StringEncoding] writeToURL:saveFile atomically:NO]; if (!success) { - NSBeginAlertSheet(NSLocalizedString(@"messages.error.saveLyrics.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"messages.error.saveLyrics.detail", @"")); + NSBeginAlertSheet(NSLocalizedString(@"iLyrics.messages.error.saveLyrics.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iLyrics.messages.error.saveLyrics.detail", @"")); } else { [GrowlApplicationBridge notifyWithTitle:NSLocalizedString(@"Growl.messages.lyricsSaved.title", @"") description:[NSString stringWithFormat:NSLocalizedString(@"Growl.messages.lyricsSaved.detail", @""), [saveFile path]] notificationName:@"Lyrics saved to File" iconData:nil priority:0 isSticky:NO clickContext:nil]; } @@ -270,6 +352,11 @@ #pragma mark window delegate -(BOOL)validateMenuItem:(NSMenuItem *)menuItem { + SEL action = [menuItem action]; + if (action == @selector(loadNextResults:)) { + BOOL hasMore = [[ilyrics hosterWithName:[menuItem title]] hasMoreResults]; + return hasMore; + } return [self validateUserInterfaceItem:menuItem]; } @@ -280,28 +367,28 @@ -(BOOL)validateUserInterfaceItem:(id)item { SEL action = [item action]; if (action == @selector(downloadLyrics:)) { - [downloadLyricsButton setEnabled:lyricsSelected]; return lyricsSelected; } if (action == @selector(sendLyricsToiTunes:)) { - BOOL enabled = lyricsSelected && [iTunes isRunning]; - [sendToiTunesButton setEnabled:enabled]; + BOOL enabled = lyricsSelected && [[ilyrics iTunes] isRunning]; return enabled; } if (action == @selector(getCurrentiTunesSong:)) { - return [iTunes isRunning]; + return [[ilyrics iTunes] isRunning]; } if (action == @selector(getCurrentSpotifySong:)) { - return [spotify isRunning]; + return [[ilyrics spotify] isRunning]; } if (action == @selector(showPreview:)) { return [resultsOutline clickedRow] >= 0; } if (action == @selector(showLyricsInBrowser:)) { if ([resultsOutline clickedRow] >= 0) { - return YES; - } else if ([resultsOutline selectedRow] >= 0) { - return YES; + SearchResult *result = [loadedResults objectAtIndex:[resultsOutline clickedRow]]; + return [[result loadedByHoster] canShowInBrowser:result];; + } else if ([resultsOutline selectedRow] >= 0) { + SearchResult *result = [loadedResults objectAtIndex:[resultsOutline selectedRow]]; + return [[result loadedByHoster] canShowInBrowser:result];; } else { return NO; } diff --git a/iLyrics/PreferencesController.h b/iLyrics/PreferencesController.h index 3fafd5c..3a1ad17 100644 --- a/iLyrics/PreferencesController.h +++ b/iLyrics/PreferencesController.h @@ -11,20 +11,16 @@ #import "PreferencesWindow.h" #import "AutoLyrics.h" -@interface PreferencesController : NSObject +@interface PreferencesController : NSObject @property (unsafe_unretained) IBOutlet PreferencesWindow *preferencesWindow; @property (weak) IBOutlet NSToolbarItem *generalButton; @property (weak) IBOutlet NSTableView *hosterTable; -@property NSArray *hosters; @property (weak) IBOutlet NSView *generalView; @property (weak) IBOutlet NSView *autoLyricsView; @property (weak) IBOutlet NSButton *toggleAutoLyricsButton; @property (weak) IBOutlet NSButton *replaceOldCheckBox; --(void) addHoster: (id) hoster; --(void) removeHoster: (id) hoster; - - (IBAction)showGeneralPreferences:(id)sender; - (IBAction)showAutoLyricsPreferences:(id)sender; diff --git a/iLyrics/PreferencesController.m b/iLyrics/PreferencesController.m index 497a79c..23f9b1a 100644 --- a/iLyrics/PreferencesController.m +++ b/iLyrics/PreferencesController.m @@ -6,13 +6,14 @@ // Copyright (c) 2012 __MyCompanyName__. All rights reserved. // //TODO: Implement Auto-Lyricds Interval -//TODO: Set the title of the window when the toolbar button selection changed +//TODO: #import "PreferencesController.h" +#import "iLyrics.h" @implementation PreferencesController { - NSMutableArray *hosters; AutoLyrics *autoLyrics; + iLyrics *ilyrics; } @synthesize generalView; @synthesize autoLyricsView; @@ -23,14 +24,15 @@ @synthesize hosterTable; -(id)init { + ilyrics = [iLyrics sharediLyrics]; autoLyrics = [AutoLyrics autoLyrics]; - hosters = [[NSMutableArray alloc] init]; return [super init]; } #pragma mark - #pragma mark Window Delegate Methods +#define HosterDataType @"HosterDataType" -(void)awakeFromNib { if ([autoLyrics enabled]) { [self enableAutoLyrics:toggleAutoLyricsButton]; @@ -44,37 +46,19 @@ } [[preferencesWindow toolbar] setSelectedItemIdentifier:@"general"]; [self showGeneralPreferences:nil]; + [hosterTable registerForDraggedTypes:[NSArray arrayWithObject:HosterDataType]]; } #pragma mark - -#pragma mark Properties - --(NSArray *)hosters { - return hosters; -} - --(void)setHosters:(NSArray *)hstrs { - hosters = [NSMutableArray arrayWithArray:hstrs]; - [hosterTable reloadData]; -} - #pragma mark Modifying hosters --(void)addHoster:(id)hoster { - [hosters addObject:hoster]; - [hosterTable reloadData]; -} - --(void)removeHoster:(id)hoster { - [hosters removeObject:hoster]; - [hosterTable reloadData]; -} - - (IBAction)showGeneralPreferences:(id)sender { + [preferencesWindow setTitle:NSLocalizedString(@"iLyrics.preferences.text.general", @"")]; [self changeContentViewTo:generalView]; } -(IBAction)showAutoLyricsPreferences:(id)sender { + [preferencesWindow setTitle:NSLocalizedString(@"iLyrics.preferences.text.auto-lyrics", @"")]; [self changeContentViewTo:autoLyricsView]; } @@ -88,12 +72,12 @@ -(void)enableAutoLyrics: (id) sender{ [autoLyrics setEnabled:YES]; - [sender setTitle:NSLocalizedString(@"iLyrics.text.disableAutoLyrics", @"")]; + [sender setTitle:NSLocalizedString(@"iLyrics.preferences.text.disableAutoLyrics", @"")]; } -(void)disableAutoLyrics: (id) sender { [autoLyrics setEnabled:NO]; - [sender setTitle:NSLocalizedString(@"iLyrics.text.enableAutoLyrics", @"")]; + [sender setTitle:NSLocalizedString(@"iLyrics.preferences.text.enableAutoLyrics", @"")]; } - (IBAction)changeAutoLyricsInterval:(id)sender { @@ -112,18 +96,61 @@ #pragma mark - #pragma mark Table Data Source -(NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { - return [hosters count]; + return [[ilyrics lyricsHosters] count]; } -(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { + id hoster = [[ilyrics lyricsHosters] objectAtIndex:row]; if ([[tableColumn identifier] isEqualToString:@"hoster"]) { - return [[hosters objectAtIndex:row] name]; + return [hoster name]; } else { - NSDate *version = [[hosters objectAtIndex:row] hosterVersion]; + NSDate *version = [hoster hosterVersion]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterLongStyle]; [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; return [dateFormatter stringFromDate:version]; } } + +#pragma mark Drag and Drop Hosters +-(BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard { + // Copy the row numbers to the pasteboard. + NSData *indexData = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes]; + [pboard declareTypes:[NSArray arrayWithObject:HosterDataType] owner:self]; + [pboard setData:indexData forType:HosterDataType]; + return YES; +} + +- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id)info proposedRow:(NSInteger)row + proposedDropOperation:(NSTableViewDropOperation)op { + // Add code here to validate the drop + return NSDragOperationMove; +} + +- (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id)info row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation { + + NSPasteboard* pboard = [info draggingPasteboard]; + NSData* rowData = [pboard dataForType:HosterDataType]; + NSIndexSet* rowIndexes = + [NSKeyedUnarchiver unarchiveObjectWithData:rowData]; + NSInteger dragRow = [rowIndexes firstIndex]; + + if (dragRow < row) { + [[ilyrics lyricsHosters] insertObject:[[ilyrics lyricsHosters] objectAtIndex:dragRow] atIndex:row]; + [[ilyrics lyricsHosters] removeObjectAtIndex:dragRow]; + [hosterTable noteNumberOfRowsChanged]; + [hosterTable reloadData]; + return YES; + + } + + id draggedHoster = [[ilyrics lyricsHosters] objectAtIndex:dragRow]; + [[ilyrics lyricsHosters] removeObjectAtIndex:dragRow]; + [[ilyrics lyricsHosters] insertObject:draggedHoster atIndex:row]; + [hosterTable noteNumberOfRowsChanged]; + [hosterTable reloadData]; + + return YES; +} + @end diff --git a/iLyrics/SearchResult.h b/iLyrics/SearchResult.h index a5e15fa..9758b59 100644 --- a/iLyrics/SearchResult.h +++ b/iLyrics/SearchResult.h @@ -7,14 +7,16 @@ // #import +#import "LyricsHoster.h" @interface SearchResult : NSObject @property NSString *name; @property NSString *artist; @property NSString *preview; +@property id loadedByHoster; @property id link; --(id)initWithName: (NSString*) name fromArtist: (NSString*) artist preview: (NSString*) preview link: (id) link; +-(id)initWithName: (NSString*) name fromArtist: (NSString*) artist preview: (NSString*) preview link: (id) link loadedByHoster: (id) hoster; @end diff --git a/iLyrics/SearchResult.m b/iLyrics/SearchResult.m index 3e12acd..37c00f5 100644 --- a/iLyrics/SearchResult.m +++ b/iLyrics/SearchResult.m @@ -12,13 +12,15 @@ @synthesize name; @synthesize artist; @synthesize preview; +@synthesize loadedByHoster; @synthesize link; --(id)initWithName:(NSString *)sng fromArtist:(NSString *)art preview:(NSString *)pre link:(id)l { +-(id)initWithName:(NSString *)sng fromArtist:(NSString *)art preview:(NSString *)pre link:(id)l loadedByHoster:(id)hoster { name = sng; artist = art; preview = pre; link = l; + loadedByHoster = hoster; return self; } @end diff --git a/iLyrics/Songtexte.h b/iLyrics/Songtexte.h new file mode 100644 index 0000000..37eda67 --- /dev/null +++ b/iLyrics/Songtexte.h @@ -0,0 +1,14 @@ +// +// Songtexte.h +// iLyrics +// +// Created by Kim Wittenburg on 22.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// +// Representing http://www.songtexte.com + +#import +#import "LyricsHoster.h" + +@interface Songtexte : NSObject +@end diff --git a/iLyrics/Songtexte.m b/iLyrics/Songtexte.m new file mode 100644 index 0000000..16456cd --- /dev/null +++ b/iLyrics/Songtexte.m @@ -0,0 +1,153 @@ +// +// Songtexte.m +// iLyrics +// +// Created by Kim Wittenburg on 22.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// +// TODO: Implement parsing of multi-page results + +#import "Songtexte.h" +#import "SearchResult.h" + +@implementation Songtexte { + NSString *resultsPage; + BOOL hasMoreResults; + BOOL hadMoreResults; +} + +@synthesize enabled; + +-(NSString *) name { + return @"Songtexte.com"; +} + +-(NSDate *)hosterVersion { + return [NSDate dateWithString:@"2012-06-22 15:00:00 +0100"]; +} + +-(void) startNewSearchForQuery: (NSString *)query { + NSString *searchPath = [NSString stringWithFormat:@"http://www.songtexte.com/search?c=songs&q=%@", [query stringByFormattingForURL]]; + NSURL *searchURL = [NSURL URLWithString:searchPath]; + NSError *error; + NSString *page = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error]; + if (error || page == nil) { + //Network or other error + resultsPage = nil; + hasMoreResults = hadMoreResults = NO; + } + resultsPage = page; + if ([resultsPage rangeOfString:@"\n
\n
"].location == NSNotFound) { + //No Results + hasMoreResults = hadMoreResults = NO; + } else { + hasMoreResults = hadMoreResults = YES; + } +} + +-(BOOL)hasMoreResults { + return hasMoreResults; +} + +-(NSArray *)nextResults { + if (resultsPage == nil) { + //Network or other error + return nil; + } + NSRange tableStartRange = [resultsPage rangeOfString:@"\n
\n"]; + if (tableStartRange.location == NSNotFound) { + //No Results + return [[NSArray alloc] init]; + } + NSRange tableRange = [self restRangeFromString:resultsPage subtractingRange:tableStartRange]; + int resultsTableStart = NSMaxRange([resultsPage rangeOfString:@"
    " options:NSCaseInsensitiveSearch range:tableRange]); + NSRange resultsTableEndRange = [resultsPage rangeOfString:@"
  • " options:NSCaseInsensitiveSearch range:tableRange]; + } + int resultsTableEnd = resultsTableEndRange.location; + hasMoreResults = NO; + return [self resultsFromTable:[resultsPage substringWithRange:NSMakeRange(resultsTableStart, resultsTableEnd-resultsTableStart)]]; +} + +-(NSArray *)resultsFromTable:(NSString *)table { + NSRange restRange = NSMakeRange(0, [table length]); + NSMutableArray *tags = [[NSMutableArray alloc] init]; + NSUInteger currentIndex = [table rangeOfString:@"
  • "].location; + while (currentIndex != NSNotFound) { + int startIndex = currentIndex + [@"
  • " length]; + int endIndex = [table rangeOfString:@"
  • " options:NSCaseInsensitiveSearch range:restRange].location; + NSRange tagRange = NSMakeRange(startIndex, endIndex-startIndex); + SearchResult *result = [self searchResultFromTag:[table substringWithRange:tagRange]]; + if (result) { + [tags addObject:result]; + } + restRange = [self restRangeFromString:table subtractingRange:tagRange]; + restRange.length -= [@"" length]; + restRange.location += [@"" length]; + currentIndex = [table rangeOfString:@"
  • " options:NSCaseInsensitiveSearch range:restRange].location; + } + return tags; +} + +-(SearchResult *) searchResultFromTag: (NSString *)tag { + NSRange artistStartRange = [tag rangeOfString:@"Songtexte, Übersetzungen, Lyrics\">"]; + NSRange artistEndRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:artistStartRange]]; + int artistStart = NSMaxRange(artistStartRange); + NSString *artist = [[tag substringWithRange:NSMakeRange(artistStart, artistEndRange.location-artistStart)] stringByRemovingHTMLTags]; + NSRange songLinkStartRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:hrefEndRange]]; + NSRange nameEndRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:nameStartRange]]; + int nameStart = NSMaxRange(nameStartRange); + NSString *name = [[tag substringWithRange:NSMakeRange(nameStart, nameEndRange.location-nameStart)] stringByRemovingHTMLTags]; + return [[SearchResult alloc] initWithName:name fromArtist:artist preview:nil link:[self urlFromHref:linkHref] loadedByHoster:self]; +} + +-(NSURL*) urlFromHref: (NSString *) link { + if (![link hasPrefix:@"http://www.songtexte.com"]) { + return [NSURL URLWithString:[NSString stringWithFormat:@"http://www.songtexte.com/%@", link]]; + } else { + return [NSURL URLWithString:link]; + } +} + +-(NSRange) restRangeFromString: (NSString *) page subtractingRange: (NSRange) aRange { + int loc = NSMaxRange(aRange); + return NSMakeRange(loc, [page length]-loc); +} + +-(void)resetLoadedResults { + hasMoreResults = hadMoreResults; +} + +-(Lyrics *)lyricsBySearchResult:(id)result { + NSError *error; + NSString *page = [NSString stringWithContentsOfURL:[result link] encoding:NSUTF8StringEncoding error:&error]; + if (error || page == nil) { + return nil; + } + NSRange lyricsStartRange = [page rangeOfString:@"
    "]; + NSRange lyricsEndRange = [page rangeOfString:@"
    " options:NSCaseInsensitiveSearch range:[self restRangeFromString:page subtractingRange:lyricsStartRange]]; + int lyricsStart = NSMaxRange(lyricsStartRange); + NSString *lyrics = [[page substringWithRange:NSMakeRange(lyricsStart, lyricsEndRange.location-lyricsStart)] stringByRemovingHTMLTags]; + return [[Lyrics alloc] initWithName:[result name] byArtist:[result artist] withLyrics:lyrics]; +} + +-(BOOL)canShowInBrowser:(id)result { + return YES; +} + +-(void)showInBrowser:(id)result { + [[NSWorkspace sharedWorkspace] openURL:[result link]]; +} + +@end diff --git a/iLyrics/de.lproj/MainMenu.xib b/iLyrics/de.lproj/MainMenu.xib index b79d980..bf0a620 100644 --- a/iLyrics/de.lproj/MainMenu.xib +++ b/iLyrics/de.lproj/MainMenu.xib @@ -12,6 +12,7 @@ NSTableHeaderView + NSPopUpButton NSMenu NSToolbarItem NSButton @@ -33,6 +34,7 @@ NSToolbarSpaceItem NSView NSOutlineView + NSPopUpButtonCell NSToolbar NSScrollView NSPopover @@ -215,7 +217,7 @@ - + YES YES @@ -225,9 +227,9 @@ - + - Im Browser öffnen + Im Browser anzeigen 2147483647 @@ -235,7 +237,7 @@ - Songtext sichern... + Sichern... s 1048576 2147483647 @@ -289,7 +291,7 @@ - Wiederrufen + Widerrufen z 1048576 2147483647 @@ -646,7 +648,7 @@ - Sprachausgabe beginnen + Sprachausgabe starten 1048576 2147483647 @@ -776,7 +778,7 @@ - Nach aktuellem Titel suchen + Songtext des aktuellen Titels suchen 1048576 2147483647 @@ -895,7 +897,7 @@ 15 2 - {{471, 390}, {861, 462}} + {{471, 390}, {841, 462}} 1954021376 iLyrics NSWindow @@ -919,9 +921,11 @@ Suchen - + 268 {{0, 14}, {96, 22}} + + _NS:9 YES @@ -1030,10 +1034,10 @@ 6DA322F2-E0F6-42F0-8E00-A5FAC1340B60 Von iTunes holen - Von iTunes holen + Von Tunes holen - + NSImage iTunes @@ -1055,7 +1059,7 @@ An iTunes senden - + {0, 0} @@ -1066,9 +1070,9 @@ YES 0 - + - D907D172-E223-4708-B48A-EE062B41F68E + F19D1A15-FED6-48F9-B670-7D7F2D798C5A Von Spotify holen Von Spotify holen @@ -1146,7 +1150,7 @@ - + @@ -1178,15 +1182,15 @@ 293 - {{141, 1}, {72, 18}} + {{197, 1}, {150, 18}} - + _NS:9 YES -2080244224 131072 - Vorschau + Vorschau anzeigen LucidaGrande 11 @@ -1209,33 +1213,10 @@ 25 - - - 289 - {{214, -1}, {140, 23}} - - - _NS:22 - YES - - -1543373312 - 134348800 - Weitere Ergebnisse laden - - _NS:22 - - -2033434369 - 162 - - - 400 - 75 - - 292 - {{0, -1}, {139, 23}} + {{0, -1}, {192, 23}} _NS:22 @@ -1243,7 +1224,7 @@ -2080244224 134348800 - Ergebnisse zurücksetzen + Geladene Ergebnisse zurücksetzen _NS:22 @@ -1266,15 +1247,15 @@ 4352 - {352, 415} + {368, 415} - + _NS:13 YES 256 - {352, 17} + {368, 17} _NS:16 @@ -1290,8 +1271,8 @@ song - 185 - 185 + 129.6015625 + 16 1000 75628096 @@ -1333,8 +1314,8 @@ artist - 161 - 160 + 114 + 16 1000 75628096 @@ -1358,6 +1339,43 @@ YES + + hoster + 115 + 10 + 3.4028234663852886e+38 + + 75628096 + 2048 + Geladen von + + + 6 + System + headerColor + + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + 3 2 @@ -1372,10 +1390,11 @@ 17 - 1388314624 + 1925218304 - 4 + 1 + 1 15 0 YES @@ -1383,17 +1402,12 @@ 1 - {{1, 17}, {352, 415}} + {{1, 17}, {368, 415}} _NS:11 - - 6 - System - controlBackgroundColor - - + 4 @@ -1411,14 +1425,14 @@ -2147483392 - {{1, 417}, {350, 15}} + {{1, 417}, {368, 15}} _NS:60 1 _doScroller: - 0.9971509971509972 + 0.97354497354497349 @@ -1426,7 +1440,7 @@ - {{1, 0}, {352, 17}} + {{1, 0}, {368, 17}} _NS:15 @@ -1435,9 +1449,9 @@ 4 - {{0, 29}, {354, 433}} + {{0, 29}, {370, 433}} - + _NS:9 133682 @@ -1447,7 +1461,7 @@ QSAAAEEgAABBmAAAQZgAAA - {354, 462} + {370, 462} _NS:11 @@ -1468,7 +1482,7 @@ 2322 - {495, 14} + {459, 14} _NS:13 @@ -1487,7 +1501,7 @@ - 495 + 459 1 @@ -1531,7 +1545,7 @@ - {{1, 1}, {495, 367}} + {{1, 1}, {459, 367}} _NS:11 @@ -1546,9 +1560,7 @@ - - file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff - + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff @@ -1563,7 +1575,7 @@ 256 - {{481, 1}, {15, 361}} + {{445, 1}, {15, 361}} _NS:84 @@ -1574,7 +1586,7 @@ 256 - {{1, 353}, {489, 15}} + {{1, 353}, {453, 15}} _NS:33 @@ -1585,7 +1597,7 @@ 0.94565218687057495 - {497, 369} + {461, 369} _NS:9 @@ -1598,58 +1610,90 @@ 266 - + - 265 - {{330, 10}, {153, 32}} + 268 + {{385, 29}, {56, 25}} _NS:9 YES - - 604110336 - 134217728 - Downloaden + + -2080244160 + 134219776 _NS:9 - - -2038284033 - 129 + + -2030944001 + 35 + + LucidaGrande + 13 + 16 + - 200 - 25 - - - - - 265 - {{330, 37}, {153, 32}} - - - _NS:9 - YES - - 604110336 - 134217728 - An iTunes senden - - _NS:9 - - -2038284033 - 129 - - - 200 - 25 + 400 + 75 + + + YES + Wählen Sie eine Aktion... + + 2147483647 + + NSImage + NSActionTemplate + + + + _popUpItemAction: + + + YES + + OtherViews + + + + + An iTunes senden + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Downloaden + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + -1 + YES + 1 + YES + YES + 2 266 - {{82, 20}, {249, 17}} + {{82, 20}, {298, 17}} - + _NS:9 {250, 750} YES @@ -1667,7 +1711,7 @@ 268 - {{17, 20}, {63, 17}} + {{17, 22}, {63, 17}} _NS:1505 @@ -1686,9 +1730,9 @@ 266 - {{82, 47}, {249, 17}} + {{82, 47}, {298, 17}} - + _NS:9 {250, 750} YES @@ -1723,14 +1767,14 @@ - {{0, 377}, {497, 85}} + {{0, 377}, {461, 85}} _NS:9 NSView - {{364, 0}, {497, 462}} + {{380, 0}, {481, 462}} _NS:13 @@ -1745,7 +1789,7 @@ 3 - {861, 462} + {841, 462} @@ -1759,12 +1803,12 @@ MainController - - + + Results Menu - - - Im Browser öffnen + + + Im Browser anzeigen 2147483647 @@ -1782,7 +1826,7 @@ YES - + 268 @@ -1790,6 +1834,7 @@ 268 {{195, -1}, {108, 19}} + _NS:9 YES @@ -1824,7 +1869,7 @@ 2322 {301, 14} - + _NS:13 @@ -1921,7 +1966,7 @@ {{0, 20}, {303, 172}} - + _NS:9 133138 @@ -1930,6 +1975,7 @@ {303, 192} + _NS:9 NSView @@ -1939,7 +1985,7 @@ 2 {{163, 199}, {480, 270}} 1685585920 - iLyrics Einstellungen + iLyrics Preferences PreferencesWindow @@ -1961,7 +2007,7 @@ Auto-Lyrics - + {0, 0} @@ -2064,9 +2110,11 @@ - + 256 {480, 270} + + _NS:20 {{0, 0}, {1680, 1028}} @@ -2077,13 +2125,13 @@ PreferencesController - + 268 268 - {{17, 192}, {106, 17}} + {{17, 192}, {305, 17}} _NS:1505 @@ -2091,10 +2139,11 @@ 68288064 272630784 - Songtext-Seiten - + Drag the Lyrics Hosters in your preferred order. + _NS:1505 + YES @@ -2112,7 +2161,7 @@ 256 {424, 146} - + _NS:13 YES @@ -2139,7 +2188,7 @@ 75628096 2048 - Seite + Lyrics Hoster 3 @@ -2169,14 +2218,9 @@ 75628096 2048 - Zuletzt aktualisiert + Last updated - - 6 - System - headerColor - - + @@ -2232,13 +2276,13 @@ -2147483392 - {{1, 173}, {438, 15}} + {{1, 148}, {424, 15}} _NS:60 1 _doScroller: - 0.97986577181208057 + 0.86354378818737276 @@ -2256,7 +2300,7 @@ {{20, 20}, {426, 164}} - + _NS:9 133682 @@ -2268,15 +2312,15 @@ 268 - {{18, 215}, {326, 18}} + {{18, 215}, {233, 18}} _NS:9 YES 67239424 - 0 - Beenden, wenn alle Fenster geschlossen wurden + 8388608 + Quit when all windows are closed _NS:9 @@ -2292,28 +2336,30 @@ {466, 251} + _NS:9 NSView - + 268 - + 268 - {{12, 17}, {25, 25}} + {{11, 17}, {25, 25}} + _NS:1553 YES - + 604110336 134217728 _NS:1553 - + -2038415105 161 @@ -2325,7 +2371,7 @@ 268 - {{389, 133}, {66, 17}} + {{391, 138}, {66, 17}} _NS:1505 @@ -2344,9 +2390,9 @@ 268 - {{72, 130}, {312, 22}} + {{74, 135}, {312, 22}} - + _NS:9 YES @@ -2414,15 +2460,15 @@ 268 - {{18, 70}, {173, 18}} + {{11, 70}, {132, 18}} - + _NS:9 YES -2080244224 0 - Alte Songtexte ersetzen + Replace old lyrics _NS:9 @@ -2439,15 +2485,16 @@ 268 - {{75, 20}, {374, 42}} + {{71, 22}, {386, 42}} + _NS:9 {250, 750} YES 67239424 272760832 - Aktivieren Sie diese Option, wenn Sie wollen, dass Auto-Lyrics zuvor gespeicherte Songtexte ersetzt. Wenn Sie diese Option deaktivieren, werden Songtexte nur gespeichert, wenn kein vorheriger existiert. + Aktivieren Sie diese Option, wenn Sie alle zuvor gesicherten Songtexte ersetzen möchten. Ansonsten werden Songtexte nur gesichert, wenn kein zuvor gesicherter Songtext existiert. _NS:9 @@ -2458,7 +2505,7 @@ 268 - {{75, 94}, {374, 28}} + {{71, 94}, {386, 28}} _NS:9 @@ -2467,7 +2514,7 @@ 67239424 272760832 - Der Intervall bestimmt, in welchen Zeitabständen nach einem Wechsel des aktuellen iTunes Titels gesucht wird. + Der Intevall bestimmt die Häufigkeit, in der nach dem Sngtext des aktuellen iTunes Titels gesucht wird. _NS:9 @@ -2478,9 +2525,9 @@ 268 - {{11, 133}, {59, 17}} + {{10, 137}, {59, 17}} - + _NS:1505 YES @@ -2497,16 +2544,16 @@ 268 - {{17, 203}, {432, 28}} + {{10, 203}, {447, 28}} - + _NS:9 {250, 750} YES 67239424 272760832 - Auto-Lyrics speichert automatisch den Songtext des aktuellen iTunes Titels in der Datei des Titels + Auto-Lyrics sucht automatisch nach dem aktuellen iTunes Titel und speichert den ersten gefundenen Songtext in dem aktuellen Titel. _NS:9 @@ -2525,7 +2572,7 @@ 67239424 134217728 - Enable Auto-Lyrics + Auto-Lyrics einschalten _NS:9 @@ -2539,6 +2586,7 @@ {466, 251} + _NS:9 NSView @@ -3082,62 +3130,6 @@ 1580 - - - downloadLyricsButton - - - - 1446 - - - - artistLabel - - - - 751 - - - - downloadLyrics: - - - - 1445 - - - - sendLyricsToiTunes: - - - - 1379 - - - - songLabel - - - - 750 - - - - sendToiTunesButton - - - - 1233 - - - - lyricsArea - - - - 1190 - resultsOutline @@ -3162,22 +3154,6 @@ 1551 - - - loadMoreResultsButton - - - - 1905 - - - - loadNextResults: - - - - 1552 - showPreviewCheckBox @@ -3190,15 +3166,15 @@ showLyricsInBrowser: - + - 2596 + 2597 showLyricsInBrowser: - + 2600 @@ -3206,10 +3182,50 @@ getCurrentSpotifySong: - + 2602 + + + lyricsArea + + + + 1190 + + + + songLabel + + + + 750 + + + + artistLabel + + + + 751 + + + + sendLyricsToiTunes: + + + + 2749 + + + + downloadLyrics: + + + + 2750 + delegate @@ -3230,9 +3246,9 @@ menu - + - 2597 + 2596 @@ -3290,6 +3306,14 @@ 1898 + + + delegate + + + + 2705 + hosterTable @@ -3474,10 +3498,10 @@ - - - + + + @@ -3878,23 +3902,23 @@ - - + + 6 0 - + 6 1 - 0.0 + -20 1000 - 8 - 29 + 3 + 9 3 - + 3 0 @@ -3910,7 +3934,7 @@ 3 - + 5 0 @@ -3926,7 +3950,7 @@ 3 - + 4 0 @@ -4059,7 +4083,7 @@ - + @@ -4214,55 +4238,7 @@ - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - + 5 0 @@ -4278,7 +4254,55 @@ 3 - + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + 6 0 @@ -4294,15 +4318,15 @@ 3 - - - 4 + + + 3 0 - - 4 + + 3 1 - - 20 + + 0.0 1000 8 @@ -4343,7 +4367,7 @@ - + 7 0 @@ -4387,121 +4411,24 @@ + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 9 - 0 - - 9 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 3 - 0 - - 3 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - + 6 0 @@ -4517,27 +4444,27 @@ 3 - + - 3 + 5 0 - - 4 + + 5 1 - - 8 + + 0.0 1000 - 6 - 24 + 8 + 29 3 - + 10 0 - + 10 1 @@ -4549,12 +4476,12 @@ 2 - - - 6 + + + 4 0 - 6 + 4 1 0.0 @@ -4565,20 +4492,11 @@ 3 - - - - - 1912 - - - - - - + + 3 0 - + 4 1 @@ -4588,93 +4506,13 @@ 6 24 3 - + - - + + 3 0 - - 3 - 1 - - 93 - - 1000 - 3 - 9 - 3 - - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - + 3 1 @@ -4684,415 +4522,27 @@ 8 29 3 - + - - - 4 + + + 5 0 - - 4 + + 6 1 - - 0.0 + + 8 1000 - 8 - 29 + 6 + 24 3 - + - - 908 - - - - - - - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - - 3 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - - - 1432 - - - - - - - - 659 - - - - - - - - 653 - - - - - - 7 - 0 - - 0 - 1 - - 57 - - 1000 - 3 - 9 - 1 - - - - - - - 615 - - - - - - - - 620 - - - - - - - - 832 - - - - - - 7 - 0 - - 0 - 1 - - 141 - - 1000 - 3 - 9 - 1 - - - - - - - 833 - - - - - 621 - - - - - 616 - - - - - 654 - - - - - 660 - - - - - 1433 - - - - - 1102 - - - - - - - - - - 1105 - - - - - 1104 - - - - - 1103 - - - 548 @@ -5110,6 +4560,7 @@ + @@ -5159,7 +4610,7 @@ - + 8 0 @@ -5183,24 +4634,27 @@ - - 1477 - - - - - - - - 1478 - - - 1615 + + + 7 + 0 + + 0 + 1 + + 145 + + 1000 + 3 + 9 + 1 + + @@ -5247,87 +4701,7 @@ - - - 3 - 0 - - 3 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - + 3 0 @@ -5343,7 +4717,55 @@ 3 - + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + 4 0 @@ -5359,8 +4781,8 @@ 3 - - + + 5 0 @@ -5375,6 +4797,38 @@ 3 + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + @@ -5469,101 +4923,52 @@ 2530 - - - - - - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - + + + + + 5 0 - + 5 1 - 72 + 0.0 1000 - 3 - 9 - 3 + 6 + 24 + 2 - - - 6 + + + 5 0 - - 6 + + 5 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 4 + 0 + + 4 1 20 @@ -5574,23 +4979,7 @@ 3 - - - 3 - 0 - - 4 - 1 - - 20 - - 1000 - 6 - 24 - 3 - - - + 3 0 @@ -5598,7 +4987,7 @@ 3 1 - 99 + 94 1000 3 @@ -5606,12 +4995,12 @@ 3 - - - 3 + + + 5 0 - - 4 + + 6 1 8 @@ -5622,47 +5011,15 @@ 3 - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 4 - 0 - - 4 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - + - 5 + 3 0 - 5 + 3 1 - 14 + 97 1000 3 @@ -5670,11 +5027,11 @@ 3 - + 5 0 - + 5 1 @@ -5686,44 +5043,12 @@ 2 - - - 11 + + + 3 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 4 - 0 - - 4 + + 3 1 20 @@ -5734,7 +5059,71 @@ 3 - + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + 9 0 @@ -5750,40 +5139,56 @@ 2 - - - 5 + + + 9 0 - 5 + 9 1 - - 20 + + 0.0 1000 - 8 - 29 - 3 + 5 + 22 + 2 - - + + 3 0 - - 3 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + 3 + 0 + + 4 1 20 1000 - 8 - 29 + 6 + 24 3 - - + + 10 0 @@ -5798,6 +5203,71 @@ 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 4 + 0 + + 4 + 1 + + 22 + + 1000 + 3 + 9 + 3 + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + @@ -5806,7 +5276,7 @@ - + 7 0 @@ -5835,7 +5305,7 @@ - + 8 0 @@ -5864,6 +5334,22 @@ + + + 7 + 0 + + 0 + 1 + + 53 + + 1000 + 3 + 9 + 1 + + @@ -5877,23 +5363,7 @@ - - - 7 - 0 - - 0 - 1 - - 368 - - 1000 - 3 - 9 - 1 - - - + 8 0 @@ -5922,7 +5392,7 @@ - + 8 0 @@ -5964,7 +5434,7 @@ - + 7 0 @@ -6001,6 +5471,22 @@ + + + 7 + 0 + + 0 + 1 + + 60 + + 1000 + 3 + 9 + 1 + + @@ -6011,454 +5497,943 @@ 2592 - + - + 2593 - - + + 2598 - + 2599 - + 2601 - + - 2692 - + 1912 + - + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + + + 4 + 0 + + 4 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + + + 3 + 0 + + 3 + 1 + + 93 + + 1000 + 3 + 9 + 3 + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 8 + 29 + 3 + + + + + + + 1102 + + + + + + + + + + 1103 + + + + + 1104 + + + + + 1105 + + + + + 908 + + + + + + + + + 3 + 0 + + 3 + 1 + + 21 + + 1000 + 3 + 9 + 3 + + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + 5 + 22 + 2 + + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + + + + + + 620 + + + + + + + + 621 + + + + + 615 + + + + + + + + 616 + + + + + 653 + + + + + + 7 + 0 + + 0 + 1 + + 57 + + 1000 + 3 + 9 + 1 + + + + + + + 654 + + + + + 659 + + + + + + + + 660 + + + + + 2607 + + + - 2693 - - + 2608 + + - 2721 - - + 2611 + + - 2722 - - + 2618 + + - 2723 - - - - - 2724 - - - - - 2725 - - - - - 2726 - - - - - 2727 - - - - - 2728 - - - - - 2729 - - - - - 2730 - - - - - 2731 - - - - - 2732 - - - - - 2733 - - - - - 2734 - - - - - 2735 - - - - - 2736 - - - - - 2737 - - - - - 2738 - - - - - 2739 - - - - - 2740 - - - - - 2741 - - - - - 2742 - - - - - 2743 - - - - - 2744 - - - - - 2745 - - - - - 2746 - - - - - 2747 - + 2634 + - 2748 - + 2635 + - 2749 - + 2636 + - 2750 - + 2637 + - 2751 - - + 2642 + + - 2752 - - + 2651 + + - 2753 - - + 2652 + + - 2754 - - + 2653 + + - 2755 - - + 2654 + + - 2756 - - + 2655 + + - 2757 - - + 2656 + + - 2758 - - - - - 2759 - - - - - 2760 - - - - - 2761 - - - - - 2762 - + 2657 + - 2763 - - - - - 2764 - - - - - 2765 - - - - - 2766 - - - - - 2767 - - - - - 2768 - - - - - 2769 - + 2658 + - 2770 - + 2659 + - 2771 - + 2660 + - 2772 - + 2661 + - 2773 - + 2662 + - 2774 - + 2663 + - 2775 - + 2664 + - 2776 - + 2665 + - 2777 - - + 2694 + + + + + - 2778 - - + 2695 + + - 2779 - + 2702 + + + + + 2715 + + + + + + 7 + 0 + + 0 + 1 + + 56 + + 1000 + 3 + 9 + 1 + + + + + + + 2716 + + + + + + + + 2717 + + + + + + + + + + 2719 + + + + + 2720 + + + + + 2748 + + + + + 2842 + + + + + 2843 + + + + + 2844 + + + + + 2845 + + + + + 2846 + + + + + 2847 + + + + + 2863 + + + + + 2870 + + + + + 2872 + + + + + 2902 + + + + + 2905 + + + + + 2906 + + + + + 2908 + + + + + 2909 + + + + + 2910 + + + + + 2911 + + + + + 2912 + + + + + 2959 + - 2780 - - + 2969 + + - 2781 - - - - - 2782 - - - - - 2783 - - - - - 2784 - - - - - 2785 - - - - - 2786 - - - - - 2787 - - - - - 2788 - - - - - 2789 - - - - - 2790 - - - - - 2791 - - - - - 2792 - - - - - 2793 - - - - - 2794 - - - - - 2795 - - - - - 2796 - - - - - 2797 - - - - - 2798 - - - - - 2799 - + 2985 + - 2800 - - + 2986 + + - 2801 - + 2988 + + + + + 2991 + + + + + 2993 + + + + + 2996 + + + + + 2997 + + + + + 2999 + + + + + 3003 + + + + + 3004 + - 2802 - - + 3005 + + + + + 3007 + + + + + 3008 + + + + + 3009 + + + + + 3010 + + + + + 3011 + + + + + 3012 + + + + + 3016 + + + + + 3017 + + + + + 3018 + + + + + 3019 + + + + + 3020 + + + + + 3021 + + + + + 3022 + + + + + 3023 + + + + + 3024 + + + + + 3028 + + + + + 3030 + + + + + 3031 + + + + + 3032 + + + + + 3037 + + + + + 3038 + + + + + 3039 + + + + + 3040 + + + + + 3041 + + + + + 3042 + + + + + 3043 + + @@ -6494,32 +6469,26 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - - + + + + + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6528,11 +6497,14 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6556,29 +6528,26 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - - - - + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6622,63 +6591,66 @@ auto-lyrics - - - - - - - - + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6691,11 +6663,11 @@ ToolTip - Noch nicht verfügbar. Auto-Lyrics überprüft Songtexte alle 30 Sekunden. + Not available yet. Auto-Lyrics check in 30 seconds intervals. - - + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6703,6 +6675,9 @@ com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6711,96 +6686,105 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6813,10 +6797,10 @@ {{380, 496}, {480, 360}} - - - - + + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6855,11 +6839,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6868,8 +6850,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6884,28 +6866,19 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - - - - - - - - - - - - - + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6915,7 +6888,7 @@ - 2802 + 3043 0 @@ -6928,6 +6901,7 @@ 3 {256, 256} + {15, 15} {11, 11} {10, 3} {32, 32} diff --git a/iLyrics/en.lproj/MainMenu.xib b/iLyrics/en.lproj/MainMenu.xib index 60717ab..87f6a23 100644 --- a/iLyrics/en.lproj/MainMenu.xib +++ b/iLyrics/en.lproj/MainMenu.xib @@ -12,6 +12,7 @@ NSTableHeaderView + NSPopUpButton NSMenu NSToolbarItem NSButton @@ -33,6 +34,7 @@ NSToolbarSpaceItem NSView NSOutlineView + NSPopUpButtonCell NSToolbar NSScrollView NSPopover @@ -208,7 +210,7 @@ - Close + Close Window w 1048576 2147483647 @@ -716,6 +718,7 @@ Run iTunes + 1048576 2147483647 @@ -919,10 +922,9 @@ Search - + 268 {{0, 14}, {96, 22}} - _NS:9 YES @@ -1179,15 +1181,16 @@ 293 - {{118, 1}, {63, 18}} + {{119, 1}, {228, 18}} - + + _NS:9 YES -2080244224 131072 - Preview + Show Preview LucidaGrande 11 @@ -1210,41 +1213,19 @@ 25 - - - 289 - {{182, -1}, {120, 23}} - - - _NS:22 - YES - - -1543373312 - 134348800 - Load more results - - _NS:22 - - -2033434369 - 162 - - - 400 - 75 - - 292 {{0, -1}, {114, 23}} + _NS:22 YES -2080244224 134348800 - Reset loaded results + Reset loaded Results _NS:22 @@ -1267,16 +1248,18 @@ 4352 - {300, 415} + {368, 415} - + + _NS:13 YES 256 - {300, 17} + {368, 17} + _NS:16 @@ -1291,8 +1274,8 @@ song - 180 - 180 + 129.6015625 + 16 1000 75628096 @@ -1335,7 +1318,7 @@ artist 114 - 107 + 16 1000 75628096 @@ -1359,6 +1342,43 @@ YES + + hoster + 115 + 10 + 3.4028234663852886e+38 + + 75628096 + 2048 + From Hoster + + + 6 + System + headerColor + + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + 3 2 @@ -1373,10 +1393,11 @@ 17 - 1388314624 + 1925218304 - 4 + 1 + 1 15 0 YES @@ -1384,17 +1405,13 @@ 1 - {{1, 17}, {300, 415}} + {{1, 17}, {368, 415}} + _NS:11 - - 6 - System - controlBackgroundColor - - + 4 @@ -1402,6 +1419,7 @@ -2147483392 {{224, 17}, {15, 102}} + _NS:58 @@ -1412,14 +1430,15 @@ -2147483392 - {{1, 417}, {290, 15}} + {{1, 417}, {368, 15}} + _NS:60 1 _doScroller: - 0.99656357388316152 + 0.97354497354497349 @@ -1427,8 +1446,9 @@ - {{1, 0}, {300, 17}} + {{1, 0}, {368, 17}} + _NS:15 @@ -1436,9 +1456,10 @@ 4 - {{0, 29}, {302, 433}} + {{0, 29}, {370, 433}} - + + _NS:9 133682 @@ -1448,8 +1469,9 @@ QSAAAEEgAABBmAAAQZgAAA - {302, 462} + {370, 462} + _NS:11 NSView @@ -1469,8 +1491,9 @@ 2322 - {527, 14} + {459, 14} + _NS:13 @@ -1488,7 +1511,7 @@ - 527 + 459 1 @@ -1532,8 +1555,9 @@ - {{1, 1}, {527, 367}} + {{1, 1}, {459, 367}} + _NS:11 @@ -1547,9 +1571,7 @@ - - file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff - + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff @@ -1564,8 +1586,9 @@ 256 - {{513, 1}, {15, 361}} + {{445, 1}, {15, 361}} + _NS:84 _doScroller: @@ -1575,8 +1598,9 @@ 256 - {{1, 353}, {521, 15}} + {{1, 353}, {453, 15}} + _NS:33 1 @@ -1586,8 +1610,9 @@ 0.94565218687057495 - {529, 369} + {461, 369} + _NS:9 133170 @@ -1599,58 +1624,91 @@ 266 - + - 265 - {{381, 10}, {134, 32}} + 268 + {{391, 29}, {56, 25}} + _NS:9 YES - - 604110336 - 134217728 - Download + + -2080244160 + 134219776 _NS:9 - - -2038284033 - 129 + + -2030944001 + 35 + + LucidaGrande + 13 + 16 + - 200 - 25 - - - - - 265 - {{381, 37}, {134, 32}} - - - _NS:9 - YES - - 604110336 - 134217728 - Send to iTunes - - _NS:9 - - -2038284033 - 129 - - - 200 - 25 + 400 + 75 + + + YES + Choose an Action... + + 2147483647 + + NSImage + NSActionTemplate + + + + _popUpItemAction: + + + YES + + OtherViews + + + + + Send to iTunes + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Download + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + + YES + 1 + YES + YES + 2 266 - {{62, 20}, {320, 17}} + {{62, 20}, {324, 17}} - + + _NS:9 {250, 750} YES @@ -1670,7 +1728,8 @@ 268 {{17, 22}, {43, 17}} - + + _NS:1505 YES @@ -1687,8 +1746,9 @@ 266 - {{62, 47}, {320, 17}} + {{62, 47}, {324, 17}} + _NS:9 {250, 750} @@ -1709,6 +1769,7 @@ 268 {{17, 47}, {40, 17}} + _NS:1505 YES @@ -1724,15 +1785,17 @@ - {{0, 377}, {529, 85}} + {{0, 377}, {461, 85}} + _NS:9 NSView - {{312, 0}, {549, 462}} + {{380, 0}, {481, 462}} + _NS:13 NSView @@ -1740,6 +1803,7 @@ {861, 462} + _NS:9 YES @@ -1748,6 +1812,7 @@ {841, 462} + {{0, 0}, {1680, 1028}} @@ -1761,7 +1826,7 @@ MainController - + Results Menu @@ -2084,7 +2149,7 @@ 268 - {{17, 192}, {93, 17}} + {{17, 192}, {305, 17}} _NS:1505 @@ -2092,10 +2157,11 @@ 68288064 272630784 - Lyrics Hosters - + Drag the Lyrics Hosters in your preferred order. + _NS:1505 + YES @@ -2172,12 +2238,7 @@ 2048 Last updated - - 6 - System - headerColor - - + @@ -2233,13 +2294,13 @@ -2147483392 - {{1, 173}, {438, 15}} + {{1, 148}, {424, 15}} _NS:60 1 _doScroller: - 0.97986577181208057 + 0.86354378818737276 @@ -3107,22 +3168,6 @@ 1551 - - - loadMoreResultsButton - - - - 1905 - - - - loadNextResults: - - - - 1552 - showPreviewCheckBox @@ -3163,38 +3208,6 @@ 1190 - - - downloadLyricsButton - - - - 1446 - - - - downloadLyrics: - - - - 1445 - - - - sendToiTunesButton - - - - 1233 - - - - sendLyricsToiTunes: - - - - 1379 - songLabel @@ -3211,6 +3224,22 @@ 751 + + + sendLyricsToiTunes: + + + + 2749 + + + + downloadLyrics: + + + + 2750 + delegate @@ -3291,6 +3320,14 @@ 1898 + + + delegate + + + + 2705 + hosterTable @@ -4388,14 +4425,12 @@ - - - + - 3 + 5 0 - 3 + 5 1 0.0 @@ -4406,6 +4441,7 @@ 3 + 3 @@ -4422,28 +4458,28 @@ 3 - - - 10 + + + 6 0 - - 10 + + 6 1 0.0 1000 - 6 - 24 - 2 + 8 + 29 + 3 - + - 5 + 3 0 - 5 + 3 1 0.0 @@ -4470,38 +4506,6 @@ 3 - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - - - - 6 - 0 - - 6 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - 4 @@ -4518,12 +4522,28 @@ 3 - - - 3 + + + 10 0 - - 4 + + 10 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 5 + 0 + + 6 1 8 @@ -4534,38 +4554,6 @@ 3 - - - 5 - 0 - - 5 - 1 - - 121 - - 1000 - 3 - 9 - 3 - - - - - 4 - 0 - - 4 - 1 - - 0.0 - - 1000 - 8 - 29 - 3 - - @@ -4586,6 +4574,7 @@ + @@ -4635,6 +4624,22 @@ + + + 7 + 0 + + 0 + 1 + + 114 + + 1000 + 3 + 9 + 1 + + 8 @@ -4660,42 +4665,29 @@ - 1477 - + 1615 + - - - + + + 7 0 0 1 - 120 + 223 1000 3 9 1 - + - - 1478 - - - - - 1615 - - - - - - 1616 @@ -5551,12 +5543,12 @@ 3 - - - 3 + + + 5 0 - 3 + 5 1 0.0 @@ -5583,6 +5575,22 @@ 3 + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + 6 @@ -5599,12 +5607,12 @@ 3 - + - 5 + 3 0 - 5 + 3 1 0.0 @@ -5631,24 +5639,8 @@ 3 - - - 3 - 0 - - 4 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - - + + 5 0 @@ -5695,46 +5687,11 @@ 908 - - - - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 5 - 0 - - 6 - 1 - - 8 - - 1000 - 6 - 24 - 3 - - - + 5 0 @@ -5749,8 +5706,56 @@ 3 + + + 3 + 0 + + 3 + 1 + + 21 + + 1000 + 3 + 9 + 3 + + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + 6 + 24 + 2 + + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + 6 + 24 + 3 + + - + 11 0 @@ -5765,38 +5770,6 @@ 2 - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - 4 @@ -5813,71 +5786,7 @@ 3 - - - 11 - 0 - - 11 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - - - - 6 - 0 - - 6 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 5 - 0 - - 5 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - - - 3 - 0 - - 3 - 1 - - 20 - - 1000 - 8 - 29 - 3 - - - + 3 0 @@ -5893,8 +5802,25 @@ 3 - - + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + 8 + 29 + 3 + + + + + 5 0 @@ -5909,11 +5835,27 @@ 3 - - + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + 5 + 22 + 2 + + + + 5 0 - + 6 1 @@ -5925,72 +5867,31 @@ 3 - - - 5 - 0 - - 5 - 1 - - 0.0 - - 1000 - 6 - 24 - 2 - - + - - 1432 - - - - - - - - 1433 - - - - - 832 - - - - - - 7 - 0 - - 0 - 1 - - 122 - - 1000 - 3 - 9 - 1 - - - - - - - 833 - - - 620 + + + 7 + 0 + + 0 + 1 + + 318 + + 1000 + 3 + 9 + 1 + + @@ -6017,22 +5918,6 @@ - - - 7 - 0 - - 0 - 1 - - 37 - - 1000 - 3 - 9 - 1 - - @@ -6067,131 +5952,16 @@ - - 2609 - - - - - 2610 - - - 2611 - - 2612 - - - - - 2613 - - - - - 2614 - - - - - 2615 - - - - - 2616 - - - - - 2617 - - - 2618 - - 2619 - - - - - 2620 - - - - - 2621 - - - - - 2622 - - - - - 2623 - - - - - 2624 - - - - - 2625 - - - - - 2626 - - - - - 2627 - - - - - 2628 - - - - - 2629 - - - - - 2630 - - - - - 2631 - - - - - 2632 - - - - - 2633 - - - 2634 @@ -6212,71 +5982,11 @@ - - 2638 - - - - - 2639 - - - - - 2640 - - - - - 2641 - - - 2642 - - 2643 - - - - - 2644 - - - - - 2645 - - - - - 2646 - - - - - 2647 - - - - - 2648 - - - - - 2649 - - - - - 2650 - - - 2651 @@ -6482,6 +6192,221 @@ + + 2694 + + + + + + + + 2695 + + + + + 2701 + + + + + 2702 + + + + + 2703 + + + + + 2715 + + + + + + 7 + 0 + + 0 + 1 + + 56 + + 1000 + 3 + 9 + 1 + + + + + + + 2716 + + + + + + + + 2717 + + + + + + + + + + 2719 + + + + + 2720 + + + + + 2748 + + + + + 2842 + + + + + 2843 + + + + + 2844 + + + + + 2845 + + + + + 2846 + + + + + 2847 + + + + + 2862 + + + + + 2863 + + + + + 2866 + + + + + 2867 + + + + + 2869 + + + + + 2870 + + + + + 2871 + + + + + 2872 + + + + + 2873 + + + + + 2898 + + + + + 2899 + + + + + 2900 + + + + + 2901 + + + + + 2902 + + + + + 2903 + + + + + 2904 + + + + + 2905 + + + + + 2906 + + + + + 2907 + + + + + 2908 + + + @@ -6516,23 +6441,15 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6558,6 +6475,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6581,29 +6501,26 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - + - - + + + - - - + + com.apple.InterfaceBuilder.CocoaPlugin - + - - - - - - + + + + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6739,48 +6656,13 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6822,7 +6704,48 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6889,12 +6812,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -6908,28 +6831,18 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - + + + - - - - - - - - - - - + + + + + com.apple.InterfaceBuilder.CocoaPlugin @@ -6939,9 +6852,281 @@ - 2691 + 2908 + + + + + AppDelegate + NSObject + + id + id + id + id + id + + + + nextTrack: + id + + + playPauseiTunes: + id + + + previousTrack: + id + + + quitiTunes: + id + + + runiTunes: + id + + + + MainController + PreferencesController + NSWindow + NSButton + NSWindow + + + + mainController + MainController + + + preferencesController + PreferencesController + + + preferencesWindow + NSWindow + + + quitWhenAllWindowClosedCheckBox + NSButton + + + window + NSWindow + + + + IBProjectSource + ./Classes/AppDelegate.h + + + + MainController + NSObject + + id + id + id + NSOutlineView + id + id + id + id + id + + + + downloadLyrics: + id + + + getCurrentSpotifySong: + id + + + getCurrentiTunesSong: + id + + + lyricsSelectionChanged: + NSOutlineView + + + resetLoadedResults: + id + + + sendLyricsToiTunes: + id + + + showLyricsInBrowser: + id + + + showiLyricsWindow: + id + + + startNewSearch: + id + + + + NSTextField + NSMenuItem + NSTextView + NSPopover + NSTextView + NSOutlineView + NSSearchField + NSButton + NSTextField + NSWindow + + + + artistLabel + NSTextField + + + iLyricsMenuItem + NSMenuItem + + + lyricsArea + NSTextView + + + previewPopover + NSPopover + + + previewTextArea + NSTextView + + + resultsOutline + NSOutlineView + + + searchField + NSSearchField + + + showPreviewCheckBox + NSButton + + + songLabel + NSTextField + + + window + NSWindow + + + + IBProjectSource + ./Classes/MainController.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + PreferencesController + NSObject + + id + id + id + id + id + + + + changeAutoLyricsInterval: + id + + + showAutoLyricsPreferences: + id + + + showGeneralPreferences: + id + + + toggleAutoLyrics: + id + + + toggleReplaceOldLyrics: + id + + + + NSView + NSToolbarItem + NSView + NSTableView + PreferencesWindow + NSButton + NSButton + + + + autoLyricsView + NSView + + + generalButton + NSToolbarItem + + + generalView + NSView + + + hosterTable + NSTableView + + + preferencesWindow + PreferencesWindow + + + replaceOldCheckBox + NSButton + + + toggleAutoLyricsButton + NSButton + + + + IBProjectSource + ./Classes/PreferencesController.h + + + + PreferencesWindow + NSWindow + + IBProjectSource + ./Classes/PreferencesWindow.h + + + - 0 IBCocoaFramework @@ -6952,6 +7137,7 @@ 3 {256, 256} + {15, 15} {11, 11} {10, 3} {32, 32} diff --git a/iLyrics/iLyrics-Info.plist b/iLyrics/iLyrics-Info.plist index 3d67d08..28545d3 100644 --- a/iLyrics/iLyrics-Info.plist +++ b/iLyrics/iLyrics-Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1.1 + 1.2 CFBundleSignature ???? CFBundleVersion - 1 + 10 LSApplicationCategoryType public.app-category.music LSMinimumSystemVersion diff --git a/iLyrics/iLyrics.h b/iLyrics/iLyrics.h new file mode 100644 index 0000000..ddfa578 --- /dev/null +++ b/iLyrics/iLyrics.h @@ -0,0 +1,38 @@ +// +// iLyrics.h +// iLyrics +// +// Created by Kim Wittenburg on 19.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import +#import "LyricsHoster.h" +#import "Magistrix.h" +#import "Songtexte.h" +#import "MP3Lyrics.h" +#import "SearchResult.h" +#import "Lyrics.h" + +#import "iTunes.h" +#import "Spotify.h" + +@interface iLyrics : NSObject + +@property NSMutableArray *lyricsHosters; +@property(readonly) id preferredHoster; +@property(readonly) Magistrix *magistrix; +@property(readonly) Songtexte *songtexte; +@property(readonly) MP3Lyrics *mp3Lyrics; +@property(readonly) iTunesApplication *iTunes; +@property(readonly) SpotifyApplication *spotify; + ++(iLyrics *)sharediLyrics; + +-(id) hosterWithName: (NSString *) name; + +-(void)saveToDefaults:(NSUserDefaults *)defaults; +-(void)loadFromDefaults:(NSUserDefaults *)defaults; + +@end diff --git a/iLyrics/iLyrics.m b/iLyrics/iLyrics.m new file mode 100644 index 0000000..dfed7aa --- /dev/null +++ b/iLyrics/iLyrics.m @@ -0,0 +1,78 @@ +// +// iLyrics.m +// iLyrics +// +// Created by Kim Wittenburg on 19.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "iLyrics.h" + +@implementation iLyrics + +iLyrics *ilyrics; + +@synthesize lyricsHosters; +@synthesize magistrix; +@synthesize songtexte; +@synthesize mp3Lyrics; +@synthesize iTunes; +@synthesize spotify; + ++(iLyrics *)sharediLyrics { + if (ilyrics == nil) { + ilyrics = [[iLyrics alloc] init]; + } + return ilyrics; +} + +-(id)init { + self = [super init]; + if (self) { + iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; + spotify = [SBApplication applicationWithBundleIdentifier:@"com.spotify.client"]; + magistrix = [[Magistrix alloc] init]; + songtexte = [[Songtexte alloc] init]; + //mp3Lyrics = [[MP3Lyrics alloc] init]; + lyricsHosters = [NSMutableArray arrayWithObjects:magistrix, songtexte, /*mp3Lyrics,*/ nil]; + [self loadFromDefaults:[NSUserDefaults standardUserDefaults]]; + } + return self; +} + +-(void)loadFromDefaults:(NSUserDefaults *)defaults { + NSArray *hosterNames = [defaults objectForKey:@"Lyrics Hosters"]; + NSMutableArray *reorderedHosters = [[NSMutableArray alloc] init]; + for (NSString *name in hosterNames) { + id hoster = [self hosterWithName:name]; + if (hoster) { + [reorderedHosters addObject:hoster]; + } + } + if ([reorderedHosters count] == [lyricsHosters count]) { + lyricsHosters = reorderedHosters; + } +} + +-(id)preferredHoster { + return [lyricsHosters objectAtIndex:0]; +} + +-(id)hosterWithName:(NSString *)name { + for (id hoster in lyricsHosters) { + if ([name isEqualToString:[hoster name]]) { + return hoster; + } + } + return nil; +} + +-(void)saveToDefaults:(NSUserDefaults *)defaults { + NSMutableArray *hosterNames = [[NSMutableArray alloc] init]; + for (id hoster in lyricsHosters) { + [hosterNames addObject:[hoster name]]; + } + [defaults setObject:hosterNames forKey:@"Lyrics Hosters"]; +} + +@end