MCPcopy Index your code

hub / github.com/Screenly/Anthias / functions

Functions1,832 in github.com/Screenly/Anthias

↓ 442 callersMethodget
(self, request: Request)
src/anthias_server/api/views/v2.py:977
↓ 377 callersMethodpatch
(self, request: Request, asset_id: str)
src/anthias_server/api/views/v2.py:467
↓ 122 callersMethodpost
(self, request: Request)
src/anthias_server/api/views/v2.py:358
↓ 81 callersFunctionopen
()
src/anthias_server/app/static/src/vendor.ts:102
↓ 46 callersFunctiongetenv
(k: str, default: Any = None)
tests/test_settings.py:88
↓ 45 callersMethodupdate
( self, request: Request, asset_id: str, partial: bool = False, )
src/anthias_server/api/views/v2.py:439
↓ 40 callersMethodstop
(self)
src/anthias_viewer/media_player.py:272
↓ 34 callersFunction_asset_table_response
Shared response helper for all write endpoints. HTMX requests (hx-post) get the swapped partial; plain form submits fall back to a redirect s
src/anthias_server/app/views.py:1174
↓ 31 callersMethodget_instance
(cls)
src/anthias_server/settings.py:226
↓ 27 callersFunction_make_processing_asset
Persist a row in the state the upload path leaves behind: ``is_processing=True``, mimetype set, uri pointing at the upload file. The normalisa
tests/test_processing.py:105
↓ 21 callersFunction_aware
( year: int, month: int, day: int, hour: int, minute: int = 0 )
tests/test_scheduler.py:258
↓ 21 callersFunctionapply_auth_settings
Validate and persist auth-related settings changes. Raises ``AuthSettingsError`` with an operator-friendly message when the input is rejected
src/anthias_server/lib/auth.py:650
↓ 20 callersFunction_wait_alpine
Poll an Alpine-derived expression until it deep-equals ``expected``. Used for assertions like "modal opened" — the modal DOM is mounted via ``
tests/test_app.py:119
↓ 20 callersMethodsend_to_viewer
(self, msg: str)
src/anthias_server/settings.py:189
↓ 19 callersMethodis_active
(self, now: datetime | None = None)
src/anthias_server/app/models.py:128
↓ 18 callersFunction_request_with_user
Build a RequestFactory request and attach the given user (or a MagicMock proxy for AnonymousUser).
tests/test_auth.py:264
↓ 18 callersFunction_wait_db
Poll a Django ORM predicate until truthy. Playwright's locator auto-waits don't help here — the assertion is on DB state written by uvicorn af
tests/test_app.py:155
↓ 18 callersMethodsave
(self)
src/anthias_server/settings.py:151
↓ 17 callersFunction_scheduled_asset
Asset payload with date range covering the test reference era (so time_machine.travel into 2026 doesn't fall outside it).
tests/test_scheduler.py:267
↓ 17 callersMethoddelete
(self, request: Request, asset_id: str)
src/anthias_server/api/views/mixins.py:45
↓ 16 callersFunction_bulk_ids_csv
(assets: list[Asset])
tests/test_template_views.py:1077
↓ 16 callersMethodplay
(self)
src/anthias_viewer/media_player.py:269
↓ 15 callersFunction_make_operator
Centralised superuser factory. All scattered ``User.objects.create_superuser(..., password=...)`` call sites in the tests below come through
tests/test_auth.py:273
↓ 15 callersMethodload
Loads the latest settings from anthias.conf into memory.
src/anthias_server/settings.py:136
↓ 15 callersMethodsave
(self, *_: object, **__: object)
tests/test_processing.py:379
↓ 14 callersFunction_fake_response
Build a stand-in for ``requests.Response`` with the surface our code touches: ``status_code``, ``ok``, ``json()``, ``text``, ``raise_for_statu
src/anthias_server/api/tests/test_screenly_migration.py:36
↓ 14 callersFunctionconnect_to_redis
()
src/anthias_common/utils.py:659
↓ 13 callersFunction_make_revalidation_asset
( asset_id: str = 'a1', *, uri: str = 'https://example.com/x.png', is_enabled: bool = True,
tests/test_celery_tasks.py:268
↓ 13 callersFunctiondownload_youtube_asset
Download a YouTube video out of band and finalize the row. Replaces the previous ``YoutubeDownloadThread`` (a daemon thread in the anthias-se
src/anthias_server/celery_tasks.py:625
↓ 13 callersFunctionis_downloadable_remote_video
Classify *uri* as auto-downloadable single-file video or not. Returns ``(True, ext)`` when the serializer should rewrite the asset to a local
src/anthias_common/remote_video.py:173
↓ 13 callersMethodrun
(self)
src/anthias_viewer/messaging.py:43
↓ 12 callersFunction_disable_asset_poll
Strip the 5 s asset-table htmx poll so a swap doesn't cancel a click or drag mid-test. Call AFTER the page has loaded.
tests/test_app.py:143
↓ 12 callersFunction_open_edit_modal
Click a row's Edit button and wait for the modal's Alpine state.
tests/test_app.py:1051
↓ 12 callersFunction_seed_csrf_cookie
GET the home page so the middleware sets ``csrftoken`` on the client, then return the raw cookie value. Django's CSRF check accepts the unmask
tests/test_csrf.py:31
↓ 12 callersFunctionis_balena_app
Checks the application is running on Balena Cloud :return: bool
src/anthias_common/utils.py:667
↓ 12 callersMethodis_playing
(self)
src/anthias_viewer/media_player.py:275
↓ 12 callersMethodset_asset
(self, uri: str, duration: int | str)
src/anthias_viewer/media_player.py:266
↓ 11 callersFunction_build_side_effect
(payload: Any)
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:85
↓ 11 callersFunctiondownload_remote_video_asset
Fetch *uri* into the row's persisted ``Asset.uri`` and chain into ``normalize_video_asset``. The row is created upstream with ``mimetype='vid
src/anthias_server/celery_tasks.py:1010
↓ 11 callersFunctiongenerate_asset_list
Build the playlist plus a deadline for the next re-evaluation. Active assets are filtered by Asset.is_active() (which now applies day-of-week
src/anthias_viewer/scheduling.py:36
↓ 11 callersFunctionurl_fails
If it is streaming
src/anthias_common/utils.py:548
↓ 10 callersFunction_first_asset
()
tests/test_scheduler.py:281
↓ 10 callersFunction_flag
(cmd: list[str], name: str)
tests/test_media_player.py:588
↓ 10 callersFunction_make
Create an Asset with sensible defaults; override per test.
tests/test_viewer_api.py:65
↓ 10 callersFunction_make_remote_video_asset
A row in the state the serializer leaves behind for an http(s) video URL: mimetype='video', is_processing=True, uri pointing at the eventual l
tests/test_celery_tasks.py:1114
↓ 10 callersFunction_make_stuck_asset
Build a row in the state the reconciler is meant to find. The metadata key is the load-bearing field — every age-based decision the reconcile
tests/test_celery_tasks.py:1513
↓ 10 callersFunction_make_youtube_asset
A row in the state the serializer / frontend create leaves behind: mimetype=video, is_processing=True, uri pointing at the local destination p
tests/test_celery_tasks.py:688
↓ 10 callersFunction_submit_edit_form
Submit the edit form and return the HTTP status of the assets_update POST it fires. Either submission path is fine — an htmx hx-post answers 2
tests/test_app.py:1104
↓ 10 callersFunction_write_image
Synthesise a ~16×16 image in *fmt* and save it to *out_path*. Variety: alpha vs no-alpha, RGB vs RGBA, multi-frame TIFF. The point is that th
tests/test_processing.py:133
↓ 10 callersMethodget_play_days
Parse play_days into a sorted, deduped list of ints 1-7. Falls back to all days if the value is missing, malformed JSON, not a list,
src/anthias_server/app/models.py:87
↓ 10 callersFunctionget_request_data
Helper function to format request data based on API version.
src/anthias_server/api/tests/test_common.py:44
↓ 10 callersFunctionget_skip_event
Get the global skip event for instant asset switching.
src/anthias_viewer/utils.py:23
↓ 10 callersFunctionview
(request: Any)
tests/test_auth.py:114
↓ 9 callersFunction_auth_headers
()
tests/test_viewer_api.py:61
↓ 9 callersFunction_detect_hdmi_audio_device
Auto-detect which HDMI port is connected on Pi4/Pi5. The vc4 DRM driver exposes both HDMI connectors as /sys/class/drm/<card>-HDMI-A-{1,2}/.
src/anthias_viewer/media_player.py:95
↓ 9 callersFunction_is_wayland_board
True when the viewer runs under cage + Wayland (x86, arm64, pi5), where the compositor owns the transform and rotation is applied via ``wlr-ra
src/anthias_viewer/__init__.py:130
↓ 9 callersFunction_seed
( *, asset_id: str, name: str, mimetype: str, uri: str, duration: int = 8, is_enab
tests/_seed_data.py:49
↓ 9 callersFunction_touch
(asset_dir: str, name: str, age_seconds: int = 0)
tests/test_celery_tasks.py:61
↓ 9 callersFunctionapi_request
One balena API call. Returns parsed JSON (None for an empty or non-JSON body); raises HTTPError/URLError/OSError on failure.
bin/balena_unpin_devices.py:159
↓ 9 callersFunctionparse_version
Normalize 'balenaOS 6.1.24+rev4' / 'v6.12.3+rev4' / '16.5.0' to a comparable (major, minor, patch, rev) tuple. Unparseable -> all zeros (treat
bin/balena_unpin_devices.py:204
↓ 8 callersFunction_checkbox
Read a HTML checkbox: present-and-truthy = True, otherwise False. The settings form pairs every checkbox with a hidden 'false' input of the s
src/anthias_server/app/views.py:140
↓ 8 callersMethod_consume
(self, pubsub: Any)
src/anthias_viewer/messaging.py:89
↓ 8 callersFunction_create_assets
(assets: list[dict[str, Any]])
tests/test_scheduler.py:121
↓ 8 callersFunction_fake_response
Shape a fake ``_session.get`` response: context-manager-shaped, streams ``body`` in fixed-size chunks via ``iter_content``.
tests/test_celery_tasks.py:1135
↓ 8 callersFunction_make_recheck_asset
(**kwargs: object)
tests/test_celery_tasks.py:500
↓ 8 callersFunction_sentry_before_send
Drop events that report expected transient states, not bugs. Two classes of noise, both observed fleet-wide on day one: * ``redis.exceptio
src/anthias_server/django_project/settings.py:99
↓ 8 callersFunctionget_board_from_url
(url: str)
tools/raspberry_pi_imager/build_pi_imager_json.py:93
↓ 8 callersFunctiongoTo
(index: number, fromUser: boolean)
website/assets/js/slider.ts:183
↓ 8 callersFunctiontemplate
This is a helper function that is used to render a template with some global context. This is used to avoid having to repeat code in othe
src/anthias_server/app/helpers.py:19
↓ 7 callersMethod_asset
(self, name: str)
src/anthias_server/api/tests/test_screenly_migration.py:76
↓ 7 callersFunction_make_subscriber
(commands: dict[str, Any])
tests/test_messaging.py:184
↓ 7 callersFunction_mock_validate_valid
( page: Page, group_id: str = 'GROUP01', group_title: str = 'Migrated from Anthias', )
tests/test_migrate_to_screenly.py:100
↓ 7 callersFunction_notify
Browser refresh nudge, plus optional viewer playlist reload. Two notification kinds, both best-effort: * **Browser** — ``notify_asset_update
src/anthias_server/processing.py:376
↓ 7 callersFunction_patch_drm
Build patches that fake os.scandir() + open() for status reads.
tests/test_media_player.py:363
↓ 7 callersFunctionasset_recheck_lock_key
Task-side cooldown lock key (TTL = RECHECK_COOLDOWN_S).
src/anthias_server/celery_tasks.py:202
↓ 7 callersFunctionget_alsa_audio_device
()
src/anthias_viewer/media_player.py:219
↓ 7 callersFunctionget_host_time_zone
Read the host's /etc/timezone, falling back to UTC. /etc/timezone is bind-mounted from the host, so its value is whatever the host distro wro
src/anthias_server/django_project/settings.py:516
↓ 7 callersFunctionhumanize_duration
Format a duration in seconds as 'Xh Ym', 'Xm Ys', or 'Xs'. Asset.duration is stored as integer seconds. The schedule table used to render '42
src/anthias_server/app/templatetags/asset_filters.py:342
↓ 7 callersFunctionmake_image_metadata
(board: str)
tools/raspberry_pi_imager/tests/test_build_pi_imager_json.py:71
↓ 7 callersMethodrecv_json
(self, correlation_id: str, timeout_ms: int)
src/anthias_server/settings.py:231
↓ 7 callersFunctionretrieve_and_patch_json
(url: str)
tools/raspberry_pi_imager/build_pi_imager_json.py:118
↓ 6 callersFunction_auth_headers
()
tests/test_recheck_endpoint.py:40
↓ 6 callersMethod_build_command
(self)
src/anthias_viewer/media_player.py:537
↓ 6 callersFunction_create_asset
( client: APIClient, data: dict[str, Any], version: str )
src/anthias_server/api/tests/test_assets.py:35
↓ 6 callersFunction_last_play_options
Extract the options dict from the most recent ``playVideo`` call. Option values can be str / int / bool / float — the C++ side receives a ``Q
tests/test_media_player.py:70
↓ 6 callersFunction_resp
(status_code: int = 200, json_data: Any = None)
tests/test_github.py:37
↓ 6 callersFunctionclamp_screen_rotation
Coerce a raw rotation value to one of SCREEN_ROTATION_CHOICES. Returns 0 for anything that doesn't parse as an int in the cardinal set — defe
src/anthias_common/utils.py:38
↓ 6 callersMethodget_next_asset
(self)
src/anthias_viewer/scheduling.py:131
↓ 6 callersMethodon_failure
( self, exc: BaseException, task_id: str, args: tuple[Any, ...], kwarg
src/anthias_server/celery_tasks.py:436
↓ 6 callersFunctionrecover
(file_path: str)
src/anthias_server/lib/backup_helper.py:221
↓ 6 callersFunctionresolve
(field: str)
src/anthias_server/api/serializers/v2.py:78
↓ 6 callersMethodupdate_playlist
(self, *, allow_reshuffle: bool = False)
src/anthias_viewer/scheduling.py:191
↓ 6 callersFunctionview_image
(uri: str)
src/anthias_viewer/__init__.py:1002
↓ 5 callersFunction_client_ip
( request: HttpRequest, )
src/anthias_server/app/views_files.py:62
↓ 5 callersFunction_fake_head
Shape a fake ``requests.head`` response with a given Content-Type and status code.
tests/test_remote_video.py:191
↓ 5 callersMethod_hint_for
(exc: BaseException)
tests/test_sentry.py:36
↓ 5 callersFunction_make
(**kwargs: object)
tests/test_recheck_endpoint.py:44
↓ 5 callersFunction_make_tree
(root: Path)
tests/test_whitenoise_resilient.py:23
↓ 5 callersFunction_open_advanced_section
Expand the collapsible Advanced disclosure inside the edit modal (closed by default when the asset has no advanced values).
tests/test_app.py:1061
↓ 5 callersFunction_pct
(n: int, total: int)
src/anthias_server/app/page_context.py:85
next →1–100 of 1,832, ranked by callers