mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-07 05:54:18 +01:00
Add setting whether or not to enqueue downloaded episodes
This commit is contained in:
parent
1a58d6f2a8
commit
c54878a0f5
@ -161,6 +161,12 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/network_pref">
|
||||
<de.danoeh.antennapod.preferences.SwitchCompatPreference
|
||||
android:defaultValue="true"
|
||||
android:enabled="true"
|
||||
android:key="prefEnqueueDownloaded"
|
||||
android:summary="@string/pref_enqueue_downloaded_summary"
|
||||
android:title="@string/pref_enqueue_downloaded_title" />
|
||||
<Preference
|
||||
android:key="prefAutoUpdateIntervall"
|
||||
android:summary="@string/pref_autoUpdateIntervallOrTime_sum"
|
||||
|
@ -74,6 +74,7 @@ public class UserPreferences {
|
||||
public static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall";
|
||||
|
||||
// Network
|
||||
public static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded";
|
||||
public static final String PREF_UPDATE_INTERVAL = "prefAutoUpdateIntervall";
|
||||
public static final String PREF_MOBILE_UPDATE = "prefMobileUpdate";
|
||||
public static final String PREF_EPISODE_CLEANUP = "prefEpisodeCleanup";
|
||||
@ -258,11 +259,10 @@ public class UserPreferences {
|
||||
return prefs.getBoolean(PREF_SHOW_DOWNLOAD_REPORT, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if new queue elements are added to the front
|
||||
*
|
||||
* @return {@code true} if new queue elements are added to the front; {@code false} otherwise
|
||||
*/
|
||||
public static boolean enqueueDownloadedEpisodes() {
|
||||
return prefs.getBoolean(PREF_ENQUEUE_DOWNLOADED, true);
|
||||
}
|
||||
|
||||
public static boolean enqueueAtFront() {
|
||||
return prefs.getBoolean(PREF_QUEUE_ADD_TO_FRONT, false);
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import android.util.Log;
|
||||
import android.webkit.URLUtil;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.shredzone.flattr4j.model.User;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import java.io.File;
|
||||
@ -1048,7 +1049,8 @@ public class DownloadService extends Service {
|
||||
|
||||
DBWriter.setFeedMedia(media).get();
|
||||
|
||||
if (item != null && !DBTasks.isInQueue(DownloadService.this, item.getId())) {
|
||||
if (item != null && UserPreferences.enqueueDownloadedEpisodes() &&
|
||||
!DBTasks.isInQueue(DownloadService.this, item.getId())) {
|
||||
DBWriter.addQueueItem(DownloadService.this, item).get();
|
||||
}
|
||||
} catch (ExecutionException | InterruptedException e) {
|
||||
|
@ -421,6 +421,8 @@
|
||||
<string name="pref_cast_title">Chromecast support</string>
|
||||
<string name="pref_cast_message_play_flavor">Enable support for remote media playback on Cast devices (such as Chromecast, Audio Speakers or Android TV)</string>
|
||||
<string name="pref_cast_message_free_flavor">Chromecast requires third party proprietary libraries that are disabled in this version of AntennaPod</string>
|
||||
<string name="pref_enqueue_downloaded_title">Enqueue Dowloaded</string>
|
||||
<string name="pref_enqueue_downloaded_summary">Add downloaded episodes to the queue</string>
|
||||
|
||||
<!-- Auto-Flattr dialog -->
|
||||
<string name="auto_flattr_enable">Enable automatic flattring</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user