Index: lib/synchronizer.js |
=================================================================== |
--- a/lib/synchronizer.js |
+++ b/lib/synchronizer.js |
@@ -195,21 +195,21 @@ |
if (downloadable.redirectURL && |
downloadable.redirectURL != downloadable.url) |
{ |
let oldSubscription = Subscription.fromURL(downloadable.url); |
subscription.title = oldSubscription.title; |
subscription.disabled = oldSubscription.disabled; |
subscription.lastCheck = oldSubscription.lastCheck; |
- let listed = (oldSubscription.url in FilterStorage.knownSubscriptions); |
+ let listed = FilterStorage.knownSubscriptions.has(oldSubscription.url); |
if (listed) |
FilterStorage.removeSubscription(oldSubscription); |
- delete Subscription.knownSubscriptions[oldSubscription.url]; |
+ Subscription.knownSubscriptions.delete(oldSubscription.url); |
if (listed) |
FilterStorage.addSubscription(subscription); |
} |
// The download actually succeeded |
subscription.lastSuccess = subscription.lastDownload = Math.round( |
Date.now() / MILLIS_IN_SECOND |
@@ -330,17 +330,17 @@ |
request.channel.loadFlags = request.channel.loadFlags | |
request.channel.INHIBIT_CACHING | |
request.channel.VALIDATE_ALWAYS; |
request.addEventListener("load", ev => |
{ |
if (onShutdown.done) |
return; |
- if (!(subscription.url in FilterStorage.knownSubscriptions)) |
+ if (!FilterStorage.knownSubscriptions.has(subscription.url)) |
return; |
let match = /^(\d+)(?:\s+(\S+))?$/.exec(request.responseText); |
if (match && match[1] == "301" && // Moved permanently |
match[2] && /^https?:\/\//i.test(match[2])) |
{ |
redirectCallback(match[2]); |
} |