Added option to delete epidode upon completion of playback.

Conflicts:
	app/dslv
This commit is contained in:
Tim Butram 2014-08-26 21:18:00 -04:00 committed by Sam Whited
parent 9659c18d89
commit 2d68f025d7
2 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,12 @@
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="Delete epidsode when playback completes"
android:title="Delete On Finish"/>
<Preference
android:key="prefPlaybackSpeedLauncher"
android:summary="@string/pref_playback_speed_sum"

View File

@ -539,6 +539,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