mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-01-17 04:30:22 +00:00
Compare commits
6 Commits
python-314
...
empty-watc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bf41a29f8 | ||
|
|
2abc8aa9b4 | ||
|
|
69b70a2a07 | ||
|
|
0c42bcb8d6 | ||
|
|
091c708a28 | ||
|
|
084be9c990 |
11
.github/workflows/test-only.yml
vendored
11
.github/workflows/test-only.yml
vendored
@@ -52,13 +52,4 @@ jobs:
|
||||
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
||||
with:
|
||||
python-version: '3.13'
|
||||
skip-pypuppeteer: true
|
||||
|
||||
|
||||
test-application-3-14:
|
||||
#if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
needs: lint-code
|
||||
uses: ./.github/workflows/test-stack-reusable-workflow.yml
|
||||
with:
|
||||
python-version: '3.14'
|
||||
skip-pypuppeteer: false
|
||||
skip-pypuppeteer: true
|
||||
@@ -52,7 +52,13 @@ def construct_blueprint(datastore: ChangeDetectionStore, update_q, queuedWatchMe
|
||||
redirect(url_for('ui_edit.edit_page', uuid=uuid))
|
||||
|
||||
# be sure we update with a copy instead of accidently editing the live object by reference
|
||||
default = deepcopy(datastore.data['watching'][uuid])
|
||||
default = None
|
||||
while not default:
|
||||
try:
|
||||
default = deepcopy(datastore.data['watching'][uuid])
|
||||
except RuntimeError as e:
|
||||
# Dictionary changed
|
||||
continue
|
||||
|
||||
# Defaults for proxy choice
|
||||
if datastore.proxy_list is not None: # When enabled
|
||||
|
||||
@@ -159,7 +159,7 @@ html[data-darkmode="true"] .watch-tag-list.tag-{{ class_name }} {
|
||||
<tbody>
|
||||
{%- if not watches|length -%}
|
||||
<tr>
|
||||
<td colspan="{{ cols_required }}" style="text-wrap: wrap;">{{ _('No website watches configured, please add a URL in the box above, or') }} <a href="{{ url_for('imports.import_page')}}" >{{ _('import a list') }}</a>.</td>
|
||||
<td colspan="{{ cols_required }}" style="text-wrap: wrap;">{{ _('No web page change detection watches configured, please add a URL in the box above, or') }} <a href="{{ url_for('imports.import_page')}}" >{{ _('import a list') }}</a>.</td>
|
||||
</tr>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
@@ -157,7 +157,17 @@ class fetcher(Fetcher):
|
||||
import io
|
||||
img = Image.open(io.BytesIO(screenshot_png))
|
||||
# Convert to RGB if needed (JPEG doesn't support transparency)
|
||||
if img.mode != 'RGB':
|
||||
# Always convert non-RGB modes to RGB to ensure JPEG compatibility
|
||||
if img.mode in ('RGBA', 'LA', 'P', 'PA'):
|
||||
# Handle transparency by compositing onto white background
|
||||
if img.mode == 'P':
|
||||
img = img.convert('RGBA')
|
||||
background = Image.new('RGB', img.size, (255, 255, 255))
|
||||
if img.mode in ('RGBA', 'LA', 'PA'):
|
||||
background.paste(img, mask=img.split()[-1]) # Use alpha channel as mask
|
||||
img = background
|
||||
elif img.mode != 'RGB':
|
||||
# For other modes, direct conversion
|
||||
img = img.convert('RGB')
|
||||
jpeg_buffer = io.BytesIO()
|
||||
img.save(jpeg_buffer, format='JPEG', quality=int(os.getenv("SCREENSHOT_QUALITY", 72)))
|
||||
|
||||
@@ -125,6 +125,11 @@ $grid-gap: 0.5rem;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
// Empty state message - span full width on mobile
|
||||
> td[colspan] {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
> td.title-col {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
|
||||
@@ -33,6 +33,31 @@
|
||||
@use "parts/login_form";
|
||||
@use "parts/tabs";
|
||||
|
||||
// Smooth transitions for theme switching
|
||||
body,
|
||||
.pure-table,
|
||||
.pure-table thead,
|
||||
.pure-table td,
|
||||
.pure-table th,
|
||||
.pure-form input,
|
||||
.pure-form textarea,
|
||||
.pure-form select,
|
||||
.edit-form .inner,
|
||||
.pure-menu-horizontal,
|
||||
footer,
|
||||
.sticky-tab,
|
||||
#diff-jump,
|
||||
.button-tag,
|
||||
#new-watch-form,
|
||||
#new-watch-form input:not(.pure-button),
|
||||
code,
|
||||
.messages li,
|
||||
#checkbox-operations,
|
||||
.inline-warning,
|
||||
a,
|
||||
.watch-controls img {
|
||||
transition: color 0.4s ease, background-color 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--color-text);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,6 @@
|
||||
import psutil
|
||||
import time
|
||||
from threading import Thread
|
||||
import multiprocessing
|
||||
|
||||
import pytest
|
||||
import arrow
|
||||
@@ -98,34 +97,6 @@ def cleanup(datastore_path):
|
||||
if os.path.isfile(f):
|
||||
os.unlink(f)
|
||||
|
||||
def pytest_configure(config):
|
||||
"""Configure pytest environment before tests run.
|
||||
|
||||
CRITICAL: Set multiprocessing start method to 'fork' for Python 3.14+ compatibility.
|
||||
|
||||
Python 3.14 changed the default start method from 'fork' to 'forkserver' on Linux.
|
||||
The forkserver method requires all objects to be picklable, but pytest-flask's
|
||||
LiveServer uses nested functions that can't be pickled.
|
||||
|
||||
Setting 'fork' explicitly:
|
||||
- Maintains compatibility with Python 3.10-3.13 (where 'fork' was already default)
|
||||
- Fixes Python 3.14 pickling errors
|
||||
- Only affects Unix-like systems (Windows uses 'spawn' regardless)
|
||||
|
||||
See: https://github.com/python/cpython/issues/126831
|
||||
See: https://docs.python.org/3/whatsnew/3.14.html
|
||||
"""
|
||||
# Only set if not already set (respects existing configuration)
|
||||
if multiprocessing.get_start_method(allow_none=True) is None:
|
||||
try:
|
||||
# 'fork' is available on Unix-like systems (Linux, macOS)
|
||||
# On Windows, this will have no effect as 'spawn' is the only option
|
||||
multiprocessing.set_start_method('fork', force=False)
|
||||
logger.debug("Set multiprocessing start method to 'fork' for Python 3.14+ compatibility")
|
||||
except (ValueError, RuntimeError):
|
||||
# Already set, not available on this platform, or context already created
|
||||
pass
|
||||
|
||||
def pytest_addoption(parser):
|
||||
"""Add custom command-line options for pytest.
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def run_filter_test(client, live_server, content_filter, app_notification_format
|
||||
uuid = client.application.config.get('DATASTORE').add_watch(url=test_url)
|
||||
res = client.get(url_for("watchlist.index"))
|
||||
|
||||
assert b'No website watches configured' not in res.data
|
||||
assert b'No web page change detection watches configured' not in res.data
|
||||
|
||||
|
||||
client.get(url_for("ui.form_watch_checknow"), follow_redirects=True)
|
||||
|
||||
Binary file not shown.
@@ -2008,7 +2008,7 @@ msgid "Changed"
|
||||
msgstr "Změněno"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
"Nejsou nakonfigurována žádná sledování webových stránek, do výše "
|
||||
"uvedeného pole přidejte adresu URL nebo"
|
||||
|
||||
Binary file not shown.
@@ -2044,7 +2044,7 @@ msgid "Changed"
|
||||
msgstr "Geändert"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
"Es sind keine Website-Überwachungen konfiguriert. Bitte fügen Sie im Feld"
|
||||
" oben eine URL hinzu, oder"
|
||||
@@ -2229,7 +2229,7 @@ msgstr "Über dem Preis, um eine Benachrichtigung auszulösen"
|
||||
#: changedetectionio/processors/restock_diff/forms.py:25
|
||||
#, python-format
|
||||
msgid "Threshold in %% for price changes since the original price"
|
||||
msgstr "Schwellenwert in % für Preisänderungen seit dem ursprünglichen Preis"
|
||||
msgstr "Schwellenwert in %% für Preisänderungen seit dem ursprünglichen Preis"
|
||||
|
||||
#: changedetectionio/processors/restock_diff/forms.py:28
|
||||
msgid "Should be between 0 and 100"
|
||||
|
||||
@@ -1989,7 +1989,7 @@ msgid "Changed"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
@@ -1989,7 +1989,7 @@ msgid "Changed"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
Binary file not shown.
@@ -2051,7 +2051,7 @@ msgid "Changed"
|
||||
msgstr "Modifié"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
"Aucune surveillance de site Web configurée, veuillez ajouter une URL dans"
|
||||
" la case ci-dessus, ou"
|
||||
|
||||
Binary file not shown.
@@ -2020,7 +2020,7 @@ msgid "Changed"
|
||||
msgstr "Modifica"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr "Nessun monitoraggio configurato, aggiungi un URL nella casella sopra, oppure"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
Binary file not shown.
@@ -2036,7 +2036,7 @@ msgid "Changed"
|
||||
msgstr "변경됨"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr "구성된 웹사이트 시계가 없습니다. 위 상자에 URL을 추가하세요. 또는"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
@@ -1988,7 +1988,7 @@ msgid "Changed"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@ msgstr ""
|
||||
"Project-Id-Version: PROJECT VERSION\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2026-01-03 14:31+0100\n"
|
||||
"PO-Revision-Date: 2026-01-16 06:40+0800\n"
|
||||
"PO-Revision-Date: 2026-01-16 17:40+0800\n"
|
||||
"Last-Translator: 吾爱分享 <admin@wuaishare.cn>\n"
|
||||
"Language-Team: zh <LL@li.org>\n"
|
||||
"Language: zh\n"
|
||||
@@ -218,7 +218,7 @@ msgstr "应为 1 秒或以上"
|
||||
|
||||
#: changedetectionio/forms.py:767
|
||||
msgid "URLs"
|
||||
msgstr "URL"
|
||||
msgstr "URL 列表"
|
||||
|
||||
#: changedetectionio/forms.py:768
|
||||
msgid "Upload .xlsx file"
|
||||
@@ -521,7 +521,7 @@ msgstr "移除密码"
|
||||
|
||||
#: changedetectionio/forms.py:1021
|
||||
msgid "Render anchor tag content"
|
||||
msgstr "渲染 a 标签内容"
|
||||
msgstr "渲染 <a> 标签内容"
|
||||
|
||||
#: changedetectionio/forms.py:1022
|
||||
msgid "Allow anonymous access to watch history page when password is enabled"
|
||||
@@ -1243,7 +1243,7 @@ msgstr "确认文本"
|
||||
|
||||
#: changedetectionio/blueprint/ui/templates/clear_all_history.html:27
|
||||
msgid "Type in the word"
|
||||
msgstr "请输入"
|
||||
msgstr "请输入单词"
|
||||
|
||||
#: changedetectionio/blueprint/ui/templates/clear_all_history.html:27
|
||||
msgid "clear"
|
||||
@@ -1745,7 +1745,7 @@ msgstr ""
|
||||
|
||||
#: changedetectionio/blueprint/ui/templates/edit.html:386
|
||||
msgid "tab. Use"
|
||||
msgstr "使用"
|
||||
msgstr "选项卡中。使用"
|
||||
|
||||
#: changedetectionio/blueprint/ui/templates/edit.html:386
|
||||
msgid "Shift+Click"
|
||||
@@ -1987,7 +1987,7 @@ msgid "Changed"
|
||||
msgstr "变更"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr "尚未配置网站监控项,请在上方输入 URL 或"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
Binary file not shown.
@@ -1992,7 +1992,7 @@ msgid "Changed"
|
||||
msgstr "變更"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
msgid "No website watches configured, please add a URL in the box above, or"
|
||||
msgid "No web page change detection watches configured, please add a URL in the box above, or"
|
||||
msgstr "未設定網站監測任務,請在上方欄位新增 URL,或"
|
||||
|
||||
#: changedetectionio/blueprint/watchlist/templates/watch-overview.html:130
|
||||
|
||||
Reference in New Issue
Block a user