Files
OrbitTv/docs/briefs/indexing-programming-engine-2026-11-01.md
T
pauljdandClaude Opus 5.5 5cd4522fa5
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 3m0s
pauljd/davidson-ci: Davidson CI / ai-review (push) Successful in 1m4s
Save the indexing and programming brief
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-01 21:12:37 +00:00

16 KiB

ORBIT — Intelligent Media Indexing, Personalisation & Programming Engine Context Orbit is an existing, actively developed personal television application. The core application already supports Emby connectivity, channel generation, clock-driven linear television scheduling and playback. We are developing a collection of original channel identities, branding assets and animated idents. This is not a new project. Do not rebuild existing systems. We have now discovered the scale of the connected Emby library:

  • Approximately 135,000 movies.
  • Approximately 56,000 television series.
  • Over 1 million episodes.

These figures represent the reported connected library. Verify what is currently imported, indexed and persisted locally before assuming every record is available in Orbit. The next important development stage is making media indexing, categorisation, channel recommendations and scheduling scalable, intelligent and genuinely useful. The problem we're solving Modern streaming platforms offer an overwhelming number of choices. Orbit aims to remove selection paralysis by turning a user's existing media collection into a personalised television network. Instead of browsing thousands of films, users should be able to switch on a channel and immediately enjoy something. The guiding principle is: "Don't give me more things to choose from. Help me enjoy what I've already got." The goal is not to maximise engagement or encourage endless browsing. It is to restore the simplicity, anticipation and discovery of classic television.

  1. First task — Audit the existing implementation Before proposing modifications, inspect Orbit's existing repository. Investigate:

  2. Current Emby API integration.

  3. How the application discovers library contents.

  4. Existing pagination and batch processing.

  5. Existing database and persistence technologies.

  6. How media metadata is stored.

  7. Whether records are already indexed.

  8. Existing tagging and categorisation logic.

  9. How programmes are assigned to channels.

  10. How generated channel schedules are constructed.

  11. Whether series and episodes are treated separately.

  12. How media changes are detected.

  13. Existing caching and background processing.

  14. How playback references and permissions are handled.

Identify what already works before recommending new infrastructure. Do not introduce a new database, search engine or service without demonstrating why the existing implementation cannot satisfy the requirements. Deliverables Provide:

  • Current architecture summary.
  • Existing indexing capabilities.
  • Performance and scaling risks.
  • Identified metadata gaps.
  • Recommended improvements.
  • Dependencies and implementation order.

Do not implement changes during this initial audit. 2. Scalable library indexing Design an indexing strategy that can comfortably support the current library size and future growth. Requirements

  • Avoid full library rescans on every application launch.
  • Support incremental updates.
  • Support interrupted imports and resuming safely.
  • Process records in manageable batches.
  • Avoid unnecessary memory consumption.
  • Deduplicate records correctly.
  • Keep the application responsive during imports.
  • Store sufficient metadata for efficient searches.
  • Avoid unnecessary copies of media records.
  • Preserve connected provider identifiers.
  • Support multiple media providers in the future.
  • Never download actual films or episodes for indexing.

Series handling A million episodes must not become a million independent recommendation candidates. Prefer matching and classifying the parent series first. Use individual episodes when constructing schedules, respecting season and episode order. Investigate suitable indexes for:

  • Series.
  • Seasons.
  • Episodes.
  • Films.
  • Genres.
  • Release years.
  • Decades.
  • Tags.
  • Actors.
  • Directors.
  • Collections.
  • Provider references.

Choose indexes based on actual query patterns and performance evidence. Incremental updates Investigate the most reliable mechanism supported by the existing Emby implementation for detecting:

  • New titles.
  • Removed titles.
  • Updated metadata.
  • New episodes.
  • Changed availability.
  • Changed access permissions.

Consider provider change tracking, webhooks or scheduled refreshes where supported. Do not assume every future provider will expose identical capabilities. 3. Orbit's metadata and tagging system The objective is to make Orbit understand which programmes suit each channel. Generic genre metadata alone is insufficient. For example: The X-Files

  • Science fiction.
  • Supernatural.
  • Mystery.
  • Cult television.
  • 1990s.
  • Primary channel suggestion: Paradox.
  • Secondary suggestion: Orbit Sci-Fi.

CSI

  • Scripted crime.
  • Police procedural.
  • Forensic investigation.
  • Primary suggestion: Evidence.

Blue Planet

  • Nature documentary.
  • Ocean.
  • Wildlife.
  • Primary suggestion: Terra.
  • Secondary suggestion: Odyssey.

Batman Beyond

  • Superhero animation.
  • Futuristic action.
  • Primary suggestion: Heroes.
  • Secondary suggestion: Vortex.

The Burbs

  • Film.
  • Horror comedy.
  • Cult cinema.
  • 1980s.
  • Primary suggestion: Orbit VHS.
  • Secondary suggestion: Orbit After Dark.

