Skip to content

About

Emby plugin: add the missing titles from Home Screen Companion lists to Sonarr and Radarr, by hand or by rules.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

32 Commits

Folders and files

Repository files navigation

Arr Companion

Arr Companion

An Emby plugin that adds the titles Home Screen Companion finds missing from the library to Sonarr and Radarr: by hand from an admin page, or with rules such as "the top 3 of Trending".

How it works

  • The list. Home Screen Companion's Missing tab, with "Keep the list in a file" and JSON on, writes missing_titles.json after each sync and after library changes. Arr Companion reads that file. It finds Home Screen Companion's export folder by itself; a different file or folder can be set under Settings. For each title the file gives the lists it is on and its place on each one (ranks: [{ list, rank, of }]). If the file is from a Home Screen Companion version without places, Arr Companion takes them from the lists Home Screen Companion keeps (missing_titles/sources.json).
  • Missing tab. Every title not in the library, with a poster, its best place and its place on each of its lists ("Trending #1"), and whether Sonarr or Radarr already has it: + Radarr to add it, ✓ Radarr when it is there (monitored, downloaded, or for a show how many episodes it has). It has a list view and a poster view. Filter by list, All / Movies / Shows and top places; In Sonarr / Radarr also shows the titles Sonarr or Radarr already has but the library does not have yet (the browser remembers the choice). Search by title or IMDb id. Click a row to select it. Add one title or a selection (root folder, quality profile, monitoring, search), or hide titles. The Add dialog starts on the root folder last added to on that server (kept in the plugin's settings), else the server's default from Settings; hidden titles are under Show hidden. Without a Sonarr or Radarr set up, everything works except the add itself, which says why it was not sent. The tab opens at once with what Sonarr and Radarr held the last time they were read (kept in the plugin's data folder, arr_library.json), reads them again meanwhile and updates the rows when they answer.
  • Language. Each title shows its original language ("2026 · Series · Chinese · tt39368345"; on the poster as a small label), with its origin countries on hover, and the Missing tab filters by language ("Any language", "Your languages", "Other languages" and the languages present, with counts). Under Settings › Your languages (English unless changed, kept as ISO 639-1 codes in MyLanguages) you set the languages your users speak: a title in one of them shows a green label, one in any other an orange "foreign" label, and one whose language is not known a grey one. They come from TMDb with the poster (original_language, origin_country / production_countries), looked up once in the background and kept in posters.json. Without a TMDb key, Emby's own metadata providers are asked instead; they give no original language, so it is then only known for titles whose original title is in its own script (Chinese, Japanese, Korean, Thai, Hindi, …), not for Latin-script titles.
  • Match. Match 82% is how well a missing title fits what everyone on the server watched, from Emby's user data of all users (Played and LastPlayedDate, the last 180 days), read as Home Screen Companion's Your Next Watch reads it. Each user's watched movie or show weighs 0.5 + 0.5·e^(−days ago/60) (a show up to 2× by episodes watched, a favourite 1.5×, one rated below 5 not at all). The server's profile is the share of that watching per genre, original language, country and person (top-billed actors and directors). A title's score is on a fixed 0–100 scale: genres 40% (how much of the watching carries each, and how much more than the library carries it), language 25% and country 10% (their share of the watching; 40% or more counts fully; the language part only when the language of at least half the watching is known, so without a TMDb key it is left out), people 25% (people in it who are in the watched titles). A part without data is left out and the others count for it. The tooltip gives the reason ("Crime, Drama · Spanish"); Best match sorts by it, and the Missing tab filters by it ("Any match", "Match 100%", "Match 90%+" … "Match 30%+", "Match under 30%", with counts; titles without a match yet only under "Any match"; the browser remembers the choice), so Select all shown and Add selected add, for example, every 100% match at once. The chip's colour shows the band: 70–100% green, 50–69% teal, 30–49% amber, 0–29% red (on the poster as a pill at its foot). The profile is kept in taste.json and built again in the background when the tab opens and it is over 6 hours old (the refresh button: over a minute); the tab still opens at once with the kept scores.
  • Posters come from TMDb, with Home Screen Companion's TMDb key unless one is set in Settings. Without a TMDb key, Emby's own metadata search (the one Identify uses) is asked by the title's ids. Each poster is looked up once and kept; the browser loads the image itself.
  • Ratings. With the MDBList API key set in Home Screen Companion, each title shows its ratings as small pills ("IMDb 8.4", "RT 94%"; on the poster IMDb and Rotten Tomatoes only). Settings › Ratings shown picks which: IMDb, Rotten Tomatoes, RT Audience, Metacritic, Letterboxd and the MDBList score (IMDb and Rotten Tomatoes unless changed). The Missing tab sorts by Highest IMDb, Highest RT and Highest MDBList score (unrated titles last) and filters with "Any rating", "IMDb 8+ / 7+ / 6+", "RT 90%+ / 75%+ / 60%+" (with counts; the browser remembers the choice). They are asked by IMDb id with MDBList's batch lookup (up to 200 titles per request), in the background, kept in ratings.json and asked again after 7 days; a run stops when MDBList's daily limit gets close and waits as long as a 429 says. Titles without an IMDb id have no ratings.
  • Rules. A rule names a list (or any list), movies, shows or both, the top places to take, and optionally a first year, a limit per run, only these original languages, not these languages, only or not your languages (the Settings list, as it is when the rule runs), a lowest match ("match at least 60%"), and a lowest IMDb rating or Rotten Tomatoes score. A rule with a language, match or rating condition leaves out titles whose language, match or rating is not known yet; before a scheduled run it looks them up first. Rules run on the scheduled task Arr Companion › Run rules (every 6 hours) and, if that is on, a few minutes after the file changes. They use the server's default root folder and profile. Preview shows what a rule picks, also before Sonarr and Radarr are set up, and why it picks nothing when it does. A title a rule has added once is never added again, so one removed from Sonarr or Radarr stays removed.
  • History. What was added, by hand or by which rule, and from which place on which list.
  • Wanted on the home screen (off unless turned on under Settings). Arr Companion makes two libraries of its own, Wanted Movies and Wanted Shows, each on an empty folder in its data folder (wanted/library), with one item per missing title and no file: its poster with a WANTED band drawn on it (Emby's own SkiaSharp, the Bebas Neue font included), overview, trailer link and the tag Wanted. Settings picks movies, shows, the lists and how many titles per library. The items are made again after the file changes, on the rules task and when the settings change. Arr Companion writes nothing to users: no user settings, no home screen rows. The libraries are like any library the admin adds, so who sees them (and whether they show in My Media and Latest) is up to the admin, in Emby's library access and the users' home screen settings. To show them as a home row with Home Screen Companion: add a source of type Smart Playlist, rule Tag Wanted, a Tag Name of its own (not Wanted: with it the source matched nothing and Home Screen Companion took the tag off the items; for example Wanted row), Add as home screen section on for the chosen users, then run Tag & Collection Sync. (Home Screen Companion adds every new library, these too, to the excluded folders of its top-list rows, for every user, so those rows do not show it.) A heart (favourite) from a user picked under Users who can request requests the title: after 60 seconds (a heart taken off within them cancels) it goes to Radarr or Sonarr with the server's defaults, or, with Requests wait for an admin, onto the Missing tab's Requests chip, where + Radarr / + Sonarr sends it and Hide declines it. The heart then comes off again, the band turns green (REQUESTED), History shows who asked and, best effort, the user's open Emby apps get a short message. A heart from anyone else does nothing. Play shows a 10-second card ("Not in the library yet"; no length or video details on the detail page), and the item's play state is reset afterwards; the Trailer button plays the trailer. An item goes when the title arrives in the library, is already in Sonarr or Radarr (one requested this way stays, Requested, until it arrives) or leaves the lists. Turning it off or uninstalling Arr Companion removes both libraries and their items. Only Arr Companion's own provider id is set on the items (not IMDb or TMDb), so plugins and collections that match by those ids do not take them for owned titles (with an IMDb id, Home Screen Companion counts the item as in the library for its lists); the detail page therefore has no IMDb / TMDb links. Home Screen Companion still counts them as in the library (it also matches by name and year) and drops them from its missing titles file; Arr Companion then keeps them from its own record (wanted/wanted.json) while they are on a list in Home Screen Companion's sources.json, and the Missing tab still lists them.

Shows already in the library, with missing episodes, are left out for now: version 1 adds whole series.

Servers

Settings has one Sonarr and one Radarr. They are saved as a list (Instances, each with its own id), and adds and rules pick a server by id, so more than one of each kind only needs the page. Emby's server talks to Sonarr and Radarr. The API keys never reach the browser.

Requirements

Install

Download the .dll file from latest releases. Place the .dll in you plugin folder. Restart Emby.

Every push to main is built by GitHub Actions and published as a release (0.2.0.<build>, major and minor from the project's version).

About

Emby plugin: add the missing titles from Home Screen Companion lists to Sonarr and Radarr, by hand or by rules.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages