28 @signal rulesChanged() emitted after the subscription's rules have changed |
29 @signal rulesChanged() emitted after the subscription's rules have changed |
29 """ |
30 """ |
30 changed = pyqtSignal() |
31 changed = pyqtSignal() |
31 rulesChanged = pyqtSignal() |
32 rulesChanged = pyqtSignal() |
32 |
33 |
33 def __init__(self, url, parent = None): |
34 def __init__(self, url, parent=None): |
34 """ |
35 """ |
35 Constructor |
36 Constructor |
36 |
37 |
37 @param url AdBlock URL for the subscription (QUrl) |
38 @param url AdBlock URL for the subscription (QUrl) |
38 @param parent reference to the parent object (QObject) |
39 @param parent reference to the parent object (QObject) |
94 queryItems.append(("location", bytes(self.__location).decode())) |
95 queryItems.append(("location", bytes(self.__location).decode())) |
95 queryItems.append(("title", self.__title)) |
96 queryItems.append(("title", self.__title)) |
96 if not self.__enabled: |
97 if not self.__enabled: |
97 queryItems.append(("enabled", "false")) |
98 queryItems.append(("enabled", "false")) |
98 if self.__lastUpdate.isValid(): |
99 if self.__lastUpdate.isValid(): |
99 queryItems.append(("lastUpdate", |
100 queryItems.append(("lastUpdate", |
100 self.__lastUpdate.toString(Qt.ISODate))) |
101 self.__lastUpdate.toString(Qt.ISODate))) |
101 url.setQueryItems(queryItems) |
102 url.setQueryItems(queryItems) |
102 return url |
103 return url |
103 |
104 |
104 def isEnabled(self): |
105 def isEnabled(self): |