Proposed approach Investigate separating:

  1. Original provider metadata.
  2. Normalised Orbit catalogue metadata.
  3. Orbit-specific inferred tags.
  4. User-confirmed classifications and overrides.

Do not overwrite provider metadata unnecessarily. Store confidence or provenance where useful so inferred tags are not mistaken for verified facts. Support user corrections and ensure they persist after library refreshes. 4. Intelligent channel preset matching Orbit has an approved collection of preset channel identities. Examples include:

  • Vortex — Action anime.
  • ToonZ — Classic cartoons.
  • Rewind — 90s Cartoon Network-style favourites.
  • Orbit X — Action cartoons.
  • Heroes — Superhero animation.
  • Wonder — Traditional animated family cinema.
  • PixelZ — CGI animation.
  • Orbit VHS — Nostalgic cinema.
  • Orbit Gold — British comedy.
  • Orbit Three — Alternative and Scottish comedy.
  • Riot — Adult animation and comedy.
  • Paradox — Supernatural and cult science-fiction television.
  • Evidence — Scripted crime procedurals.
  • Dark Files — True crime, mysteries and paranormal documentaries.
  • Terra — Nature and wildlife.
  • Odyssey — Science, history and exploration.
  • Ring X — Wrestling.
  • Other existing Orbit entertainment and movie channels.

Inspect the existing programming bible for the canonical definitions and channel numbering. Do not replace those existing decisions. Matching hierarchy Investigate: Highest priority: Explicit user selections and overrides. High priority: Curated programme matches using reliable identifiers. Next: Strong subgenre, format and channel-identity matches. Supporting signals: Decade, franchise, actors, directors, studio and user preferences. Low priority: Weak keyword or description similarity. Audience restrictions must be applied as eligibility filters, not merely scoring preferences. Recommendations Present relevant suggestions rather than silently filling every channel with loosely related material. Examples: "Your library contains 14 series suitable for Paradox." "These five animated series could work well on Orbit X." "We found additional wildlife documentaries for Terra." Allow users to accept, reject, substitute or edit suggested content. The algorithm should explain recommendations in plain language. 5. Personalisation per user or household profile The media catalogue should not be duplicated for each profile. Instead, investigate a shared indexed catalogue with small, separate profile-specific configuration records. Important: Shared indexing must not bypass media-server permissions. Each profile should only discover, receive recommendations for and play content it is authorised to access. Profile preferences Possible settings:

  • Favourite genres.
  • Favourite decades.
  • Favourite programmes.
  • Preferred actors or directors.
  • Preferred channel types.
  • Accepted recommendations.
  • Rejected recommendations.
  • Explicit exclusions.
  • Selected events.
  • Optional local viewing history.

Do not collect unnecessary personal data. Keep preferences local wherever practical and avoid mandatory cloud dependencies. Recommendation styles Consider three user-selectable modes: Familiar Favourites Prioritise known programmes, favourite genres and comfort viewing. Balanced Discovery Mix familiar content with interesting selections from the user's library. Surprise Me Introduce more variety while preserving relevance, content suitability and explicit user exclusions. These settings should affect recommendation ranking, not make arbitrary changes to existing channels. 6. Schedule intelligence Improve the quality of Orbit's generated television schedules. Preserve the current clock-driven scheduling engine. Investigate adding:

  • Episode progression.
  • Series rotation.
  • Repeat cooldowns.
  • Time-of-day programming preferences.
  • Channel-specific scheduling rules.
  • Film rotation.
  • Controlled programme variety.
  • Configurable randomness.
  • Cross-channel duplication management.

Examples: Vortex: Action anime blocks, with ordered episodes where appropriate. Dark Files: Investigations during the day, mysteries in the evening and paranormal programming later at night. Ring X: Monday Night Wars, Tuesday Impact, Wednesday AEW, other days mixing classic wrestling and PPVs. Orbit 1: Comfortable general entertainment. Orbit 2: Cult and forgotten television discoveries. These schedules are suggested defaults, not restrictions. Repeat handling Repeat rules should adapt to the amount of content available. A channel with five films should not become impossible to schedule because of a seven-day repeat cooldown. Investigate a graceful fallback system that maintains channel continuity. 7. OrbitOffice — Personalised Box Office OrbitOffice is intended to recreate the feeling of:

  • Sky Box Office.
  • Blockbuster.
  • Drive-in cinemas.
  • Friday movie nights.
  • Special television presentations.
  • Seasonal film marathons.

The objective is to turn ordinary viewing into an occasion. OrbitOffice must use the user's accessible media library, interests and preferences. Event recommendation examples Arnie Triple Bill

  • Total Recall.
  • Terminator 2.
  • Twins.

Late Night Spooks Three horror or supernatural films suited to the viewer. Tremors Marathon A sequence of available films in the franchise. Saturday Family Cinema Family-appropriate films selected from the connected library. Cult Classics Weekend Forgotten favourites from a preferred decade. Christmas Movie Nights Seasonally relevant films available in the library. Event matching Investigate matching based on:

  • Actors.
  • Directors.
  • Genres.
  • Decades.
  • Franchise relationships.
  • Collections.
  • Seasonal themes.
  • User preferences.
  • Runtime and available viewing window.
  • Content ratings.

Every proposed event must be constructed from verified, accessible media. If a film is unavailable, suggest a replacement rather than pretending it exists. Event generation Generate a small number of useful, well-matched event proposals. Do not calculate thousands of recommendations whenever the dashboard opens. Consider precomputing and caching event candidates when the catalogue or relevant preferences change. Events should remain proposals until accepted. Users can:

  • Accept.
  • Dismiss.
  • Edit.
  • Replace films.
  • Reorder films.
  • Choose a date.
  • Schedule the event.
  • Hide recommendations.

Do not automatically schedule an event without approval. 8. Seasonal and calendar-aware programming Investigate a lightweight seasonal recommendation system. Examples: October: Horror, Halloween and supernatural events. December: Christmas films and family favourites. Friday evening: Movie nights. Saturday morning: Family cartoons. Sunday afternoon: Classic cinema and comfort television. Avoid assuming every household follows the same schedule or cultural calendar. Users should be able to customise or disable seasonal suggestions. Use the user's configured local time zone. Do not require constant network polling. 9. Recommendation frequency and user experience The recommendation engine should feel helpful, not intrusive. Guidelines:

  • Offer a small number of high-quality suggestions.
  • Avoid endlessly refreshing recommendations.
  • Respect dismissed suggestions.
  • Explain why something was suggested.
  • Allow personalisation to be disabled.
  • Never require the user to choose something before watching television.
  • Avoid popups interrupting playback.
  • Keep event recommendations within appropriate dashboard sections.

The desired experience is: "We found something you might enjoy." Not: "Here are another fifty things you should watch." 10. Performance and architecture requirements Evaluate the indexing and recommendation system against the actual hardware and existing architecture. Measure:

  • Initial catalogue import time.
  • Incremental refresh time.
  • Index/database size.
  • Memory usage.
  • CPU usage.
  • Search latency.
  • Channel matching latency.
  • Event generation latency.
  • Application startup time.
  • EPG responsiveness during indexing.

Use real measurements, not arbitrary performance claims. Investigate whether the existing database is sufficient. SQLite with suitable indexes may be appropriate if compatible with the existing stack, but do not introduce it merely because it is mentioned here. Avoid unnecessary microservices or external infrastructure. Multiple media providers The long-term design should be capable of supporting:

  • Emby.
  • Plex.
  • Silo, if supported by its actual interfaces.
  • Other authorised media sources.

Do not implement every connector now. Preserve the working Emby integration and design provider independence incrementally. 11. Suggested incremental implementation Do not build the entire recommendation engine in one step. Propose a phased approach. Phase A — Catalogue audit and indexing Confirm what is already imported and indexed. Identify bottlenecks and missing metadata. Phase B — Normalised metadata and tagging Improve genre, subgenre and channel-oriented classification. Phase C — Preset matching proof of concept Test three different channel types:

  • Vortex — Action anime.
  • Paradox — Supernatural and science-fiction television.
  • Terra — Nature documentaries.

Phase D — Schedule quality Test repeat prevention, episode progression and channel rotation. Phase E — Profile preference foundation Introduce or extend small profile-level preference records without duplicating the catalogue. Phase F — OrbitOffice prototype Generate one actor-based triple-bill suggestion using available movies. Phase G — Recommendations and dashboard integration Present a small number of optional recommendations with clear explanations. Only proceed to each implementation phase once the previous phase has suitable acceptance criteria and testing. 12. What I want from Claude now Begin with research, inspection and planning. Do not immediately modify the running application. Please provide:

  1. Existing architecture assessment: How Orbit currently imports, indexes, stores and categorises media.
  2. Scalability assessment: Whether the existing implementation can handle 135,000 films, 56,000 series and over one million episodes.
  3. Metadata strategy: How to improve tagging and distinguish closely related channel identities.
  4. Personalisation proposal: How to support different household profiles without duplicating catalogue records or exposing unauthorised content.
  5. Recommendation algorithm: A simple, deterministic and explainable first version.
  6. OrbitOffice design: How to generate meaningful themed events from indexed films.
  7. Incremental roadmap: The smallest practical steps based on actual repository dependencies.
  8. First implementation proposal: One low-risk improvement, with files affected, acceptance criteria, tests and rollback instructions.

Check the existing project documentation and second brain where available. Reconcile this proposal with decisions already documented rather than introducing conflicting architecture. Preserve all verified working functionality. Keep recommendations separate from applied decisions. Ask for approval before significant implementation, migrations, dependency additions or architectural changes. Final direction Orbit should be able to take an enormous connected media library and transform it into a personal, enjoyable television experience. The user should not have to understand the scale of the catalogue. They should simply see relevant channels, familiar favourites, occasional discoveries and thoughtfully suggested movie nights. Index intelligently. Recommend gently. Programme beautifully. Let the viewer decide. The whole point is to make television enjoyable again.