summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java16
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java6
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/APRedirectHandler.java54
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java3
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java10
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java6
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java5
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java43
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java16
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java7
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java24
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/util/syndication/FeedDiscoverer.java4
-rw-r--r--core/src/main/res/drawable/progress_bar_horizontal_dark.xml15
-rw-r--r--core/src/main/res/drawable/progress_bar_horizontal_light.xml15
-rw-r--r--core/src/main/res/values-cs-rCZ/strings.xml4
-rw-r--r--core/src/main/res/values-de/strings.xml4
-rw-r--r--core/src/main/res/values-es/strings.xml15
-rw-r--r--core/src/main/res/values-fr/strings.xml10
-rw-r--r--core/src/main/res/values-ja/strings.xml15
-rw-r--r--core/src/main/res/values-ru/strings.xml9
-rw-r--r--core/src/main/res/values-sv-rSE/strings.xml4
-rw-r--r--core/src/main/res/values-tr/strings.xml19
-rw-r--r--core/src/main/res/values/attrs.xml1
-rw-r--r--core/src/main/res/values/dimens.xml2
-rw-r--r--core/src/main/res/values/styles.xml14
29 files changed, 208 insertions, 133 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java
index d2a13f768..a24e3a485 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/GpodnetService.java
@@ -10,8 +10,6 @@ import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;
-import org.apache.http.HttpStatus;
-import org.apache.http.client.ClientProtocolException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -19,6 +17,7 @@ import org.json.JSONObject;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -602,10 +601,7 @@ public class GpodnetService {
checkStatusCode(response);
body = response.body();
result = getStringFromResponseBody(body);
- } catch (ClientProtocolException e) {
- e.printStackTrace();
- throw new GpodnetServiceException(e);
- } catch (IOException e) {
+ } catch (Exception e) {
e.printStackTrace();
throw new GpodnetServiceException(e);
} finally {
@@ -652,12 +648,12 @@ public class GpodnetService {
private void checkStatusCode(@NonNull Response response)
throws GpodnetServiceException {
int responseCode = response.code();
- if (responseCode != HttpStatus.SC_OK) {
- if (responseCode == HttpStatus.SC_UNAUTHORIZED) {
+ if (responseCode != HttpURLConnection.HTTP_OK) {
+ if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
throw new GpodnetServiceAuthenticationException("Wrong username or password");
} else {
- throw new GpodnetServiceBadStatusCodeException(
- "Bad response code: " + responseCode, responseCode);
+ throw new GpodnetServiceBadStatusCodeException("Bad response code: "
+ + responseCode, responseCode);
}
}
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java
index e06a88d5c..5f096db14 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeActionPostResponse.java
@@ -1,12 +1,13 @@
package de.danoeh.antennapod.core.gpoddernet.model;
+import android.support.v4.util.ArrayMap;
+
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.HashMap;
import java.util.Map;
public class GpodnetEpisodeActionPostResponse {
@@ -36,8 +37,8 @@ public class GpodnetEpisodeActionPostResponse {
public static GpodnetEpisodeActionPostResponse fromJSONObject(String objectString) throws JSONException {
final JSONObject object = new JSONObject(objectString);
final long timestamp = object.getLong("timestamp");
- Map<String, String> updatedUrls = new HashMap<String, String>();
JSONArray urls = object.getJSONArray("update_urls");
+ Map<String, String> updatedUrls = new ArrayMap<String, String>(urls.length());
for (int i = 0; i < urls.length(); i++) {
JSONArray urlPair = urls.getJSONArray(i);
updatedUrls.put(urlPair.getString(0), urlPair.getString(1));
diff --git a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java
index 5a37efa5e..9bd1881e4 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetUploadChangesResponse.java
@@ -1,10 +1,11 @@
package de.danoeh.antennapod.core.gpoddernet.model;
+import android.support.v4.util.ArrayMap;
+
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.HashMap;
import java.util.Map;
/**
@@ -37,7 +38,7 @@ public class GpodnetUploadChangesResponse {
public static GpodnetUploadChangesResponse fromJSONObject(String objectString) throws JSONException {
final JSONObject object = new JSONObject(objectString);
final long timestamp = object.getLong("timestamp");
- Map<String, String> updatedUrls = new HashMap<String, String>();
+ Map<String, String> updatedUrls = new ArrayMap<>();
JSONArray urls = object.getJSONArray("update_urls");
for (int i = 0; i < urls.length(); i++) {
JSONArray urlPair = urls.getJSONArray(i);
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
index d5660f67e..0b90cef6c 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/GpodnetSyncService.java
@@ -8,12 +8,12 @@ import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.support.v4.app.NotificationCompat;
+import android.support.v4.util.ArrayMap;
import android.util.Log;
import android.util.Pair;
import java.util.Collection;
import java.util.Date;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -226,7 +226,7 @@ public class GpodnetSyncService extends Service {
if(remoteActions.size() == 0) {
return;
}
- Map<Pair<String, String>, GpodnetEpisodeAction> localMostRecentPlayAction = new HashMap<Pair<String, String>, GpodnetEpisodeAction>();
+ Map<Pair<String, String>, GpodnetEpisodeAction> localMostRecentPlayAction = new ArrayMap<>();
for(GpodnetEpisodeAction action : localActions) {
Pair key = new Pair(action.getPodcast(), action.getEpisode());
GpodnetEpisodeAction mostRecent = localMostRecentPlayAction.get(key);
@@ -238,7 +238,7 @@ public class GpodnetSyncService extends Service {
}
// make sure more recent local actions are not overwritten by older remote actions
- Map<Pair<String, String>, GpodnetEpisodeAction> mostRecentPlayAction = new HashMap<Pair<String, String>, GpodnetEpisodeAction>();
+ Map<Pair<String, String>, GpodnetEpisodeAction> mostRecentPlayAction = new ArrayMap<>();
for (GpodnetEpisodeAction action : remoteActions) {
switch (action.getAction()) {
case NEW:
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/APRedirectHandler.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/APRedirectHandler.java
deleted file mode 100644
index 3efcf4da8..000000000
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/APRedirectHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package de.danoeh.antennapod.core.service.download;
-
-import android.util.Log;
-import de.danoeh.antennapod.core.BuildConfig;
-import org.apache.http.Header;
-import org.apache.http.HttpResponse;
-import org.apache.http.impl.client.DefaultRedirectHandler;
-import org.apache.http.protocol.HttpContext;
-
-import java.net.URI;
-
-public class APRedirectHandler extends DefaultRedirectHandler {
- // Identifier for logger
- private static final String TAG = "APRedirectHandler";
- // Header field, which has to be potentially fixed
- private static final String LOC = "Location";
- // Regular expressions for character strings, which should not appear in URLs
- private static final String CHi[] = { "\\{", "\\}", "\\|", "\\\\", "\\^", "~", "\\[", "\\]", "\\`"};
- private static final String CHo[] = { "%7B", "%7D", "%7C", "%5C", "%5E", "%7E", "%5B", "%5D", "%60"};
-
- /**
- * Workaround for broken URLs in redirection.
- * Proper solution involves LaxRedirectStrategy() which is not available in
- * current API yet.
- */
- @Override
- public URI getLocationURI(HttpResponse response, HttpContext context)
- throws org.apache.http.ProtocolException {
-
- Header h[] = response.getHeaders(LOC);
- if (h.length>0) {
- String s = h[0].getValue();
-
- // Fix broken URL
- for(int i=0; i<CHi.length;i++)
- s = s.replaceAll(CHi[i], CHo[i]);
-
- // If anything had to be fixed, then replace the header
- if (!s.equals(h[0].getValue()))
- {
- if (BuildConfig.DEBUG)
- Log.d(TAG, "Original URL: " + h[0].getValue());
-
- response.setHeader(LOC, s);
-
- if (BuildConfig.DEBUG)
- Log.d(TAG, "Fixed URL: " + s);
- }
- }
-
- // call DefaultRedirectHandler with fixed URL
- return super.getLocationURI(response, context);
- }
-}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
index 9768bd5de..29c44207d 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java
@@ -22,7 +22,6 @@ import android.util.Log;
import android.webkit.URLUtil;
import org.apache.commons.io.FileUtils;
-import org.apache.http.HttpStatus;
import org.xml.sax.SAXException;
import java.io.File;
@@ -187,7 +186,7 @@ public class DownloadService extends Service {
if (status.getReason() == DownloadError.ERROR_UNAUTHORIZED) {
postAuthenticationNotification(downloader.getDownloadRequest());
} else if (status.getReason() == DownloadError.ERROR_HTTP_DATA_ERROR
- && Integer.valueOf(status.getReasonDetailed()) == HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE) {
+ && Integer.valueOf(status.getReasonDetailed()) == 416) {
Log.d(TAG, "Requested invalid range, restarting download from the beginning");
FileUtils.deleteQuietly(new File(downloader.getDownloadRequest().getDestination()));
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java
index 9f54db477..0b9fba6f7 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/HttpDownloader.java
@@ -11,7 +11,6 @@ import com.squareup.okhttp.ResponseBody;
import com.squareup.okhttp.internal.http.HttpDate;
import org.apache.commons.io.IOUtils;
-import org.apache.http.HttpStatus;
import java.io.BufferedInputStream;
import java.io.File;
@@ -162,7 +161,7 @@ public class HttpDownloader extends Downloader {
return;
}
- if (!StorageUtils.storageAvailable(ClientConfig.applicationCallbacks.getApplicationInstance())) {
+ if (!StorageUtils.storageAvailable()) {
onFail(DownloadError.ERROR_DEVICE_NOT_FOUND, null);
return;
}
@@ -171,7 +170,7 @@ public class HttpDownloader extends Downloader {
String contentRangeHeader = (fileExists) ? response.header("Content-Range") : null;
- if (fileExists && response.code() == HttpStatus.SC_PARTIAL_CONTENT
+ if (fileExists && response.code() == HttpURLConnection.HTTP_PARTIAL
&& !TextUtils.isEmpty(contentRangeHeader)) {
String start = contentRangeHeader.substring("bytes ".length(),
contentRangeHeader.indexOf("-"));
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java
index 7fdf443c2..e26ee32cb 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java
@@ -1127,9 +1127,13 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre
private final org.antennapod.audio.MediaPlayer.OnErrorListener audioErrorListener = new org.antennapod.audio.MediaPlayer.OnErrorListener() {
@Override
- public boolean onError(org.antennapod.audio.MediaPlayer mp, int what,
- int extra) {
- return genericOnError(mp, what, extra);
+ public boolean onError(org.antennapod.audio.MediaPlayer mp, int what, int extra) {
+ if(mp.canFallback()) {
+ mp.fallback();
+ return true;
+ } else {
+ return genericOnError(mp, what, extra);
+ }
}
};
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java
index 446061ea6..fcd96826b 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/ShakeListener.java
@@ -5,7 +5,6 @@ import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
-import android.util.FloatMath;
import android.util.Log;
public class ShakeListener implements SensorEventListener
@@ -50,8 +49,8 @@ public class ShakeListener implements SensorEventListener
float gY = event.values[1] / SensorManager.GRAVITY_EARTH;
float gZ = event.values[2] / SensorManager.GRAVITY_EARTH;
- float gForce = FloatMath.sqrt(gX*gX + gY*gY + gZ*gZ);
- if (gForce > 2.25f) {
+ double gForce = Math.sqrt(gX*gX + gY*gY + gZ*gZ);
+ if (gForce > 2.25) {
Log.d(TAG, "Detected shake " + gForce);
mSleepTimer.onShake();
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
index c34515118..fe5b177ab 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java
@@ -1,13 +1,13 @@
package de.danoeh.antennapod.core.storage;
import android.database.Cursor;
+import android.support.v4.util.ArrayMap;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -229,7 +229,7 @@ public final class DBReader {
for(int i=0, len=itemIds.length; i < len; i++) {
ids[i] = String.valueOf(itemIds[i]);
}
- Map<Long,FeedMedia> result = new HashMap<>(itemIds.length);
+ Map<Long,FeedMedia> result = new ArrayMap<>(itemIds.length);
Cursor cursor = adapter.getFeedMediaCursor(ids);
try {
if (cursor.moveToFirst()) {
@@ -871,7 +871,7 @@ public final class DBReader {
ids[i] = String.valueOf(imageIds[i]);
}
Cursor cursor = adapter.getImageCursor(ids);
- Map<Long, FeedImage> result = new HashMap<>(cursor.getCount());
+ Map<Long, FeedImage> result = new ArrayMap<>(cursor.getCount());
try {
if ((cursor.getCount() == 0) || !cursor.moveToFirst()) {
return Collections.emptyMap();
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
index 24519f10d..f74064cfc 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java
@@ -223,6 +223,11 @@ public class DBWriter {
}
EventDistributor.getInstance().sendFeedUpdateBroadcast();
+ // we assume we also removed download log entries for the feed or its media files.
+ // especially important if download or refresh failed, as the user should not be able
+ // to retry these
+ EventDistributor.getInstance().sendDownloadLogUpdateBroadcast();
+
BackupManager backupManager = new BackupManager(context);
backupManager.dataChanged();
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
index 87485a237..629b73668 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java
@@ -886,6 +886,10 @@ public class PodDBAdapter {
}
public void removeFeedMedia(FeedMedia media) {
+ // delete download log entries for feed media
+ db.delete(TABLE_NAME_DOWNLOAD_LOG, KEY_FEEDFILE + "=? AND " + KEY_FEEDFILETYPE +"=?",
+ new String[] { String.valueOf(media.getId()), String.valueOf(FeedMedia.FEEDFILETYPE_FEEDMEDIA) });
+
db.delete(TABLE_NAME_FEED_MEDIA, KEY_ID + "=?",
new String[]{String.valueOf(media.getId())});
}
@@ -930,6 +934,9 @@ public class PodDBAdapter {
removeFeedItem(item);
}
}
+ // delete download log entries for feed
+ db.delete(TABLE_NAME_DOWNLOAD_LOG, KEY_FEEDFILE + "=? AND " + KEY_FEEDFILETYPE +"=?",
+ new String[] { String.valueOf(feed.getId()), String.valueOf(Feed.FEEDFILETYPE_FEED) });
db.delete(TABLE_NAME_FEEDS, KEY_ID + "=?",
new String[]{String.valueOf(feed.getId())});
@@ -1258,25 +1265,31 @@ public class PodDBAdapter {
}
public final Cursor getFeedItemCursor(final String podcastUrl, final String episodeUrl) {
- final String query = "SELECT " + SEL_FI_SMALL_STR + " FROM " + TABLE_NAME_FEED_ITEMS
- + " INNER JOIN " +
- TABLE_NAME_FEEDS + " ON " + TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" +
- TABLE_NAME_FEEDS + "." + KEY_ID + " WHERE " + TABLE_NAME_FEED_ITEMS + "." + KEY_ITEM_IDENTIFIER + "='" +
- episodeUrl + "' AND " + TABLE_NAME_FEEDS + "." + KEY_DOWNLOAD_URL + "='" + podcastUrl + "'";
+ String downloadUrl = DatabaseUtils.sqlEscapeString(podcastUrl);
+ String itemIdentifier = DatabaseUtils.sqlEscapeString(episodeUrl);
+ final String query = ""
+ + "SELECT " + SEL_FI_SMALL_STR + " FROM " + TABLE_NAME_FEED_ITEMS
+ + " INNER JOIN " + TABLE_NAME_FEEDS
+ + " ON " + TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" + TABLE_NAME_FEEDS + "." + KEY_ID
+ + " WHERE " + TABLE_NAME_FEED_ITEMS + "." + KEY_ITEM_IDENTIFIER + "=" + itemIdentifier
+ + " AND " + TABLE_NAME_FEEDS + "." + KEY_DOWNLOAD_URL + "=" + downloadUrl;
return db.rawQuery(query, null);
}
public Cursor getImageAuthenticationCursor(final String imageUrl) {
- final String query = "SELECT " + KEY_USERNAME + "," + KEY_PASSWORD + " FROM "
- + TABLE_NAME_FEED_IMAGES + " INNER JOIN " + TABLE_NAME_FEEDS + " ON " +
- TABLE_NAME_FEED_IMAGES + "." + KEY_ID + "=" + TABLE_NAME_FEEDS + "." + KEY_IMAGE + " WHERE "
- + TABLE_NAME_FEED_IMAGES + "." + KEY_DOWNLOAD_URL + "='" + imageUrl + "' UNION SELECT "
- + KEY_USERNAME + "," + KEY_PASSWORD + " FROM " + TABLE_NAME_FEED_IMAGES + " INNER JOIN "
- + TABLE_NAME_FEED_ITEMS + " ON " + TABLE_NAME_FEED_IMAGES + "." + KEY_ID + "=" +
- TABLE_NAME_FEED_ITEMS + "." + KEY_IMAGE + " INNER JOIN " + TABLE_NAME_FEEDS + " ON "
- + TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" + TABLE_NAME_FEEDS + "." + KEY_ID + " WHERE "
- + TABLE_NAME_FEED_IMAGES + "." + KEY_DOWNLOAD_URL + "='" + imageUrl + "'";
- Log.d(TAG, "Query: " + query);
+ String downloadUrl = DatabaseUtils.sqlEscapeString(imageUrl);
+ final String query = ""
+ + "SELECT " + KEY_USERNAME + "," + KEY_PASSWORD + " FROM " + TABLE_NAME_FEED_IMAGES
+ + " INNER JOIN " + TABLE_NAME_FEEDS
+ + " ON " + TABLE_NAME_FEED_IMAGES + "." + KEY_ID + "=" + TABLE_NAME_FEEDS + "." + KEY_IMAGE
+ + " WHERE " + TABLE_NAME_FEED_IMAGES + "." + KEY_DOWNLOAD_URL + "=" + downloadUrl
+ + " UNION SELECT " + KEY_USERNAME + "," + KEY_PASSWORD
+ + " FROM " + TABLE_NAME_FEED_IMAGES
+ + " INNER JOIN " + TABLE_NAME_FEED_ITEMS
+ + " ON " + TABLE_NAME_FEED_IMAGES + "." + KEY_ID + "=" + TABLE_NAME_FEED_ITEMS + "." + KEY_IMAGE
+ + " INNER JOIN " + TABLE_NAME_FEEDS
+ + " ON " + TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" + TABLE_NAME_FEEDS + "." + KEY_ID
+ + " WHERE " + TABLE_NAME_FEED_IMAGES + "." + KEY_DOWNLOAD_URL + "=" + downloadUrl;
return db.rawQuery(query, null);
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java
index 413a11f8e..9280db8a3 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/syndication/handler/HandlerState.java
@@ -1,8 +1,8 @@
package de.danoeh.antennapod.core.syndication.handler;
+import android.support.v4.util.ArrayMap;
+
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Stack;
@@ -32,7 +32,7 @@ public class HandlerState {
/**
* Namespaces that have been defined so far.
*/
- protected HashMap<String, Namespace> namespaces;
+ protected Map<String, Namespace> namespaces;
protected Stack<Namespace> defaultNamespaces;
/**
* Buffer for saving characters.
@@ -42,16 +42,16 @@ public class HandlerState {
/**
* Temporarily saved objects.
*/
- protected HashMap<String, Object> tempObjects;
+ protected Map<String, Object> tempObjects;
public HandlerState(Feed feed) {
this.feed = feed;
- alternateUrls = new LinkedHashMap<String, String>();
+ alternateUrls = new ArrayMap<>();
items = new ArrayList<FeedItem>();
tagstack = new Stack<SyndElement>();
- namespaces = new HashMap<String, Namespace>();
+ namespaces = new ArrayMap<>();
defaultNamespaces = new Stack<Namespace>();
- tempObjects = new HashMap<String, Object>();
+ tempObjects = new ArrayMap<>();
}
public Feed getFeed() {
@@ -105,7 +105,7 @@ public class HandlerState {
alternateUrls.put(url, title);
}
- public HashMap<String, Object> getTempObjects() {
+ public Map<String, Object> getTempObjects() {
return tempObjects;
}
}
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java
index 07432d28a..287ec4d0c 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/LangUtils.java
@@ -1,14 +1,15 @@
package de.danoeh.antennapod.core.util;
+import android.support.v4.util.ArrayMap;
+
import java.nio.charset.Charset;
-import java.util.HashMap;
public class LangUtils {
public static final Charset UTF_8 = Charset.forName("UTF-8");
- private static HashMap<String, String> languages;
+ private static ArrayMap<String, String> languages;
static {
- languages = new HashMap<String, String>();
+ languages = new ArrayMap<>();
languages.put("af", "Afrikaans");
languages.put("sq", "Albanian");
languages.put("sq", "Albanian");
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java
index 248f2bf32..1ef81bf64 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java
@@ -1,14 +1,12 @@
package de.danoeh.antennapod.core.util;
import android.app.Activity;
-import android.content.Context;
import android.os.Build;
import android.os.StatFs;
import android.util.Log;
import java.io.File;
-import de.danoeh.antennapod.core.BuildConfig;
import de.danoeh.antennapod.core.ClientConfig;
import de.danoeh.antennapod.core.preferences.UserPreferences;
@@ -18,13 +16,12 @@ import de.danoeh.antennapod.core.preferences.UserPreferences;
public class StorageUtils {
private static final String TAG = "StorageUtils";
- public static boolean storageAvailable(Context context) {
+ public static boolean storageAvailable() {
File dir = UserPreferences.getDataFolder(null);
if (dir != null) {
return dir.exists() && dir.canRead() && dir.canWrite();
} else {
- if (BuildConfig.DEBUG)
- Log.d(TAG, "Storage not available: data folder is null");
+ Log.d(TAG, "Storage not available: data folder is null");
return false;
}
}
@@ -39,7 +36,7 @@ public class StorageUtils {
* @return true if external storage is available
*/
public static boolean checkStorageAvailability(Activity activity) {
- boolean storageAvailable = storageAvailable(activity);
+ boolean storageAvailable = storageAvailable();
if (!storageAvailable) {
activity.finish();
activity.startActivity(ClientConfig.applicationCallbacks.getStorageErrorActivity(activity));
@@ -51,8 +48,19 @@ public class StorageUtils {
* Get the number of free bytes that are available on the external storage.
*/
public static long getFreeSpaceAvailable() {
- StatFs stat = new StatFs(UserPreferences.getDataFolder(
- null).getAbsolutePath());
+ File dataFolder = UserPreferences.getDataFolder(null);
+ if (dataFolder != null) {
+ return getFreeSpaceAvailable(dataFolder.getAbsolutePath());
+ } else {
+ return 0;
+ }
+ }
+
+ /**
+ * Get the number of free bytes that are available on the external storage.
+ */
+ public static long getFreeSpaceAvailable(String path) {
+ StatFs stat = new StatFs(path);
long availableBlocks;
long blockSize;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/syndication/FeedDiscoverer.java b/core/src/main/java/de/danoeh/antennapod/core/util/syndication/FeedDiscoverer.java
index d148419fd..13cb9f002 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/util/syndication/FeedDiscoverer.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/util/syndication/FeedDiscoverer.java
@@ -1,6 +1,7 @@
package de.danoeh.antennapod.core.util.syndication;
import android.net.Uri;
+import android.support.v4.util.ArrayMap;
import android.text.TextUtils;
import org.jsoup.Jsoup;
@@ -10,7 +11,6 @@ import org.jsoup.select.Elements;
import java.io.File;
import java.io.IOException;
-import java.util.LinkedHashMap;
import java.util.Map;
/**
@@ -46,7 +46,7 @@ public class FeedDiscoverer {
}
private Map<String, String> findLinks(Document document, String baseUrl) {
- Map<String, String> res = new LinkedHashMap<String, String>();
+ Map<String, String> res = new ArrayMap<>();
Elements links = document.head().getElementsByTag("link");
for (Element link : links) {
String rel = link.attr("rel");
diff --git a/core/src/main/res/drawable/progress_bar_horizontal_dark.xml b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml
new file mode 100644
index 000000000..73ad5b37c
--- /dev/null
+++ b/core/src/main/res/drawable/progress_bar_horizontal_dark.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background">
+ <shape>
+ <solid android:color="#33FFFFFF"/>
+ </shape>
+ </item>
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <solid android:color="@color/holo_blue_dark"/>
+ </shape>
+ </clip>
+ </item>
+</layer-list>
diff --git a/core/src/main/res/drawable/progress_bar_horizontal_light.xml b/core/src/main/res/drawable/progress_bar_horizontal_light.xml
new file mode 100644
index 000000000..a1a7129e9
--- /dev/null
+++ b/core/src/main/res/drawable/progress_bar_horizontal_light.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background">
+ <shape>
+ <solid android:color="#33212121"/>
+ </shape>
+ </item>
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <solid android:color="@color/holo_blue_light"/>
+ </shape>
+ </clip>
+ </item>
+</layer-list>
diff --git a/core/src/main/res/values-cs-rCZ/strings.xml b/core/src/main/res/values-cs-rCZ/strings.xml
index e220432b9..987b2e7b5 100644
--- a/core/src/main/res/values-cs-rCZ/strings.xml
+++ b/core/src/main/res/values-cs-rCZ/strings.xml
@@ -22,7 +22,7 @@
<string name="playback_history_label">Historie přehrávání</string>
<string name="gpodnet_main_label">gpodder.net</string>
<string name="gpodnet_auth_label">Login pro gpodder.net</string>
- <string name="free_space_label">%1$s volných</string>
+ <string name="free_space_label">%1$s volné</string>
<!--New episodes fragment-->
<string name="recently_published_episodes_label">Nedávno zveřejněné</string>
<string name="episode_filter_label">Zobrazit pouze nové epizody</string>
@@ -264,7 +264,7 @@
<string name="pref_unpauseOnHeadsetReconnect_sum">Pokračovat v přehrávání po připojení sluchátek</string>
<string name="pref_unpauseOnBluetoothReconnect_sum">Pokračovat v přehrávání po připojení bluetooth</string>
<string name="pref_hardwareForwardButtonSkips_title">Přeskočit tlačítkem vpřed</string>
- <string name="pref_hardwareForwardButtonSkips_sum">Po stlačení hardwarového tlačítka pro posun vpřed přeskočit na další skladbu</string>
+ <string name="pref_hardwareForwardButtonSkips_sum">Po stlačení hardwarového tlačítka pro posun vpřed místo přetočení vpřed přeskočit na další epizodu</string>
<string name="pref_followQueue_sum">Po přehrání položky z fronty přejít automaticky na další</string>
<string name="pref_auto_delete_sum">Smazat díl po jeho přehrání</string>
<string name="pref_auto_delete_title">Automatické mazání</string>
diff --git a/core/src/main/res/values-de/strings.xml b/core/src/main/res/values-de/strings.xml
index 7cdd15146..001f869aa 100644
--- a/core/src/main/res/values-de/strings.xml
+++ b/core/src/main/res/values-de/strings.xml
@@ -16,7 +16,7 @@
<string name="add_new_feed_label">Podcast hinzufügen</string>
<string name="downloads_label">Downloads</string>
<string name="downloads_running_label">Aktiv</string>
- <string name="downloads_completed_label">Abgeschlossen</string>
+ <string name="downloads_completed_label">Beendet</string>
<string name="downloads_log_label">Log</string>
<string name="cancel_download_label">Download abbrechen</string>
<string name="playback_history_label">Zuletzt gespielt</string>
@@ -513,7 +513,7 @@
<string name="sort_duration_short_long">Dauer (kurz \u2192 lang)</string>
<string name="sort_duration_long_short">Dauer (lang \u2192 kurz)</string>
<!--Rating dialog-->
- <string name="rating_title">Magst du AntennaPod?</string>
+ <string name="rating_title">Gefällt dir AntennaPod?</string>
<string name="rating_message">Wir würden uns freuen, wenn du dir kurz die Zeit nimmst, AntennaPod zu bewerten.</string>
<string name="rating_never_label">Lass mich in Ruhe</string>
<string name="rating_later_label">Erinnere mich später</string>
diff --git a/core/src/main/res/values-es/strings.xml b/core/src/main/res/values-es/strings.xml
index 0bed13e34..a99a052d4 100644
--- a/core/src/main/res/values-es/strings.xml
+++ b/core/src/main/res/values-es/strings.xml
@@ -22,6 +22,7 @@
<string name="playback_history_label">Historial de reproducciones</string>
<string name="gpodnet_main_label">gpodder.net</string>
<string name="gpodnet_auth_label">Iniciar sesión en gpodder.net</string>
+ <string name="free_space_label">%1$s libre</string>
<!--New episodes fragment-->
<string name="recently_published_episodes_label">Publicados recientemente</string>
<string name="episode_filter_label">Mostrar solo episodios nuevos</string>
@@ -260,6 +261,8 @@
<string name="pref_pauseOnDisconnect_sum">Pausar la reproducción al desconectar los auriculares o el bluetooth</string>
<string name="pref_unpauseOnHeadsetReconnect_sum">Reanudar reproducción cuando se reconecten los auriculares</string>
<string name="pref_unpauseOnBluetoothReconnect_sum">Reanudar reproducción cuando se reconecte el bluetooth</string>
+ <string name="pref_hardwareForwardButtonSkips_title">Saltar episodio con botón</string>
+ <string name="pref_hardwareForwardButtonSkips_sum">Al pulsar el botón físico de avanzar se saltará al siguiente episodio en lugar de sólo avanzar</string>
<string name="pref_followQueue_sum">Saltar al siguiente elemento de la cola al acabar la reproducción</string>
<string name="pref_auto_delete_sum">Borrar episodio cuando finalice la reproducción</string>
<string name="pref_auto_delete_title">Eliminar automáticamente</string>
@@ -344,6 +347,9 @@
<string name="pref_smart_mark_as_played_disabled">Deshabilitado</string>
<string name="pref_image_cache_size_title">Tamaño de la caché de imágenes</string>
<string name="pref_image_cache_size_sum">Tamaño de la caché en disco para imágenes.</string>
+ <string name="crash_report_title">Informe de fallo</string>
+ <string name="crash_report_sum">Enviar el último informe de fallo por e-mail</string>
+ <string name="send_email">Enviar e-mail</string>
<string name="experimental_pref">Experimental</string>
<string name="pref_sonic_title">Sonic media player</string>
<string name="pref_sonic_message">Usar sonic media player integrado como sustitución de Prestissimo</string>
@@ -438,11 +444,15 @@
<string name="selected_folder_label">Carpeta seleccionada</string>
<string name="create_folder_label">Crear carpeta</string>
<string name="choose_data_directory">Elegir carpeta de datos</string>
+ <string name="choose_data_directory_message">Por favor elige la raíz de la carpeta de datos. AntennaPod creará los subdirectorios apropiados.</string>
<string name="create_folder_msg">¿Crear carpeta con nombre «%1$s»?</string>
<string name="create_folder_success">Carpeta creada</string>
<string name="create_folder_error_no_write_access">No se puede escribir a esta carpeta</string>
<string name="create_folder_error_already_exists">Ya existe la carpeta</string>
<string name="create_folder_error">No se ha podido crear la carpeta</string>
+ <string name="folder_does_not_exist_error">\"%1$s\" no existe</string>
+ <string name="folder_not_readable_error">\"%1$s\" no se puede leer</string>
+ <string name="folder_not_writable_error">\"%1$s\" no se puede modificar</string>
<string name="folder_not_empty_dialog_title">La carpeta no está vacía</string>
<string name="folder_not_empty_dialog_msg">La carpeta elegida no está vacía. Las descargas y otros archivos se copiarán directamente en esta carpeta. ¿Continuar igualmente?</string>
<string name="set_to_default_folder">Elegir carpeta predeterminada</string>
@@ -503,4 +513,9 @@
<string name="sort_duration_short_long">Duración (Corto \u2192 Largo)</string>
<string name="sort_duration_long_short">Duración (Largo \u2192 Corto)</string>
<!--Rating dialog-->
+ <string name="rating_title">¿Te gusta AntennaPod?</string>
+ <string name="rating_message">Estaríamos muy agradecidos si nos dedicas un tiempo para puntuar AntennaPod</string>
+ <string name="rating_never_label">Déjame en paz</string>
+ <string name="rating_later_label">Recuérdamelo después</string>
+ <string name="rating_now_label">¡Venga, hagámoslo!</string>
</resources>
diff --git a/core/src/main/res/values-fr/strings.xml b/core/src/main/res/values-fr/strings.xml
index bd3d1406f..c1a8a03fe 100644
--- a/core/src/main/res/values-fr/strings.xml
+++ b/core/src/main/res/values-fr/strings.xml
@@ -22,7 +22,7 @@
<string name="playback_history_label">Journal des lectures</string>
<string name="gpodnet_main_label">gpodder.net</string>
<string name="gpodnet_auth_label">Identifiants gpodder.net</string>
- <string name="free_space_label">\"%1$s libre</string>
+ <string name="free_space_label">%1$s libre</string>
<!--New episodes fragment-->
<string name="recently_published_episodes_label">Publié récemment</string>
<string name="episode_filter_label">N\'afficher que les nouveaux épisodes</string>
@@ -260,9 +260,9 @@
<string name="pref_episode_cleanup_summary">Les épisodes qui ne sont ni dans la liste ni dans les favoris peuvent être supprimés si l\'espace disque devient faible</string>
<string name="pref_pauseOnDisconnect_sum">Interrompre la lecture lorsque le casque ou le bluetooth sont déconnectés</string>
<string name="pref_unpauseOnHeadsetReconnect_sum">Reprendre la lecture quand les écouteurs sont reconnectés</string>
- <string name="pref_unpauseOnBluetoothReconnect_sum">Reprendre la lecture quand le bluetooth se reconnecte</string>
+ <string name="pref_unpauseOnBluetoothReconnect_sum">Reprendre la lecture quand le Bluetooth se reconnecte</string>
<string name="pref_hardwareForwardButtonSkips_title">Le bouton piste suivante saute l\'épisode</string>
- <string name="pref_hardwareForwardButtonSkips_sum">Au lieu de faire un saut avant passer à l\'épisode suivant quand un bouton physique pour passer à la piste suivante est pressé</string>
+ <string name="pref_hardwareForwardButtonSkips_sum">Passer à l\'épisode suivant au lieu de faire un saut avant quand il est pressé un bouton physique pour avancer à la piste suivante</string>
<string name="pref_followQueue_sum">Après la fin d\'un épisode, passer au suivant</string>
<string name="pref_auto_delete_sum">Supprimer l\'épisode quand la lecture est finie</string>
<string name="pref_auto_delete_title">Suppression automatique</string>
@@ -283,7 +283,7 @@
<string name="pref_downloadMediaOnWifiOnly_title">Téléchargement en Wi-Fi</string>
<string name="pref_pauseOnHeadsetDisconnect_title">Déconnexion du casque</string>
<string name="pref_unpauseOnHeadsetReconnect_title">Reconnexion du casque</string>
- <string name="pref_unpauseOnBluetoothReconnect_title">Connection bluetooth</string>
+ <string name="pref_unpauseOnBluetoothReconnect_title">Reconnexion Bluetooth</string>
<string name="pref_mobileUpdate_title">Mises à jour mobile</string>
<string name="pref_mobileUpdate_sum">Autoriser les mises à jour à travers la connexion de données mobile</string>
<string name="refreshing_label">Mise à jour en cours</string>
@@ -517,5 +517,5 @@
<string name="rating_message">Nous vous serions reconnaissant de prendre un peu de temps pour noter AntennaPod.</string>
<string name="rating_never_label">Laissez moi tranquille</string>
<string name="rating_later_label">Rappelez le moi plus tard</string>
- <string name="rating_now_label">Okay, faisons ça !</string>
+ <string name="rating_now_label">Okay, c\'est parti !</string>
</resources>
diff --git a/core/src/main/res/values-ja/strings.xml b/core/src/main/res/values-ja/strings.xml
index f58e90597..0bedd912f 100644
--- a/core/src/main/res/values-ja/strings.xml
+++ b/core/src/main/res/values-ja/strings.xml
@@ -22,6 +22,7 @@
<string name="playback_history_label">再生履歴</string>
<string name="gpodnet_main_label">gpodder.net</string>
<string name="gpodnet_auth_label">gpodder.net ログイン</string>
+ <string name="free_space_label">%1$s 空き</string>
<!--New episodes fragment-->
<string name="recently_published_episodes_label">最近公開された</string>
<string name="episode_filter_label">新しいエピソードのみ表示</string>
@@ -259,6 +260,8 @@
<string name="pref_pauseOnDisconnect_sum">ヘッドフォンまたはBluetoothの接続が切断された時、再生を一時停止します</string>
<string name="pref_unpauseOnHeadsetReconnect_sum">ヘッドフォンが再接続された時に再生を再開します</string>
<string name="pref_unpauseOnBluetoothReconnect_sum">Bluetoothが再接続された時に再生を再開します</string>
+ <string name="pref_hardwareForwardButtonSkips_title">早送りボタンでスキップ</string>
+ <string name="pref_hardwareForwardButtonSkips_sum">ハードウェアの早送りボタンを押したときに、早送りの代わりに次のエピソードにスキップします</string>
<string name="pref_followQueue_sum">再生が完了した時に次のキューのアイテムに移動します</string>
<string name="pref_auto_delete_sum">再生が完了した時にエピソードを削除します</string>
<string name="pref_auto_delete_title">自動削除</string>
@@ -343,6 +346,9 @@
<string name="pref_smart_mark_as_played_disabled">無効</string>
<string name="pref_image_cache_size_title">画像キャッシュサイズ</string>
<string name="pref_image_cache_size_sum">画像のディスクキャッシュのサイズ。</string>
+ <string name="crash_report_title">クラッシュレポート</string>
+ <string name="crash_report_sum">メールで最新のクラッシュレポートを送信します</string>
+ <string name="send_email">メールを送信</string>
<string name="experimental_pref">実験的</string>
<string name="pref_sonic_title">Sonic メディアプレーヤー</string>
<string name="pref_sonic_message">Prestissimo の代わりに、内蔵の Sonic メディアプレーヤーを使用します</string>
@@ -434,11 +440,15 @@
<string name="selected_folder_label">選択したフォルダー:</string>
<string name="create_folder_label">フォルダーを作成</string>
<string name="choose_data_directory">データ フォルダーを選択</string>
+ <string name="choose_data_directory_message">基本のデータフォルダーを選択してください。 AntennaPodは、適切なサブディレクトリを作成します。</string>
<string name="create_folder_msg">名前 \"%1$s\" で新しいフォルダーを作成しますか?</string>
<string name="create_folder_success">新しいフォルダーを作成しました</string>
<string name="create_folder_error_no_write_access">このフォルダーに書き込みできません</string>
<string name="create_folder_error_already_exists">フォルダーは既に存在します</string>
<string name="create_folder_error">フォルダーを作成できません</string>
+ <string name="folder_does_not_exist_error">\"%1$s\" は存在しません</string>
+ <string name="folder_not_readable_error">\"%1$s\" は読み込みできません</string>
+ <string name="folder_not_writable_error">\"%1$s\" は書き込みできません</string>
<string name="folder_not_empty_dialog_title">フォルダーが空ではありません</string>
<string name="folder_not_empty_dialog_msg">選択したフォルダは空ではありません。メディアのダウンロードやその他のファイルはこのフォルダに直接配置されます。続けますか?</string>
<string name="set_to_default_folder">デフォルトのフォルダーを選択</string>
@@ -499,4 +509,9 @@
<string name="sort_duration_short_long">期間 (短 \u2192 長)</string>
<string name="sort_duration_long_short">期間 (長 \u2192 短)</string>
<!--Rating dialog-->
+ <string name="rating_title">AntennaPod は気に入りましたか?</string>
+ <string name="rating_message">AntennaPodを評価する時間をいただければ幸いです。</string>
+ <string name="rating_never_label">構わないで</string>
+ <string name="rating_later_label">後で確認する</string>
+ <string name="rating_now_label">もちろん、します!</string>
</resources>
diff --git a/core/src/main/res/values-ru/strings.xml b/core/src/main/res/values-ru/strings.xml
index 4ad4d3561..a3aee0f03 100644
--- a/core/src/main/res/values-ru/strings.xml
+++ b/core/src/main/res/values-ru/strings.xml
@@ -339,6 +339,7 @@
<string name="pref_smart_mark_as_played_disabled">Отключено</string>
<string name="pref_image_cache_size_title">Размер кэша для изображений</string>
<string name="pref_image_cache_size_sum">Размер дискового кэша для изображений</string>
+ <string name="crash_report_title">Отчет о сбое</string>
<string name="experimental_pref">Экспериментальные настройки</string>
<string name="pref_sonic_title">Проигрыватель Sonic</string>
<string name="pref_sonic_message">Использовать встроенный проигрыватель Sonic вместо Prestissimo.</string>
@@ -426,6 +427,9 @@
<string name="create_folder_error_no_write_access">Запись в эту папку невозможна</string>
<string name="create_folder_error_already_exists">Папка уже существует</string>
<string name="create_folder_error">Невозможно создать папку</string>
+ <string name="folder_does_not_exist_error">\"%1$s\" не существует</string>
+ <string name="folder_not_readable_error">\"%1$s\" недоступен для чтения</string>
+ <string name="folder_not_writable_error">\"%1$s\" недоступен для записи</string>
<string name="folder_not_empty_dialog_title">Папка не пуста</string>
<string name="folder_not_empty_dialog_msg">Выбранная папка не пуста. Загрузки и прочие файлы будут сохранены в эту папку. Продолжить?</string>
<string name="set_to_default_folder">Выберите папку по умолчанию</string>
@@ -486,4 +490,9 @@
<string name="sort_duration_short_long">Продолжительности (Короткие \u2192 Длинные)</string>
<string name="sort_duration_long_short">Продолжительности (Длинные \u2192 Короткие)</string>
<!--Rating dialog-->
+ <string name="rating_title">Нравится AntennaPod?</string>
+ <string name="rating_message">Мы будем благодарны, если вы оцените AntennaPod.</string>
+ <string name="rating_never_label">Отстань от меня</string>
+ <string name="rating_later_label">Напомни позже</string>
+ <string name="rating_now_label">Конечно, давай!</string>
</resources>
diff --git a/core/src/main/res/values-sv-rSE/strings.xml b/core/src/main/res/values-sv-rSE/strings.xml
index a618e257f..51a75a3e7 100644
--- a/core/src/main/res/values-sv-rSE/strings.xml
+++ b/core/src/main/res/values-sv-rSE/strings.xml
@@ -22,7 +22,7 @@
<string name="playback_history_label">Uppspelningshistorik</string>
<string name="gpodnet_main_label">gpodder.net</string>
<string name="gpodnet_auth_label">Inloggning till gpodder.net</string>
- <string name="free_space_label">\"%1$s oanvänt</string>
+ <string name="free_space_label">%1$s kvar</string>
<!--New episodes fragment-->
<string name="recently_published_episodes_label">Nyligen publicerade</string>
<string name="episode_filter_label">Visa bara nya Episoder</string>
@@ -262,7 +262,7 @@
<string name="pref_unpauseOnHeadsetReconnect_sum">Fortsätt uppspelningen när hörlurarna återansluts</string>
<string name="pref_unpauseOnBluetoothReconnect_sum">Fortsätt uppspelningen när bluetooth återansluts</string>
<string name="pref_hardwareForwardButtonSkips_title">Framåt-knappen hoppar</string>
- <string name="pref_hardwareForwardButtonSkips_sum">När den fysiska framåt-knappen trycks in, hoppa till nästa episod istället för att spola framåt</string>
+ <string name="pref_hardwareForwardButtonSkips_sum">Hoppa till nästa episod istället för att snabbspola vid tryck på hårdvaruknappen</string>
<string name="pref_followQueue_sum">Hoppa till nästa i kön när uppspelningen är klar</string>
<string name="pref_auto_delete_sum">Ta bort episoden när uppspelningen är klar</string>
<string name="pref_auto_delete_title">Automatisk Borttagning</string>
diff --git a/core/src/main/res/values-tr/strings.xml b/core/src/main/res/values-tr/strings.xml
index 6a59248f6..5494dd48c 100644
--- a/core/src/main/res/values-tr/strings.xml
+++ b/core/src/main/res/values-tr/strings.xml
@@ -332,6 +332,12 @@
<string name="pref_smart_mark_as_played_disabled">Devre dışı</string>
<string name="pref_image_cache_size_title">Görüntü Önbelleği Boyutu</string>
<string name="pref_image_cache_size_sum">Görüntüler için diskte tutulacak önbelleğin boyutu.</string>
+ <string name="crash_report_title">Çökme Raporu</string>
+ <string name="crash_report_sum">En son çökme raporunu e-posta ile gönder</string>
+ <string name="send_email">E-posta gönder</string>
+ <string name="experimental_pref">Deneysel</string>
+ <string name="pref_sonic_title">Sonic ortam yürütücüsü</string>
+ <string name="pref_sonic_message">Prestissimo yerine sonic ortam yürütücüsünü kullan</string>
<!--Auto-Flattr dialog-->
<string name="auto_flattr_enable">Otomatik Flattr\'lamayı etkinleştir</string>
<string name="auto_flattr_after_percent">Bölümün yüzde %d kısmı oynatıldığında Flattr\'la</string>
@@ -346,6 +352,7 @@
<string name="found_in_title_label">Başlıkta bulundu</string>
<!--OPML import and export-->
<string name="opml_import_txtv_button_lable">OPML dosyaları cep yayınlarını bir cihazdan diğerine aktarmanıza yarar.</string>
+ <string name="opml_import_option">Seçenek %1$d</string>
<string name="opml_import_explanation_1">Yerel dosya sisteminden belirli bir yol seçin.</string>
<string name="opml_import_explanation_2">OPML dosyasını açmak için harici uygulamalardan Dropbox, Google Drive veya kendi favori dosya yöneticinizi kullanın.</string>
<string name="opml_import_explanation_3">Google Mail, Dropbox, Google Drive gibi birçok uygulama ve çoğu dosya yöneticisi OPML dosyalarını AntennaPod <i>ile</i> <i>açabilir.</i></string>
@@ -372,6 +379,9 @@
<string name="sleep_timer_label">Zamanlayıcı</string>
<string name="time_left_label">Kalan süre:\u0020</string>
<string name="time_dialog_invalid_input">Geçersiz giriş, zaman bir tam sayı olmalıdır</string>
+ <string name="timer_about_to_expire_label"><b>Zamanlayıcı süresi dolduğunda:</b></string>
+ <string name="shake_to_reset_label">Zamanyacıyı sıfırlamak için salla</string>
+ <string name="timer_vibration_label">Titret</string>
<string name="time_seconds">saniye</string>
<string name="time_minutes">dakika</string>
<string name="time_hours">saat</string>
@@ -419,11 +429,15 @@
<string name="selected_folder_label">Seçilen dizin:</string>
<string name="create_folder_label">Dizin yarat</string>
<string name="choose_data_directory">Veri dizinini seç</string>
+ <string name="choose_data_directory_message">Lütfen verileriniz için ana klasörü seçin. AntennaPod gerekli alt-klasörleri oluşturacaktır.</string>
<string name="create_folder_msg">\"%1$s\" isminde yeni dizin oluştur?</string>
<string name="create_folder_success">Yeni dizin yaratıldı</string>
<string name="create_folder_error_no_write_access">Bu dizine yazılamadı</string>
<string name="create_folder_error_already_exists">Dizin zaten var</string>
<string name="create_folder_error">Dizin yaratılamadı</string>
+ <string name="folder_does_not_exist_error">\"%1$s\" adlı klasör yok</string>
+ <string name="folder_not_readable_error">\"%1$s\" klasörü okunabilir değil</string>
+ <string name="folder_not_writable_error">\"%1$s\" klasörü yazılabilir değil</string>
<string name="folder_not_empty_dialog_title">Dizin boş değil</string>
<string name="folder_not_empty_dialog_msg">Seçtiğiniz dizin dolu. Medya indirmeleri ve diğer dosyalar doğrudan bu dizine yerleştirilecek. Devam edilsin mi?</string>
<string name="set_to_default_folder">Vaysayılan dizini seç</string>
@@ -484,4 +498,9 @@
<string name="sort_duration_short_long">Süre (Kısa \u2192 Uzun)</string>
<string name="sort_duration_long_short">Süre (Uzun \u2192 Kısa)</string>
<!--Rating dialog-->
+ <string name="rating_title">AntennaPod\'u beğendiniz mi?</string>
+ <string name="rating_message">Eğer AntennaPod\'a oy vermek için biraz zamanını ayırırsanız memnun oluruz.</string>
+ <string name="rating_never_label">Bir daha gösterme</string>
+ <string name="rating_later_label">Daha sonra hatırlat</string>
+ <string name="rating_now_label">Evet, şimdi yapalım!</string>
</resources>
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml
index de641f518..4e444c990 100644
--- a/core/src/main/res/values/attrs.xml
+++ b/core/src/main/res/values/attrs.xml
@@ -41,6 +41,7 @@
<attr name="ic_lock_open" format="reference"/>
<attr name="ic_lock_closed" format="reference"/>
<attr name="ic_filter" format="reference"/>
+ <attr name="progressBarTheme" format="reference"/>
<!-- Used in itemdescription -->
<attr name="non_transparent_background" format="reference"/>
diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml
index c46537b3e..aa57e3051 100644
--- a/core/src/main/res/values/dimens.xml
+++ b/core/src/main/res/values/dimens.xml
@@ -3,7 +3,7 @@
<dimen name="widget_margin">8dp</dimen>
<dimen name="thumbnail_length">70dp</dimen>
- <dimen name="external_player_height">70dp</dimen>
+ <dimen name="external_player_height">56dp</dimen>
<dimen name="enc_icons_size">20dp</dimen>
<dimen name="text_size_micro">12sp</dimen>
<dimen name="text_size_small">14sp</dimen>
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index b9ee70dbf..1f73fbba2 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -4,6 +4,7 @@
<style name="Theme.AntennaPod.Light" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/primary_light</item>
<item name="colorAccent">@color/holo_blue_light</item>
+ <item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Light</item>
<item name="attr/action_bar_icon_color">@color/grey600</item>
@@ -53,6 +54,7 @@
<style name="Theme.AntennaPod.Dark" parent="Theme.AppCompat">
<item name="colorAccent">@color/holo_blue_dark</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
+ <item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
<item name="attr/action_bar_icon_color">@color/white</item>
<item name="attr/action_about">@drawable/ic_info_white_24dp</item>g
@@ -101,6 +103,7 @@
<style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
+ <item name="progressBarTheme">@style/ProgressBarLight</item>
<item name="colorPrimary">@color/primary_light</item>
<item name="colorAccent">@color/holo_blue_light</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
@@ -151,6 +154,7 @@
<style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AppCompat.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
+ <item name="progressBarTheme">@style/ProgressBarDark</item>
<item name="colorAccent">@color/holo_blue_dark</item>
<item name="buttonStyle">@style/Widget.AntennaPod.Button</item>
<item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item>
@@ -253,4 +257,14 @@
</style>
+ <style name="ProgressBarLight">
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item>
+ </style>
+
+ <style name="ProgressBarDark">
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:progressDrawable">@drawable/progress_bar_horizontal_dark</item>
+ </style>
+
</resources>