Don't update redirect url if it is the same as the original (#6661)

This commit is contained in:
ByteHamster 2023-09-27 21:54:50 +02:00 committed by GitHub
parent 574ec1434c
commit 7229cb40e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -176,7 +176,8 @@ public class FeedUpdateWorker extends Worker {
newEpisodesNotification.showIfNeeded(getApplicationContext(), feedSyncTask.getSavedFeed());
if (downloader.permanentRedirectUrl != null) {
DBWriter.updateFeedDownloadURL(request.getSource(), downloader.permanentRedirectUrl);
} else if (feedSyncTask.getRedirectUrl() != null) {
} else if (feedSyncTask.getRedirectUrl() != null
&& !feedSyncTask.getRedirectUrl().equals(request.getSource())) {
DBWriter.updateFeedDownloadURL(request.getSource(), feedSyncTask.getRedirectUrl());
}
}

View File

@ -281,7 +281,7 @@ public final class DBTasks {
if (oldItem != null) {
oldItem.updateFromOther(item);
} else {
// item is new
Log.d(TAG, "Found new item: " + item.getTitle());
item.setFeed(savedFeed);
if (idx >= savedFeed.getItems().size()) {