Merge branch 'SamWhited-delete-episode-update' into develop

This commit is contained in:
daniel oeh 2015-01-19 21:54:19 +01:00
commit efcbbfe2b9
3 changed files with 18 additions and 1 deletions

View File

@ -42,11 +42,17 @@
android:key="prefFollowQueue"
android:summary="@string/pref_followQueue_sum"
android:title="@string/pref_followQueue_title"/>
<CheckBoxPreference
android:defaultValue="false"
android:enabled="true"
android:key="prefAutoDelete"
android:summary="@string/pref_auto_delete_sum"
android:title="@string/pref_auto_delete_title"/>
<Preference
android:key="prefPlaybackSpeedLauncher"
android:summary="@string/pref_playback_speed_sum"
android:title="@string/pref_playback_speed_title" />
<CheckBoxPreference
android:defaultValue="false"
android:enabled="true"

View File

@ -553,6 +553,15 @@ public class PlaybackService extends Service {
if (isAutoFlattrable(media) && UserPreferences.getAutoFlattrPlayedDurationThreshold() == 1.0f) {
DBTasks.flattrItemIfLoggedIn(PlaybackService.this, item);
}
//Delete episode if enabled
if(UserPreferences.isAutoDelete()) {
DBWriter.deleteFeedMediaOfItem(PlaybackService.this, item.getMedia().getId());
if(BuildConfig.DEBUG)
Log.d(TAG, "Episode Deleted");
}
}
// Load next episode if previous episode was in the queue and if there

View File

@ -207,6 +207,8 @@
<string name="pref_pauseOnHeadsetDisconnect_sum">Pause playback when the headphones are disconnected</string>
<string name="pref_unpauseOnHeadsetReconnect_sum">Resume playback when the headphones are reconnected</string>
<string name="pref_followQueue_sum">Jump to next queue item when playback completes</string>
<string name="pref_auto_delete_sum">Delete episode when playback completes</string>
<string name="pref_auto_delete_title">Auto Delete</string>
<string name="playback_pref">Playback</string>
<string name="network_pref">Network</string>
<string name="pref_autoUpdateIntervall_title">Update interval</string>