feat: per-profile catalog artwork editor with automatic cloud sync#408
Open
test01203 wants to merge 7 commits into
Open
feat: per-profile catalog artwork editor with automatic cloud sync#408test01203 wants to merge 7 commits into
test01203 wants to merge 7 commits into
Conversation
Vanilla JS + Supabase single-page app served alongside the existing arvio.tv marketing site. No build step required — just static files. Features: - Google OAuth login (via Supabase GoTrue) - Dashboard with watch stats and recent activity - Profiles view — shows all ARVIO sub-profiles with active/kids badges - Addons manager — lists all Stremio + Telegram addons with enabled status - Watch History — paginated by movie/tv/all, delete individual entries - Watchlist — view and remove items - AI Subtitle Translation — toggle on/off, select model (Groq Llama 70B / Gemini Flash 2.5), configure auto-select and hearing-impaired removal; settings saved directly to cloud sync payload - Settings — card layout, language, OLED mode, skip profile selection Data layer: reads/writes the cloud sync payload stored in profiles.addons.__arvioAccountSyncPayload (same format the TV app uses), and queries watch_history/watchlist tables directly via Supabase REST. Co-Authored-By: koby455 <koby455@gmail.com>
Android TV app (CloudSyncRepository.kt): - Inject PluginDataStore into CloudSyncRepository - buildCloudPayload: export pluginRepositories, pluginScrapers, pluginsEnabled into __arvioAccountSyncPayload so plugins survive device wipes / multi-device - applyCloudPayload: restore repositories + scrapers from cloud on first launch (scraper JS code stays local-only for security; only metadata is synced) Companion web app (app.js): - Add IPTV section: shows all M3U playlists per profile with M3U/EPG URLs, enabled status, favourite groups and favourite channels - Add Plugins section: shows all plugin repositories (name, URL, scraper count, last updated) and individual scrapers (name, version, supported types, content languages, enabled status) with global plugins toggle - Add both to sidebar navigation Co-Authored-By: koby455 <koby455@gmail.com>
- All navigation labels, section titles, badges, toasts, and helper text translated to English in app.js and index.html - Auth screen subtitle and Google button label now in English - timeAgo() helper uses English relative-time strings - Hebrew remains fully supported as a selectable app language (setting stored in cloud sync payload as before) - Add mock-preview.html: standalone demo page with generic sample data for screenshots / PR previews (no Supabase dependency) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cPayload - Add escapeHtml() helper and apply it to every cloud value injected into innerHTML: user display name/email/avatar initial, profile names, addon name/description/logo, IPTV playlist name/URL/EPG/profile label/fav groups+channels, plugin repo name/URL, scraper name/description/version/logo/types/languages, history title/poster, watchlist tmdb_id, settings user ID - Add safeUrl() helper (https/http only) and use it for all image src attributes that come from cloud data (addon logos, scraper logos, user avatar) - saveSyncPayload now reads the existing wrapper first and only updates __arvioAccountSyncPayload and __arvioAccountSyncUpdatedAt, preserving any other fields the TV app may have written Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Normalizes the URL via the browser's URL parser before use and HTML-escapes it, preventing quote/attribute injection from synced logo or avatar URLs in innerHTML img src attributes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expands the catalog edit dialog (pencil icon in Settings → Catalogs) to expose all four artwork URL fields per catalog row, per profile: - Cover image URL → collectionCoverImageUrl (card face) - Hero image URL → collectionHeroImageUrl (background on row focus) - Animated GIF URL → collectionFocusGifUrl (card animation on hover) - Clear logo URL → collectionClearLogoUrl (title logo overlay) Changes: • CatalogRepository: add updateCatalogArtwork() that patches the four URL fields on a CatalogConfig entry and saves via the existing saveCatalogs() path — no new DataStore key needed. • SettingsViewModel: add updateCatalogArtwork() wrapper that calls the repository and triggers syncLocalStateToCloud(silent=true), matching the existing renameCatalog() pattern. • SettingsScreen: widen the rename InputModal into a full edit dialog with five fields (title + four artwork URLs), pre-populated from the current CatalogConfig values each time the pencil is pressed. All three places that open the dialog now also prime the four URL state variables before setting showCatalogRename = true. Cloud sync works automatically — catalogsByProfile already serialises the full CatalogConfig JSON (including all collectionCover/Hero/Gif/ ClearLogo fields), so a change here is pushed on the next CATALOGS-scope invalidation, exactly like a rename or reorder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
The catalog edit dialog (pencil icon in Settings → Catalogs) now exposes all four artwork URL fields for every catalog row, editable per-profile and automatically synced to ARVIO Cloud.
Fields added to the edit dialog
All fields are pre-populated with the current values each time you open the pencil dialog, so you can see and edit what's already set.
How to use
Implementation
3 files changed, 89 insertions(+), 1 deletion(−)
CatalogRepository.ktNew
updateCatalogArtwork()function that patchescollectionCoverImageUrl,collectionHeroImageUrl,collectionFocusGifUrl, andcollectionClearLogoUrlon the matchingCatalogConfigentry and saves via the existingsaveCatalogs()path. No new DataStore key needed.SettingsViewModel.ktNew
updateCatalogArtwork()wrapper that calls the repository and triggerssyncLocalStateToCloud(silent = true), exactly matching therenameCatalog()pattern.SettingsScreen.ktmutableStateOf("")variables for the artwork URLsInputModalto a five-field edit dialogcatalog.collectionCoverImageUrletc. beforeshowCatalogRename = trueWhy no new cloud sync code
catalogsByProfilealready serialises the fullCatalogConfigJSON — including allcollectionCover/Hero/Gif/ClearLogofields. An artwork change therefore piggybacks on the existingCATALOGSinvalidation scope and is pushed to cloud on the next debounced flush, exactly like a rename or reorder.🤖 Generated with Claude Code