mirror of
				https://github.com/dgtlmoon/changedetection.io.git
				synced 2025-10-30 22:27:52 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			better-mer
			...
			watch-can-
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 5382ba3b73 | ||
|   | 7b5729a4da | ||
|   | 7fbf4fe13b | 
| @@ -571,6 +571,8 @@ def changedetection_app(config=None, datastore_o=None): | ||||
|                                data=default, | ||||
|                                ) | ||||
|  | ||||
|         form.fetch_backend.choices.append(("system", 'System settings default')) | ||||
|  | ||||
|         # form.browser_steps[0] can be assumed that we 'goto url' first | ||||
|  | ||||
|         if datastore.proxy_list is None: | ||||
| @@ -599,10 +601,6 @@ def changedetection_app(config=None, datastore_o=None): | ||||
|                     using_default_check_time = False | ||||
|                     break | ||||
|  | ||||
|             # Use the default if it's the same as system-wide. | ||||
|             if form.fetch_backend.data == datastore.data['settings']['application']['fetch_backend']: | ||||
|                 extra_update_obj['fetch_backend'] = None | ||||
|  | ||||
|  | ||||
|  | ||||
|              # Ignore text | ||||
| @@ -652,8 +650,10 @@ def changedetection_app(config=None, datastore_o=None): | ||||
|  | ||||
|             watch = datastore.data['watching'].get(uuid) | ||||
|             system_uses_webdriver = datastore.data['settings']['application']['fetch_backend'] == 'html_webdriver' | ||||
|             is_html_webdriver = True if watch.get('fetch_backend') == 'html_webdriver' or ( | ||||
|                     watch.get('fetch_backend', None) is None and system_uses_webdriver) else False | ||||
|  | ||||
|             is_html_webdriver = False | ||||
|             if (watch.get('fetch_backend') == 'system' and system_uses_webdriver) or watch.get('fetch_backend') == 'html_requests': | ||||
|                 is_html_webdriver = True | ||||
|  | ||||
|             output = render_template("edit.html", | ||||
|                                      browser_steps_config=browser_step_ui_config, | ||||
|   | ||||
| @@ -92,9 +92,8 @@ class perform_site_check(): | ||||
|  | ||||
|         # Pluggable content fetcher | ||||
|         prefer_backend = watch.get_fetch_backend | ||||
|         # @todo move this to Watch model get_fetch_backend | ||||
|         if not prefer_backend: | ||||
|             prefer_backend =  self.datastore.data['settings']['application']['fetch_backend'] | ||||
|         if not prefer_backend or prefer_backend == 'system': | ||||
|             prefer_backend = self.datastore.data['settings']['application']['fetch_backend'] | ||||
|  | ||||
|         if hasattr(content_fetcher, prefer_backend): | ||||
|             klass = getattr(content_fetcher, prefer_backend) | ||||
|   | ||||
| @@ -138,7 +138,7 @@ class ValidateContentFetcherIsReady(object): | ||||
|         from changedetectionio import content_fetcher | ||||
|  | ||||
|         # Better would be a radiohandler that keeps a reference to each class | ||||
|         if field.data is not None: | ||||
|         if field.data is not None and field.data != 'system': | ||||
|             klass = getattr(content_fetcher, field.data) | ||||
|             some_object = klass() | ||||
|             try: | ||||
| @@ -345,6 +345,7 @@ class quickWatchForm(Form): | ||||
|     edit_and_watch_submit_button = SubmitField('Edit > Watch', render_kw={"class": "pure-button pure-button-primary"}) | ||||
|  | ||||
|  | ||||
|  | ||||
| # Common to a single watch and the global settings | ||||
| class commonSettingsForm(Form): | ||||
|     notification_urls = StringListField('Notification URL List', validators=[validators.Optional(), ValidateAppRiseServers()]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user