MCPcopy Index your code

hub / github.com/Screenly/Anthias / functions

Functions1,832 in github.com/Screenly/Anthias

↓ 2 callersFunctionresolve_device_key
Return ``DEVICE_TYPE`` upgraded via the host_agent's published board subtype when applicable. Lowercased and whitespace-stripped for stable d
src/anthias_common/board.py:133
↓ 2 callersFunctionscheduleAutoplay
()
website/assets/js/slider.ts:201
↓ 2 callersFunctionselect_os_tranche
Bound the OS-update set for one run: an absolute --os-limit if given (>0), else ceil(percent% of the eligible population). Devices are already
bin/balena_unpin_devices.py:438
↓ 2 callersMethodset_asset
(self, uri: str, duration: int | str)
src/anthias_viewer/media_player.py:360
↓ 2 callersFunctionsetupActiveRowsDrag
()
src/anthias_server/app/static/src/home.ts:676
↓ 2 callersFunctionsh
(cmd: string[])
website/scripts/fetch-screenshots.ts:48
↓ 2 callersFunctionsnapshotProcessing
()
src/anthias_server/app/static/src/home.ts:516
↓ 2 callersMethodstat
(self)
tests/test_whitenoise_resilient.py:107
↓ 2 callersFunctionto_json
Render an Asset (or any model) as a JSON literal for Alpine.
src/anthias_server/app/templatetags/asset_filters.py:171
↓ 2 callersFunctionunblank_display
Handle the ``unblank`` command: power the display back on and resume.
src/anthias_viewer/__init__.py:474
↓ 2 callersMethodupdate
( self, request: Request, asset_id: str, partial: bool = False, )
src/anthias_server/api/views/v1_2.py:108
↓ 2 callersMethodupdate_files_dictionary
(self, root: str, prefix: str)
src/anthias_server/lib/whitenoise.py:40
↓ 2 callersFunctionvalidate_uri
(uri: str)
src/anthias_server/api/serializers/__init__.py:32
↓ 2 callersFunctionview_webpage
Display a webpage and arm its per-asset auto-refresh timer. ``reload_interval_s`` mirrors ``Asset.metadata['refresh_interval_s']``: 0 (the de
src/anthias_viewer/__init__.py:931
↓ 1 callersMethod__init__
(self, redis_connection: 'redis.Redis')
src/anthias_server/settings.py:205
↓ 1 callersFunction_as_gst_uri
Coerce an asset URI into one ``playbin`` accepts. Local assets store a bare absolute path (``settings['assetdir']/<asset_id>`` — see the API
src/anthias_viewer/media_player.py:473
↓ 1 callersFunction_asset_is_displayable
Decide whether to play an asset this rotation. The reachability of remote URLs is owned by the server (a celery beat task refreshes ``Asset.i
src/anthias_viewer/__init__.py:1292
↓ 1 callersFunction_asset_to_dict
(asset: Asset)
src/anthias_viewer/scheduling.py:30
↓ 1 callersFunction_atomic_write_conf
Atomically rewrite anthias.conf. Writes to a tempfile in the same directory (so ``os.replace`` is a cheap intra-filesystem rename) and then s
src/anthias_server/app/migrations/0005_migrate_basic_auth_to_user.py:108
↓ 1 callersFunction_build_drf_auth_classes
Build the DRF auth classes lazily. DRF reaches for ``rest_framework`` at import time, which fails on the viewer process (it doesn't load ``re
src/anthias_server/lib/auth.py:169
↓ 1 callersFunction_build_legacy_tarball
(tmp_home: str)
tests/test_backup_helper.py:210
↓ 1 callersFunction_build_payload
()
src/anthias_server/lib/telemetry.py:70
↓ 1 callersFunction_build_upload_filename
Reconstruct an operator-recognisable filename for a local asset. Anthias renames every uploaded file to ``<uuid4>.<ext>`` on disk — the origi
src/anthias_server/lib/screenly_migration.py:199
↓ 1 callersFunction_build_video_options
Build the per-file option dict sent over D-Bus to AnthiasViewer. Qt 6.5 dropped the upstream gstreamer media backend, so the runtime path is
src/anthias_viewer/media_player.py:307
↓ 1 callersFunction_build_webview_env
Compose the env to pass when spawning AnthiasViewer. Rotation is applied differently per platform plugin: * Wayland (x86 under cage): the co
src/anthias_viewer/__init__.py:174
↓ 1 callersFunction_check_username_available
Reject a username change that would collide with another row before the ``operator.save()`` call raises ``IntegrityError`` on the unique const
src/anthias_server/lib/auth.py:551
↓ 1 callersFunction_claim
(p: str | None)
src/anthias_server/celery_tasks.py:396
↓ 1 callersFunction_compute_deadline
Soonest future moment when the playlist might need re-evaluating. Past boundaries are dropped so a long-ago start_date on an asset that's cur
src/anthias_viewer/scheduling.py:79
↓ 1 callersFunction_compute_viewer_deadline
Soonest future moment when the playlist might need refetching. Mirrors ``anthias_viewer.scheduling._compute_deadline``: past boundaries are d
src/anthias_server/api/views/v2.py:759
↓ 1 callersFunction_conf_path
()
src/anthias_server/app/migrations/0005_migrate_basic_auth_to_user.py:58
↓ 1 callersFunction_consume_pending_rotation_bounce
Main-thread half of the linuxfb rotation handoff. Called from ``asset_loop`` at the top of each tick. If the subscriber set ``_rotation_bounc
src/anthias_viewer/__init__.py:1230
↓ 1 callersFunction_convert_image_to_webp
Open ``input_path`` with Pillow, save lossless WebP to ``output_path``. Mode handling: * Always convert to RGBA so transparency present
src/anthias_server/processing.py:518
↓ 1 callersFunction_create_initial_operator
First-time enable: no User row exists yet, so both username and password are required and the form's confirm field must match.
src/anthias_server/lib/auth.py:614
↓ 1 callersFunction_default_route_iface
Interface name carrying the default route, or None.
src/anthias_common/utils.py:356
↓ 1 callersFunction_detect_local_mac
Return the MAC of the interface carrying the default route. Picking the 'active' interface matches what an operator expects to see — the NIC
src/anthias_common/utils.py:389
↓ 1 callersFunction_drag_handle_to_row
Pointer-events drag of one row's grip handle onto the lower half of another row. The Anthias drag is implemented with raw pointerdown/pointerm
tests/test_app.py:173
↓ 1 callersFunction_drm_card_resolution
First active mode on a /sys/class/drm/<card-port> entry, or None.
src/anthias_common/utils.py:244
↓ 1 callersFunction_drm_resolution
Walk /sys/class/drm/ for the first connected output's mode.
src/anthias_common/utils.py:260
↓ 1 callersFunction_evaluate_viewer_playlist
Server-side equivalent of ``generate_asset_list()`` returning Asset rows (so ``AssetSerializerV2`` can serialise them) instead of plain dicts.
src/anthias_server/api/views/v2.py:729
↓ 1 callersFunction_exception_chain
Walk ``exc`` and everything it was raised from. Wrappers matter here: channels-redis and kombu re-raise the underlying ``redis.exceptions.Con
src/anthias_server/django_project/settings.py:78
↓ 1 callersFunction_fb_geometry
Read the *visible* framebuffer resolution + GStreamer format. Returns (width, height, gst_format). 16bpp → RGB16 (the Pi vc4 fbcon rgb565 def
src/anthias_viewer/media_player.py:419
↓ 1 callersFunction_fb_resolution
Plain framebuffer fallback (Pi 1-4 legacy KMS, some embedded).
src/anthias_common/utils.py:275
↓ 1 callersFunction_fetch_latest_release_tag
Return the latest release tag from GitHub, hitting the API at most once per ``LATEST_RELEASE_TTL`` and short-circuiting while a prior error ba
src/anthias_server/lib/github.py:70
↓ 1 callersFunction_ffprobe_streams
Return ffprobe's parsed JSON for ``input_path``. Uses ``-v error -show_format -show_streams -print_format json`` so we get a single document
src/anthias_server/processing.py:687
↓ 1 callersFunction_ffprobe_summary
Reduce ffprobe's payload to the dimensions we branch on. Returns a dict with these keys, all populated: * ``container`` — lowercase format
src/anthias_server/processing.py:710
↓ 1 callersFunction_first_non_loopback_mac
Fallback when no default route is published — scan ifaces.
src/anthias_common/utils.py:374
↓ 1 callersMethod_get
( self, config: configparser.ConfigParser, section: str, field: str, d
src/anthias_server/settings.py:95
↓ 1 callersFunction_get_asset
(client: APIClient, asset_id: str, version: str)
src/anthias_server/api/tests/test_assets.py:56
↓ 1 callersFunction_get_asset_content_url
(asset_id: str)
src/anthias_server/api/tests/test_v1_endpoints.py:37
↓ 1 callersFunction_get_asset_counts
()
src/anthias_server/lib/telemetry.py:52
↓ 1 callersFunction_get_assets
(client: APIClient, version: str)
src/anthias_server/api/tests/test_assets.py:26
↓ 1 callersFunction_get_device_id
()
src/anthias_server/lib/telemetry.py:35
↓ 1 callersFunction_handle_reload
Process a ``reload`` message from the server. Reloads settings (so a settings.patch() change takes effect immediately), re-applies the screen
src/anthias_viewer/__init__.py:1063
↓ 1 callersFunction_head_probe
Issue an HTTP HEAD against *uri* to classify its content. Returns ``(True, ext)`` when the response advertises a downloadable video and ``(Fa
src/anthias_common/remote_video.py:124
↓ 1 callersFunction_hw_decoded_codecs
Codecs the *current* board can hardware-decode through mpv. Resolves ``DEVICE_TYPE`` via ``anthias_common.board.resolve_device_key`` so a Roc
src/anthias_server/processing.py:928
↓ 1 callersFunction_install_dbus_stubs
Insert stand-in modules so ``import pydbus`` (and its transitive ``from gi.repository import Gio, GLib, GObject``) succeeds on hosts that
tests/conftest.py:62
↓ 1 callersFunction_internal_auth_secret
(settings: Mapping[str, Any])
src/anthias_common/internal_auth.py:14
↓ 1 callersFunction_is_django_password_hash
True iff Django can parse ``value`` as one of its registered password-hasher outputs. The previous heuristic was ``'$' in value and not legac
src/anthias_server/app/migrations/0005_migrate_basic_auth_to_user.py:36
↓ 1 callersFunction_is_legacy_sha256
(stored: str)
src/anthias_server/lib/auth.py:114
↓ 1 callersFunction_is_safe_login_next_source
Decide whether a request's path is worth round-tripping through the login form's ``?next=`` parameter. Two classes of request must NOT propag
src/anthias_server/lib/auth.py:323
↓ 1 callersFunction_json_raises_response
(status_code: int, text: str = '')
src/anthias_server/api/tests/test_screenly_migration.py:58
↓ 1 callersFunction_last_play_uri
(bus: Any)
tests/test_media_player.py:88
↓ 1 callersMethod_local_asset
(self, tmp_path: Path)
src/anthias_server/api/tests/test_screenly_migration.py:290
↓ 1 callersFunction_log_arm64_alsa_default_once
Log the kernel's ALSA card listing so silent-HDMI reports are debuggable from journalctl alone. Reads /proc/asound/cards (always present when
src/anthias_viewer/media_player.py:192
↓ 1 callersFunction_login_redirect
Send an unauthenticated request to the login page, preserving the original destination via ``?next=`` when it's safe to do so.
src/anthias_server/lib/auth.py:349
↓ 1 callersFunction_lpop
(key: str)
tests/conftest.py:176
↓ 1 callersFunction_marshal_dbus_options
Wrap each value as a ``GLib.Variant`` for pydbus. AnthiasViewer's ``playVideo`` slot is declared with ``QVariantMap`` (Qt's ``a{sv}`` D-Bus s
src/anthias_viewer/media_player.py:279
↓ 1 callersMethod_matches_play_window
Day-of-week and time-of-day filter, evaluated in local time. Overnight windows (play_time_from > play_time_to) wrap past midnight; pl
src/anthias_server/app/models.py:137
↓ 1 callersFunction_maybe_reapply_dark_mode
Respawn the webview when the operator toggled "Prefer dark mode". The preference is realised by the C++ webview reading the ANTHIAS_PREFER_DA
src/anthias_viewer/__init__.py:1164
↓ 1 callersFunction_maybe_reapply_rotation
Re-apply ``screen_rotation`` when the operator changed it in the UI. Two distinct paths because the rotation primitive is platform- specific
src/anthias_viewer/__init__.py:1077
↓ 1 callersFunction_migrations_ready
True when the shared SQLite schema is fully migrated. Computes the same unapplied-migration plan ``manage.py migrate --check`` does. A databa
src/anthias_server/celery_tasks.py:214
↓ 1 callersFunction_mock_migrate_per_asset
Map each asset_id to a canned migrate response. ``outcomes`` is keyed by asset_id and each value is the JSON body the backend would have retu
tests/test_migrate_to_screenly.py:121
↓ 1 callersFunction_mock_validate_invalid
Token validation that says "Screenly rejected this token.".
tests/test_migrate_to_screenly.py:87
↓ 1 callersFunction_open_local_upload
Open a local asset file for multipart upload. Returns ``(files_dict, file_handle)`` ready to pass into ``requests.post(..., files=...)``, or
src/anthias_server/lib/screenly_migration.py:226
↓ 1 callersFunction_operator_user
The User row whose credentials gate this device. When auth is currently enabled the calling view is gated by ``@authorized``, so ``request.us
src/anthias_server/lib/auth.py:464
↓ 1 callersFunction_parse_processing_started_at
Best-effort ISO-8601 parser for ``metadata.processing_started_at``. Returns a tz-aware ``datetime`` on success, ``None`` on any failure. Anth
src/anthias_server/celery_tasks.py:1268
↓ 1 callersFunction_parse_upload_response
Best-effort parse of Screenly's per-asset create response. Screenly's create endpoint returns a single-row array under ``Prefer: return=repre
src/anthias_server/lib/screenly_migration.py:261
↓ 1 callersFunction_patch_connect_to_redis
()
tests/conftest.py:211
↓ 1 callersFunction_promote_user
Idempotent upsert of the operator User row from the conf hash.
src/anthias_server/app/migrations/0005_migrate_basic_auth_to_user.py:91
↓ 1 callersFunction_publish_display_resolution_loop
Background reporter — write the active display resolution to Redis on a 1-minute cadence with a 3-minute TTL. The TTL serves as a liveness si
src/anthias_viewer/__init__.py:1577
↓ 1 callersFunction_publish_display_resolution_once
One reporter tick — detect the resolution and write it to Redis. Never raises: the reporter thread must survive any single failed tick and tr
src/anthias_viewer/__init__.py:1547
↓ 1 callersFunction_read_auth_state
Return ``(config, auth_backend, username, password_hash)`` extracted from anthias.conf, or ``None`` if the file can't be parsed.
src/anthias_server/app/migrations/0005_migrate_basic_auth_to_user.py:73
↓ 1 callersFunction_read_cpu_brand
First 'model name' line from /proc/cpuinfo, normalised. Drops marketing crud ((R), (TM)), the trailing 'CPU' token that the kernel parrots fr
src/anthias_common/device_helper.py:34
↓ 1 callersFunction_read_version_from_pyproject
Last-ditch source for the project version when the package isn't installed in the active venv. Walks up from this file to find the repo-root p
src/anthias_common/version.py:51
↓ 1 callersFunction_resolve_local_path
Return a safe absolute path under ANTHIAS_ASSETS_ROOT, or None. Returns None for non-local URIs (http://, https://, youtube://, …). Uses the
src/anthias_server/lib/screenly_migration.py:182
↓ 1 callersFunction_resolve_node_ip
Non-blocking IP-string resolver for the splash polling endpoint. ``anthias_common.utils.get_node_ip()`` is the right primitive for one-shot s
src/anthias_server/api/views/v2.py:118
↓ 1 callersFunction_resolved_resolution
Active display resolution (reported by the viewer) with a fallback to the operator-configured value from settings. The viewer publishes 'view
src/anthias_server/app/page_context.py:41
↓ 1 callersFunction_retry_wayland_rotation_if_pending
Main-thread retry for an unsuccessful Wayland rotation apply. load_browser() at viewer startup tries to push the wlr-randr transform before A
src/anthias_viewer/__init__.py:1203
↓ 1 callersFunction_safe_ip_addresses
Fast-path resolver+formatter for the splash polling endpoint.
src/anthias_server/api/views/v2.py:278
↓ 1 callersFunction_safe_tar_member
Validate a TarInfo for safe extraction under dest_root. Reject: - absolute paths (drive-letter or starts-with-/) - any '..' path comp
src/anthias_server/lib/backup_helper.py:22
↓ 1 callersFunction_schedule_window_phrase
Pick the {kind, primary} pair for a populated start/end window. Split off from schedule_window() so the latter stays under the SonarCloud cog
src/anthias_server/app/templatetags/asset_filters.py:257
↓ 1 callersFunction_screen_rotation
Cardinal angle the operator selected on the Settings page. Thin wrapper around the shared clamp_screen_rotation() helper so both the viewer's
src/anthias_viewer/media_player.py:72
↓ 1 callersMethod_set
( self, config: configparser.ConfigParser, section: str, field: str, d
src/anthias_server/settings.py:122
↓ 1 callersFunction_set_mtime
(file_path: str, age_seconds: int)
tests/test_celery_tasks.py:31
↓ 1 callersFunction_set_qpa_rotation
Return ``qpa`` with its ``rotation=`` option set to ``rotation`` (or removed entirely when ``rotation`` is 0). The Qt QPA syntax is ``<plugin
src/anthias_viewer/__init__.py:146
↓ 1 callersFunction_set_toast_header
Attach an HX-Trigger header so the global Alpine store (registered in vendor.ts) renders a toast for this response.
src/anthias_server/app/views.py:1213
↓ 1 callersFunction_should_log_basic_auth_use
Per-(user, IP, path) throttle on the deprecation log line. Returns True the first time a particular tuple is seen (or after the TTL expires)
src/anthias_server/lib/auth.py:149
↓ 1 callersFunction_skip_if_current_asset_inactive
Cut short the current rotation if the displayed asset is gone. Issue #2430: deleting or deactivating an asset that's currently on screen woul
src/anthias_viewer/__init__.py:1258
↓ 1 callersFunction_spawn_webview_once
Spawn AnthiasViewer once and block until it registers on D-Bus. Returns the live ``sh`` background command on success. Raises ``WebviewBinary
src/anthias_viewer/__init__.py:655
↓ 1 callersFunction_stream_remote_video_to_file
Fetch *uri* with the module-level session and stream it to *staging*, enforcing the size cap and validating the response headers. Raises ``Rem
src/anthias_server/celery_tasks.py:945
← previousnext →301–400 of 1,832, ranked by callers