Aoi was sending Matrix cards as soon as a playlist row appeared in the discovery-playlist SQLite, before Navidrome had scanned and indexed it. That produced 'ready' notifications for playlists that were not yet playable. The gate now requires the matching playlist (exact name match, case-insensitive) to be visible in Navidrome via getPlaylists with at least N entries (default 1, knob 'polling.discovery_min_tracks_in_navidrome') before the notification fires. If a playlist stays missing from Navidrome past 'polling.discovery_stale_after_hours' (default 48h), it is marked sent without notification so we don't loop forever. Refactored navidrome_playlist_cover into navidrome_find_playlist (name match) and navidrome_playlist_cover_for (cover for an already-resolved playlist), so the gate and the cover lookup share a single Navidrome roundtrip.
44 lines
1.1 KiB
JSON
44 lines
1.1 KiB
JSON
{
|
|
"matrix": {
|
|
"homeserver": "https://tuwu.vespahomelab.ru",
|
|
"access_token": "REPLACE_ME",
|
|
"room_id": "!roomid:tuwu.vespahomelab.ru",
|
|
"user_id": "@aoi:tuwu.vespahomelab.ru"
|
|
},
|
|
"bot": {
|
|
"name": "Аой-тян",
|
|
"avatar_path": ""
|
|
},
|
|
"navidrome": {
|
|
"url": "http://192.168.31.216:4533",
|
|
"username": "shu",
|
|
"password": "REPLACE_ME",
|
|
"main_library_id": 1,
|
|
"anime_library_id": 3,
|
|
"discovery_library_id": 4,
|
|
"album_poll_size": 40
|
|
},
|
|
"discovery": {
|
|
"db_path": "/data/discovery.db",
|
|
"playlist_name_contains": "Discovery"
|
|
},
|
|
"metadata": {
|
|
"lastfm_api_key": "",
|
|
"musicbrainz_enabled": true,
|
|
"proxy": "",
|
|
"user_agent": "AoiNotifier/1.0 (https://tuwu.vespahomelab.ru)"
|
|
},
|
|
"polling": {
|
|
"navidrome_album_interval_seconds": 300,
|
|
"discovery_playlist_interval_seconds": 180,
|
|
"release_watch_interval_seconds": 600,
|
|
"baseline_existing_on_first_run": true,
|
|
"discovery_min_tracks_in_navidrome": 1,
|
|
"discovery_stale_after_hours": 48
|
|
},
|
|
"server": {
|
|
"host": "0.0.0.0",
|
|
"port": 18323
|
|
}
|
|
}
|
|
|