Disabled update of rewritten URLs in gpodder.net sync service

Othwerwise, feeds might be synced twice
This commit is contained in:
daniel oeh 2014-05-24 16:36:39 +02:00
parent fb232bed3f
commit eb0f48d3c3
1 changed files with 1 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import android.content.Intent;
import android.os.IBinder; import android.os.IBinder;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.util.Log; import android.util.Log;
import de.danoeh.antennapod.AppConfig;
import de.danoeh.antennapod.BuildConfig; import de.danoeh.antennapod.BuildConfig;
import de.danoeh.antennapod.R; import de.danoeh.antennapod.R;
import de.danoeh.antennapod.feed.Feed; import de.danoeh.antennapod.feed.Feed;
@ -93,7 +94,6 @@ public class GpodnetSyncService extends Service {
GpodnetUploadChangesResponse uploadChangesResponse = GpodnetUploadChangesResponse uploadChangesResponse =
service.uploadChanges(GpodnetPreferences.getUsername(), GpodnetPreferences.getDeviceID(), localSubscriptions, new LinkedList<String>()); service.uploadChanges(GpodnetPreferences.getUsername(), GpodnetPreferences.getDeviceID(), localSubscriptions, new LinkedList<String>());
if (BuildConfig.DEBUG) Log.d(TAG, "Uploading changes response: " + uploadChangesResponse); if (BuildConfig.DEBUG) Log.d(TAG, "Uploading changes response: " + uploadChangesResponse);
DBWriter.updateFeedDownloadURLs(GpodnetSyncService.this, uploadChangesResponse.updatedUrls).get();
GpodnetPreferences.removeAddedFeeds(localSubscriptions); GpodnetPreferences.removeAddedFeeds(localSubscriptions);
GpodnetPreferences.removeRemovedFeeds(GpodnetPreferences.getRemovedFeedsCopy()); GpodnetPreferences.removeRemovedFeeds(GpodnetPreferences.getRemovedFeedsCopy());
GpodnetPreferences.setLastSyncTimestamp(uploadChangesResponse.timestamp); GpodnetPreferences.setLastSyncTimestamp(uploadChangesResponse.timestamp);
@ -114,7 +114,6 @@ public class GpodnetSyncService extends Service {
GpodnetPreferences.removeAddedFeeds(added); GpodnetPreferences.removeAddedFeeds(added);
GpodnetPreferences.removeRemovedFeeds(removed); GpodnetPreferences.removeRemovedFeeds(removed);
DBWriter.updateFeedDownloadURLs(GpodnetSyncService.this, uploadChangesResponse.updatedUrls).get();
GpodnetPreferences.setLastSyncTimestamp(uploadChangesResponse.timestamp); GpodnetPreferences.setLastSyncTimestamp(uploadChangesResponse.timestamp);
} }
clearErrorNotifications(); clearErrorNotifications();
@ -123,10 +122,6 @@ public class GpodnetSyncService extends Service {
updateErrorNotification(e); updateErrorNotification(e);
} catch (DownloadRequestException e) { } catch (DownloadRequestException e) {
e.printStackTrace(); e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} }
} }
stopSelf(); stopSelf();