🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    changedetectionio/__init__.py
    skipped 777 lines
    778 778   @app.route("/api/clone", methods=['GET'])
    779 779   @login_required
    780 780   def api_clone():
    781  - 
    782 781   uuid = request.args.get('uuid')
    783  - datastore.clone(uuid)
     782 + new_uuid = datastore.clone(uuid)
     783 + update_q.put(new_uuid)
    784 784   flash('Cloned.')
    785 785   
    786 786   return redirect(url_for('index'))
    skipped 115 lines
    902 902   
    903 903   # Check for watches outside of the time threshold to put in the thread queue.
    904 904   for uuid, watch in copied_datastore.data['watching'].items():
    905  - 
    906 905   # If they supplied an individual entry minutes to threshold.
    907 906   if 'minutes_between_check' in watch and watch['minutes_between_check'] is not None:
    908 907   # Cast to int just incase
    skipped 18 lines
  • ■ ■ ■ ■ ■
    changedetectionio/store.py
    skipped 250 lines
    251 251   
    252 252   # Clone a watch by UUID
    253 253   def clone(self, uuid):
    254  - with self.lock:
    255  - new_uuid = str(uuid_builder.uuid4())
    256  - _clone = deepcopy(self.data['watching'][uuid])
    257  - _clone.update({'uuid': new_uuid})
    258  - 
    259  - attributes_to_reset = [
    260  - 'last_checked',
    261  - 'last_changed',
    262  - 'last_viewed',
    263  - 'newest_history_key',
    264  - 'previous_md5',
    265  - 'history'
    266  - ]
    267  - for attribute in attributes_to_reset:
    268  - _clone.update({attribute: self.generic_definition[attribute]})
    269  - 
    270  - self.data['watching'][new_uuid] = _clone
    271  - self.needs_write = True
     254 + url = self.data['watching'][uuid]['url']
     255 + tag = self.data['watching'][uuid]['tag']
     256 + new_uuid = self.add_watch(url=url, tag=tag)
     257 + return new_uuid
    272 258   
    273 259   def url_exists(self, url):
    274 260   
    skipped 137 lines
Please wait...
Page is in error, reload to recover