diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-05-02 12:10:33 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-05-02 12:10:33 -0700 |
commit | 2a4817a915659cd57255f52b682244c4a458a14f (patch) | |
tree | 401536a0c518a016d900ca918cae71650306b36c | |
parent | 80665e81bec1bee22b1d93d287aa0ca0e23d0079 (diff) | |
parent | e954d2575a7a51b8792c7c97f2b1c3e94edaca2e (diff) | |
download | dsub-2a4817a915659cd57255f52b682244c4a458a14f.tar.gz dsub-2a4817a915659cd57255f52b682244c4a458a14f.tar.bz2 dsub-2a4817a915659cd57255f52b682244c4a458a14f.zip |
Merge branch 'master' into SlideUpPanel2
-rw-r--r-- | DSub.iml | 6 | ||||
-rw-r--r-- | app/app.iml | 14 | ||||
-rw-r--r-- | app/build.gradle | 2 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/adapter/AlbumListAdapter.java | 43 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java | 14 | ||||
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/util/Util.java | 2 | ||||
-rw-r--r-- | app/src/main/res/values-de/strings.xml | 30 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 | ||||
-rw-r--r-- | build.gradle | 2 |
9 files changed, 80 insertions, 34 deletions
@@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> +<module external.linked.project.id="DSub" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> <component name="FacetManager"> <facet type="java-gradle" name="Java-Gradle"> <configuration> <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" /> + <option name="BUILDABLE" value="false" /> </configuration> </facet> </component> @@ -15,5 +16,4 @@ <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> </component> -</module> - +</module>
\ No newline at end of file diff --git a/app/app.iml b/app/app.iml index 940b4f41..6e923bd8 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="DSub" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> +<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="DSub" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> <component name="FacetManager"> <facet type="android-gradle" name="Android-Gradle"> <configuration> @@ -12,8 +12,9 @@ <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> - <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> <option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" /> + <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> + <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> <option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" /> <option name="ALLOW_USER_CONFIGURATION" value="false" /> <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> @@ -68,6 +69,12 @@ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.1.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/mediarouter-v7/22.1.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.1.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-base/7.0.0/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-cast/7.0.0/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.sothree.slidinguppanel/library/3.0.0/jars" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> @@ -114,5 +121,4 @@ <orderEntry type="module" module-name="DragSort ListView" exported="" /> <orderEntry type="module" module-name="Server Proxy" exported="" /> </component> -</module> - +</module>
\ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a3667828..e17e8256 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { defaultConfig { applicationId "github.daneren2005.dsub" minSdkVersion 9 - targetSdkVersion 22 + targetSdkVersion 19 } buildTypes { release { diff --git a/app/src/main/java/github/daneren2005/dsub/adapter/AlbumListAdapter.java b/app/src/main/java/github/daneren2005/dsub/adapter/AlbumListAdapter.java index b2fcded3..7151362c 100644 --- a/app/src/main/java/github/daneren2005/dsub/adapter/AlbumListAdapter.java +++ b/app/src/main/java/github/daneren2005/dsub/adapter/AlbumListAdapter.java @@ -19,6 +19,7 @@ package github.daneren2005.dsub.adapter; import android.content.Context; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -38,6 +39,7 @@ import java.util.List; import java.util.Set; public class AlbumListAdapter extends EndlessAdapter implements SectionIndexer { + private static final String TAG = AlbumListAdapter.class.getSimpleName(); Context context; ArrayAdapter<MusicDirectory.Entry> adapter; String type; @@ -97,26 +99,35 @@ public class AlbumListAdapter extends EndlessAdapter implements SectionIndexer { } private void recreateIndexes() { - if(!shouldIndex) { - return; - } - - Set<String> sectionSet = new LinkedHashSet<String>(30); - List<Integer> positionList = new ArrayList<Integer>(30); - for (int i = 0; i < adapter.getCount(); i++) { - MusicDirectory.Entry entry = adapter.getItem(i); - String index = entry.getAlbum().substring(0, 1); - if(!Character.isLetter(index.charAt(0))) { - index = "#"; + try { + if (!shouldIndex) { + return; } - if (!sectionSet.contains(index)) { - sectionSet.add(index); - positionList.add(i); + Set<String> sectionSet = new LinkedHashSet<String>(30); + List<Integer> positionList = new ArrayList<Integer>(30); + for (int i = 0; i < adapter.getCount(); i++) { + MusicDirectory.Entry entry = adapter.getItem(i); + String index; + if (entry.getAlbum() != null) { + index = entry.getAlbum().substring(0, 1); + if (!Character.isLetter(index.charAt(0))) { + index = "#"; + } + } else { + index = "*"; + } + + if (!sectionSet.contains(index)) { + sectionSet.add(index); + positionList.add(i); + } } + sections = sectionSet.toArray(new Object[sectionSet.size()]); + positions = positionList.toArray(new Integer[positionList.size()]); + } catch(Exception e) { + Log.e(TAG, "Error while recreating indexes"); } - sections = sectionSet.toArray(new Object[sectionSet.size()]); - positions = positionList.toArray(new Integer[positionList.size()]); } @Override diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java index 80183c40..6f325a4e 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/NowPlayingFragment.java @@ -221,7 +221,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis albumArtImageView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent me) { - if(me.getAction() == MotionEvent.ACTION_DOWN) { + if (me.getAction() == MotionEvent.ACTION_DOWN) { lastY = (int) me.getRawY(); } return gestureScanner.onTouchEvent(me); @@ -267,7 +267,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis @Override protected void done(Boolean result) { - if(result) { + if (result) { onCurrentChanged(); onProgressChanged(); } @@ -461,7 +461,7 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis albumArtImageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - if(overlayHeight == -1 || lastY < (view.getBottom() - overlayHeight)) { + if (overlayHeight == -1 || lastY < (view.getBottom() - overlayHeight)) { toggleFullscreenAlbumArt(); setControlsVisible(true); } @@ -1329,8 +1329,12 @@ public class NowPlayingFragment extends SubsonicFragment implements OnGestureLis switch (playerState) { case DOWNLOADING: if(currentPlaying != null) { - long bytes = currentPlaying.getPartialFile().length(); - statusTextView.setText(context.getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, context))); + if(Util.isWifiRequiredForDownload(context)) { + statusTextView.setText(context.getResources().getString(R.string.download_playerstate_mobile_disabled)); + } else { + long bytes = currentPlaying.getPartialFile().length(); + statusTextView.setText(context.getResources().getString(R.string.download_playerstate_downloading, Util.formatLocalizedBytes(bytes, context))); + } } break; case PREPARING: diff --git a/app/src/main/java/github/daneren2005/dsub/util/Util.java b/app/src/main/java/github/daneren2005/dsub/util/Util.java index 876dc648..969e178e 100644 --- a/app/src/main/java/github/daneren2005/dsub/util/Util.java +++ b/app/src/main/java/github/daneren2005/dsub/util/Util.java @@ -1036,7 +1036,7 @@ public final class Util { return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()); } - private static boolean isWifiRequiredForDownload(Context context) { + public static boolean isWifiRequiredForDownload(Context context) { SharedPreferences prefs = getPreferences(context); return prefs.getBoolean(Constants.PREFERENCES_KEY_WIFI_REQUIRED_FOR_DOWNLOAD, false); } diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 62d19b3f..97ab596b 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -54,7 +54,9 @@ <font color="red">Cache vs Permanenter Cache</font>: <br/>Von DSub heruntergelade Titel im Cache können automatisch gelöscht werden, um Platz für neue Titel zu schaffen. Titel im permanenten Cache werden dagegen nie automatisch gelöscht. <p/><font color="red">ChromeCast funktioniert nicht</font>: - <br/>Bitte stellen Sie sicher, das keine selbstsignierten Zertifikate verwendet werden, da Chromecast diese nicht akzeptiert. + <br/>Versuchen Sie die Option Einstellungen -> Wiedergabe -> Nutze DSub als Proxy. Dies ist eine provisorische Lösung, weil Chromecast keine selbstsignierten Zertifikate akzeptiert. + <p/><font color="red">Erste Ebene in der Bibliothek sind Künstlergruppen</font>: + <br/>Im Optionsmenü deselektiere "Erste Ebene sind Künstler". Dann wird die erste Verzeichnisebene wie Künstlergruppen anstelle von Künstler behandelt. ]]> </string> <string name="main.select_server">Wähle Server</string> @@ -63,6 +65,7 @@ <string name="main.online">Gehe Online</string> <string name="main.settings">Einstellungen</string> <string name="main.albums_title">Album Liste</string> + <string name="main.albums_per_folder">Pro Ordner</string> <string name="main.albums_newest">Neue Alben</string> <string name="main.albums_recent">Vor kurzem gespielt</string> <string name="main.albums_frequent">Am meisten gespielt</string> @@ -71,9 +74,13 @@ <string name="main.albums_random">Zufall</string> <string name="main.albums_genres">Genres</string> <string name="main.albums_year">Jahrzehnt</string> + <string name="main.albums_alphabetical">Alphabetisch</string> + <string name="main.videos">Videos</string> <string name="main.songs_genres">@string/main.albums_genres</string> <string name="main.back_confirm">Zum beenden nochmal zurück drücken</string> <string name="main.scan_complete">Durchsuchen des Server abgeschlossen</string> + <string name="main.artist">Künstler</string> + <string name="main.title">Titel</string> <string name="menu.search">Suche</string> <string name="menu.shuffle">Zufall</string> @@ -106,6 +113,8 @@ <string name="menu.top_tracks">Last.FM Top Medien</string> <string name="menu.similar_artists">Ähnliche Künstler</string> <string name="menu.show_missing">Zeige fehlende</string> + <string name="menu.start_radio">Starte Radio</string> + <string name="menu.first_level_artist">Erste Ebene sind Künstler</string> <string name="playlist.label">Wiedergabelisten</string> <string name="playlist.update_info">Aktualisiere Informationen</string> @@ -126,6 +135,7 @@ <string name="search.more">Zeige mehr</string> <string name="progress.wait">Bitte warten...</string> + <string name="progress.artist_info">Lade Informationen zum Künstler</string> <string name="music_library.label">Medienbibliothek</string> <string name="music_library.label_offline">Offline Medien</string> @@ -138,6 +148,7 @@ <string name="select_album.searching">Suche...</string> <string name="select_album.no_sdcard">Fehler: Keine SD-Karte verfügbar.</string> <string name="select_album.no_network">Warnung: Kein Netzwerk verfügbar.</string> + <string name="select_album.no_room">Warnung: Es sind nur %s verfügbar</string> <string name="select_album.not_licensed">Server ist nicht lizensiert. Testzeitraum läuft ab in %d Tagen.</string> <string name="select_album.donate_dialog_message">Erhalte unbegrenzte Downloads durch eine Spende an Subsonic.</string> <string name="select_album.donate_dialog_now">Jetzt</string> @@ -158,7 +169,7 @@ <string name="select_genre.albums">%d Alben</string> <string name="select_podcasts.error">Ein Fehler beim herunterladen dieses Podcast durch den Server. Der Podcast muss zuerst vom Server heruntergeladen werden.</string> - <string name="select_podcasts.skipped">Der Podcast wurde noch nicht vom Server heruntergeladen. Der Podcast muss zuerst vom Server heruntergalden werden..</string> + <string name="select_podcasts.skipped">Der Podcast wurde noch nicht vom Server heruntergeladen. Der Podcast muss zuerst vom Server heruntergeladen werden..</string> <string name="select_podcasts.initializing">Der Podcastkanal wird vom Server initialisiert. Bitte nach kurzer Wartezeit erneut laden.</string> <string name="select_podcasts.server_download">Auf den Server herunterladen</string> <string name="select_podcasts.server_delete">Lösche vom Server</string> @@ -174,6 +185,7 @@ <string name="download.empty">Wiedergabeliste ist leer</string> <string name="download.shuffle_loading">Wiedergabeliste wird gemischt...</string> <string name="download.playerstate_downloading">Downloade - %s</string> + <string name="download.playerstate_mobile_disabled">Warte auf Wi-Fi für den Download</string> <string name="download.playerstate_buffering">Buffere</string> <string name="download.playerstate_playing_shuffle">Playing shuffle</string> <string name="download.menu_show_album">Zeige Album</string> @@ -214,6 +226,7 @@ <string name="download.downloading_summary_expanded">Aktuell: %1$s \nGeschätzte Größe: %2$s</string> <string name="download.failed_to_load">Laden fehlgeschlagen</string> + <string name="download.restore_play_queue">Wiedergabe fortsetzen bei</string> <string name="sync.new_podcasts">Neuer Podcast verfügbar</string> <string name="sync.new_playlists">Neu in Wiedergabeliste</string> @@ -301,6 +314,8 @@ <string name="settings.track_summary">Zeige Titelnummer vor dem Titel</string> <string name="settings.custom_sort">Sortiere nach Jahr</string> <string name="settings.custom_sort_summary">Sortiere Alben nach Jahr, oder alphabetisch.</string> + <string name="settings.open_to_tab">Startseite</string> + <string name="settings.open_to_tab_summary">Diese Seite direkt öffnen</string> <string name="settings.network_title">Netzwerk</string> <string name="settings.max_bitrate_wifi">Max Audio Bitrate - Wi-Fi</string> <string name="settings.max_bitrate_mobile">Max Audio Bitrate - Mobil</string> @@ -346,7 +361,7 @@ <string name="settings.temp_loss_pause_lower">Pausiere und Lautstärke bei Bedarf veringern</string> <string name="settings.temp_loss_lower">Lautstärke veringern</string> <string name="settings.temp_loss_nothing">Nichts machen</string> - <string name="settings.disconnect_pause_title">Verhalten bei Verbindungsverlust</string> + <string name="settings.disconnect_pause_title">Beim Kopfhörer abtrennen</string> <string name="settings.disconnect_pause_both">Immer pausieren</string> <string name="settings.disconnect_pause_neither">Nichts machen</string> <string name="settings.persistent_title">Dauerhafte Benachrichtigung</string> @@ -400,6 +415,8 @@ <string name="settings.menu_options.rate_summary">Zeige \"Bewerten\" im Menü</string> <string name="settings.browse_by_tags">Tags nutzen</string> <string name="settings.browse_by_tags_summary">Tags statt Ordner verwenden. Benötigt Subsonic 4.7+</string> + <string name="settings.disable_exit_prompt">DSub direkt verlassen</string> + <string name="settings.disable_exit_prompt_summary">DSub mit Zurück-Taste ohne zusätzliche Nachfrage sofort verlassen</string> <string name="settings.override_system_language">In Englisch anzeigen</string> <string name="settings.override_system_language_summary">Verwende Englisch anstatt Deutsch für DSub. Benötigt einen Neustart der App.</string> <string name="settings.drawer_items_title">Seitenmenü</string> @@ -417,6 +434,13 @@ <string name="settings.replay_gain_type.track">Track Tag</string> <string name="settings.replay_gain_bump">Wiedergabevorverstärkung</string> <string name="settings.replay_gain_untagged">Lieder ohne Wiedergabeverstärkung</string> + <string name="settings.casting">Casting</string> + <string name="settings.casting_proxy">Nutze DSub als Proxy</string> + <string name="settings.casting_proxy_summary">Sende alles über dieses Gerät als Proxy. Dies umgeht Probleme mit selbstsignierten Zertifikaten.</string> + <string name="settings.rename_duplicates">Doppelte Medien umbenennen</string> + <string name="settings.rename_duplicates_summary">Für doppelte Medien den originalen Dateinamen verwenden, um diese auseinanderhalten zu können.</string> + <string name="settings.start_on_headphones">Starte bei Kopfhörer</string> + <string name="settings.start_on_headphones_summary">Starte automatisch, wenn ein Kopfhörer angeschlossen wird.</string> <string name="shuffle.title">Mischen von</string> <string name="shuffle.startYear">Startjahr:</string> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8e7ae537..e6e19b4c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -185,6 +185,7 @@ <string name="download.empty">Playlist is empty</string> <string name="download.shuffle_loading">Shuffle list is loading...</string> <string name="download.playerstate_downloading">Downloading - %s</string> + <string name="download.playerstate_mobile_disabled">Waiting for WiFi network to download</string> <string name="download.playerstate_buffering">Buffering</string> <string name="download.playerstate_playing_shuffle">Playing shuffle</string> <string name="download.menu_show_album">Show Album</string> diff --git a/build.gradle b/build.gradle index 442304cd..426d0c77 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.1.0' + classpath 'com.android.tools.build:gradle:1.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files |