|
|
@ -254,12 +254,23 @@ class ChangeDetectionStore:
|
|
|
|
def scrub_watch(self, uuid):
|
|
|
|
def scrub_watch(self, uuid):
|
|
|
|
import pathlib
|
|
|
|
import pathlib
|
|
|
|
|
|
|
|
|
|
|
|
self.__data['watching'][uuid].update({'history': {}, 'last_checked': 0, 'last_changed': 0, 'previous_md5': False})
|
|
|
|
self.__data['watching'][uuid].update(
|
|
|
|
self.needs_write_urgent = True
|
|
|
|
{'last_checked': 0,
|
|
|
|
|
|
|
|
'last_changed': 0,
|
|
|
|
for item in pathlib.Path(self.datastore_path).rglob(uuid+"/*.txt"):
|
|
|
|
'last_viewed': 0,
|
|
|
|
|
|
|
|
'previous_md5': False,
|
|
|
|
|
|
|
|
'last_notification_error': False,
|
|
|
|
|
|
|
|
'last_error': False})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# JSON Data, Screenshots, Textfiles (history index and snapshots), HTML in the future etc
|
|
|
|
|
|
|
|
for item in pathlib.Path(os.path.join(self.datastore_path, uuid)).rglob("*.*"):
|
|
|
|
unlink(item)
|
|
|
|
unlink(item)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Force the attr to recalculate
|
|
|
|
|
|
|
|
bump = self.__data['watching'][uuid].history
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.needs_write_urgent = True
|
|
|
|
|
|
|
|
|
|
|
|
def add_watch(self, url, tag="", extras=None, write_to_disk_now=True):
|
|
|
|
def add_watch(self, url, tag="", extras=None, write_to_disk_now=True):
|
|
|
|
|
|
|
|
|
|
|
|
if extras is None:
|
|
|
|
if extras is None:
|
|
|
|