diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-12-11 21:23:51 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-12-11 21:23:51 -0800 |
commit | ed2fafe67b27906923894b7422aedfe21a4868f6 (patch) | |
tree | f49bac197cbea06dedc09bf2be6f7a89baaebcae /src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java | |
parent | 629e0f03bbc1488d522e20aaefad1e50d0387e91 (diff) | |
download | dsub-ed2fafe67b27906923894b7422aedfe21a4868f6.tar.gz dsub-ed2fafe67b27906923894b7422aedfe21a4868f6.tar.bz2 dsub-ed2fafe67b27906923894b7422aedfe21a4868f6.zip |
#215 Remove deleted playlists/podcasts from sync list
Diffstat (limited to 'src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java')
-rw-r--r-- | src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java b/src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java index f9311390..b5d39d72 100644 --- a/src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java +++ b/src/github/daneren2005/dsub/service/sync/PodcastSyncAdapter.java @@ -30,6 +30,7 @@ import java.util.List; import github.daneren2005.dsub.domain.MusicDirectory;
import github.daneren2005.dsub.domain.PodcastEpisode;
import github.daneren2005.dsub.service.DownloadFile;
+import github.daneren2005.dsub.service.parser.SubsonicRESTException;
import github.daneren2005.dsub.util.SyncUtil;
import github.daneren2005.dsub.util.SyncUtil.SyncSet;
import github.daneren2005.dsub.util.FileUtil;
@@ -84,6 +85,11 @@ public class PodcastSyncAdapter extends SubsonicSyncAdapter { }
}
}
+ } catch(SubsonicRESTException e) {
+ if(e.getCode() == 70) {
+ SyncUtil.removeSyncedPodcast(context, id, instance);
+ Log.i(TAG, "Unsync deleted podcasts for " + id + " on " + Util.getServerName(context, instance));
+ }
} catch (Exception e) {
Log.w(TAG, "Failed to get podcasts for " + id + " on " + Util.getServerName(context, instance));
}
|