People put the posters in their own libraries (one in an automated F1 library in Emby), and the only help was the Kometa example page, written for developers. The guides are for people who are not: numbered steps of one action each, the exact menus and buttons of Plex, Kometa and Emby as their own documentation names them, boxes to copy, the pictures from the live API, what to see after a step and what to do when it does not work. The technical details (routes, options, the address version, a script and Emby's API) sit at the end of each. guides/ holds the index, plex.html (a Plex TV library on the Personal Media Shows agent, Kometa pointed at /kometa/formula-1-metadata.yml, its daily run) and emby.html (Kometa needs Plex, so: Set Image from URL by hand, or picture files named as Emby's TV naming page reads them, and a script that saves a whole season from the Kometa file). They use the example site's style sheet; every example page's nav links them, and README.md lists them. cdn-api.py serves guides/ at /guides/ beside /examples/, and the image copies it. A mount of a directory the image lacks stops the service at its start, so tests/test_image.py holds that every directory the app serves is copied by service/Dockerfile.
293 lines
18 KiB
HTML
293 lines
18 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Using the posters in Emby · Guides · F1 Circuits</title>
|
||
<meta name="description" content="Step by step: give every season, race weekend and session of your Formula 1 library in Emby its poster or thumbnail from F1 Circuits, by hand or as picture files.">
|
||
<link rel="icon" href="data:,">
|
||
<link rel="stylesheet" href="../examples/site.css">
|
||
</head>
|
||
<body>
|
||
<header class="site">
|
||
<a class="brand" href="../examples/index.html">F1 <span>Circuits</span> API</a>
|
||
<nav aria-label="Guides">
|
||
<a href="index.html">Guides</a>
|
||
<a href="plex.html">Plex</a>
|
||
<a href="emby.html" aria-current="page">Emby</a>
|
||
<a href="../examples/index.html">Examples</a>
|
||
</nav>
|
||
</header>
|
||
|
||
<main>
|
||
<h1>Using the posters in Emby</h1>
|
||
<p class="lead">
|
||
Emby can show your Formula 1 library with a poster for every season, a poster for every race weekend and a picture
|
||
for every session. This guide shows two ways to put them in: by hand in Emby's own screens, or as picture files
|
||
next to your videos.
|
||
</p>
|
||
<p class="notice info">
|
||
Kometa, the helper the <a href="plex.html">Plex guide</a> uses, works only with Plex: it
|
||
<a href="https://kometa.wiki/en/latest/config/plex/">cannot run</a> without a Plex Media Server. In Emby you put the
|
||
pictures in yourself.
|
||
</p>
|
||
|
||
<h2>What you will get</h2>
|
||
<div class="examples-row">
|
||
<figure>
|
||
<img src="https://f1-circuits.zurag.be/posters/season/2025.png?v=a1&width=400&format=jpg"
|
||
alt="The 2025 season poster" loading="lazy">
|
||
<figcaption>The show “Season 2025” gets the season poster.</figcaption>
|
||
</figure>
|
||
<figure>
|
||
<img src="https://f1-circuits.zurag.be/posters/race/Qatar%20Grand%20Prix/2025.png?v=a1&width=400&format=jpg"
|
||
alt="The 2025 Qatar Grand Prix poster" loading="lazy">
|
||
<figcaption>Each race weekend gets its race poster: here round 23, Qatar.</figcaption>
|
||
</figure>
|
||
<figure>
|
||
<img src="https://f1-circuits.zurag.be/posters/session/Qatar%20Grand%20Prix/2025/race.png?v=a1&width=640&format=jpg"
|
||
alt="The thumbnail of the race session of the 2025 Qatar Grand Prix" loading="lazy">
|
||
<figcaption>Each session gets its thumbnail: here the race.</figcaption>
|
||
</figure>
|
||
</div>
|
||
|
||
<h2>What you need</h2>
|
||
<ul>
|
||
<li>Emby Server, and Emby's web app open in your browser, signed in as an administrator.</li>
|
||
<li>Your Formula 1 videos in a library of the type <strong>TV shows</strong>, in folders as step 1 shows.</li>
|
||
<li>For the second way: access to the folders your videos are in.</li>
|
||
</ul>
|
||
|
||
<section class="guide-step">
|
||
<h2><span class="num">1.</span> How the library is laid out</h2>
|
||
<p>Emby calls the levels of a TV library show, season and episode. The pictures fit this layout, the one the
|
||
<a href="../examples/library.html">Library page</a> shows:</p>
|
||
<ul>
|
||
<li>Every Formula 1 season is a <strong>show</strong>, such as <code>Season 2025</code>.</li>
|
||
<li>Every race weekend is a <strong>season</strong> of that show, numbered by its round: the Qatar Grand Prix,
|
||
round 23, is season 23.</li>
|
||
<li>Every session is an <strong>episode</strong> of that season: the race of a sprint weekend is episode 12.</li>
|
||
</ul>
|
||
<p>Emby reads the numbers from the names of your folders and files, as its
|
||
<a href="https://emby.media/support/articles/TV-Naming.html">TV naming page</a> shows. For example:</p>
|
||
<pre class="code">Formula 1 ← the library's folder
|
||
└── Season 2025 ← a show: the 2025 season
|
||
├── Season 1 ← a season of the show: round 1, Australia
|
||
│ └── Season 2025 S01E08 Race.mkv ← episode 8: the race
|
||
└── Season 23 ← round 23, Qatar, a sprint weekend
|
||
├── Season 2025 S23E06 Sprint.mkv
|
||
└── Season 2025 S23E12 Race.mkv</pre>
|
||
<details class="more">
|
||
<summary>Which episode number is which session</summary>
|
||
<p>This is how the Library page and the Plex guide number them. A sprint weekend has more sessions, so its numbers
|
||
differ:</p>
|
||
<table>
|
||
<thead><tr><th>Episode</th><th>Standard weekend</th><th>Sprint weekend</th></tr></thead>
|
||
<tbody>
|
||
<tr><td>1</td><td>Free Practice 1</td><td>Free Practice 1</td></tr>
|
||
<tr><td>2</td><td>Free Practice 2</td><td>Pre-Sprint-Qualifying Buildup</td></tr>
|
||
<tr><td>3</td><td>Free Practice 3</td><td>Sprint Qualifying</td></tr>
|
||
<tr><td>4</td><td>Pre-Qualifying Buildup</td><td>Post-Sprint-Qualifying</td></tr>
|
||
<tr><td>5</td><td>Qualifying</td><td>Pre-Sprint Buildup</td></tr>
|
||
<tr><td>6</td><td>Post-Qualifying</td><td>Sprint</td></tr>
|
||
<tr><td>7</td><td>Pre-Race Buildup</td><td>Post-Sprint</td></tr>
|
||
<tr><td>8</td><td>Race</td><td>Pre-Qualifying Buildup</td></tr>
|
||
<tr><td>9</td><td>Post-Race</td><td>Qualifying</td></tr>
|
||
<tr><td>10</td><td>Highlights</td><td>Post-Qualifying</td></tr>
|
||
<tr><td>11</td><td></td><td>Pre-Race Buildup</td></tr>
|
||
<tr><td>12</td><td></td><td>Race</td></tr>
|
||
<tr><td>13</td><td></td><td>Post-Race</td></tr>
|
||
<tr><td>14</td><td></td><td>Highlights</td></tr>
|
||
<tr><td>15</td><td></td><td>Bonus Content</td></tr>
|
||
</tbody>
|
||
</table>
|
||
</details>
|
||
</section>
|
||
|
||
<section class="guide-step">
|
||
<h2><span class="num">2.</span> Find a picture's address</h2>
|
||
<p>Every picture has its own web address. The Library page lists them all:</p>
|
||
<ol class="steps">
|
||
<li>Open the <a href="../examples/library.html">Library page</a>. When the site has just started, it can take a
|
||
few minutes to load.</li>
|
||
<li>Click a season, such as 2025. You see its season poster and one poster per race weekend.</li>
|
||
<li>Click a race weekend. You see its race poster and one thumbnail per session.</li>
|
||
<li>Under each picture is its address, with a <strong>Copy</strong> button and an <strong>Open</strong> button.</li>
|
||
</ol>
|
||
<table>
|
||
<thead><tr><th>In Emby</th><th>Picture</th><th>Its address, for example</th></tr></thead>
|
||
<tbody>
|
||
<tr><td>The show “Season 2025”</td><td>Season poster</td>
|
||
<td><code>https://f1-circuits.zurag.be/posters/season/2025.png?v=a1</code></td></tr>
|
||
<tr><td>Season 23 of it (Qatar)</td><td>Race poster</td>
|
||
<td><code>https://f1-circuits.zurag.be/posters/race/Qatar%20Grand%20Prix/2025.png?v=a1</code></td></tr>
|
||
<tr><td>Episode 12 of season 23 (the race)</td><td>Session thumbnail</td>
|
||
<td><code>https://f1-circuits.zurag.be/posters/session/Qatar%20Grand%20Prix/2025/race.png?v=a1</code></td></tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
|
||
<section class="guide-step">
|
||
<h2><span class="num">3a.</span> The first way: by hand in Emby</h2>
|
||
<p>Nothing to install, nothing to save. Do this for the show, then for each race weekend, then for each session you
|
||
want a picture on.</p>
|
||
<ol class="steps">
|
||
<li>Copy the picture's address from the Library page (step 2).</li>
|
||
<li>In Emby's web app, open your Formula 1 library and find the show, race weekend or session.</li>
|
||
<li>On its picture, click <strong>⋯</strong> and choose <strong>Edit Images</strong>.</li>
|
||
<li>On the picture marked <strong>Primary</strong>, click <strong>⋯</strong> and choose
|
||
<strong>Set Image from URL</strong>.</li>
|
||
<li>Paste the address and confirm.</li>
|
||
</ol>
|
||
<p class="see">You should see: the Formula 1 picture on the item, in place of the old one.</p>
|
||
<p class="hint">A season has over 20 race weekends and over 200 sessions. By hand suits the show and the race
|
||
weekends; for every session, the second way with the script at the end of this page is faster.</p>
|
||
</section>
|
||
|
||
<section class="guide-step">
|
||
<h2><span class="num">3b.</span> The second way: picture files next to your videos</h2>
|
||
<p>Emby reads pictures that sit in your folders under these names (its
|
||
<a href="https://emby.media/support/articles/TV-Naming.html">TV naming page</a>, “Series & Season Images” and
|
||
“Episode Images”):</p>
|
||
<table>
|
||
<thead><tr><th>For</th><th>Save the picture as</th><th>In the folder</th></tr></thead>
|
||
<tbody>
|
||
<tr><td>The show</td><td><code>folder.png</code></td><td>of the show: <code>Season 2025</code></td></tr>
|
||
<tr><td>A race weekend</td><td><code>folder.png</code></td><td>of the race weekend: <code>Season 23</code></td></tr>
|
||
<tr><td>A session</td><td>the video's name, with <code>-thumb.png</code> in place of its ending:
|
||
<code>Season 2025 S23E12 Race-thumb.png</code></td><td>next to the video</td></tr>
|
||
</tbody>
|
||
</table>
|
||
<ol class="steps">
|
||
<li>On the Library page (step 2), click <strong>Open</strong> under the picture. It opens on its own.</li>
|
||
<li>Right-click the picture and choose <strong>Save Image As</strong> (the words differ a little per browser).</li>
|
||
<li>Save it in the folder, under the name, that the table gives.</li>
|
||
<li>When the folder has its pictures: in Emby, on the show's picture, click <strong>⋯</strong> and choose
|
||
<strong>Refresh Metadata</strong>.</li>
|
||
<li>Set <strong>Refresh mode</strong> to <strong>Search for missing metadata</strong>, leave
|
||
<strong>Replace existing images</strong> off, and click <strong>Refresh</strong>.</li>
|
||
</ol>
|
||
<p class="see">You should see: the show, its race weekends and its sessions with the pictures you saved.</p>
|
||
<p class="hint">Emby also reads <code>poster.png</code> for a show or race weekend, and
|
||
<code>season23-poster.png</code> for round 23 when it sits in the show's folder. It looks for
|
||
<code>folder</code> first.</p>
|
||
</section>
|
||
|
||
<section class="guide-step">
|
||
<h2><span class="num">4.</span> When the pictures get a new look</h2>
|
||
<p>Emby keeps the picture it was given. When the pictures get a new look, they get new addresses (the Library page
|
||
always shows the current ones). Put the new ones in the same way: by hand (step 3a), or by saving the files again
|
||
and refreshing (step 3b).</p>
|
||
<p class="notice">Never switch on <strong>Replace existing images</strong> in Refresh Metadata for this library.
|
||
Emby then deletes the item's pictures, your own included, and downloads new ones from the online databases it
|
||
uses (<a href="https://emby.media/support/articles/Metadata-manager.html">Emby's metadata manager page</a>).</p>
|
||
</section>
|
||
|
||
<h2>If it doesn't work</h2>
|
||
<ul>
|
||
<li><strong>A picture you saved does not show.</strong> Check its name and folder against the table in step 3b,
|
||
and that it ends in <code>.png</code> or <code>.jpg</code>. Then, on the library itself, click <strong>⋯</strong>
|
||
and choose <strong>Scan Library Files</strong>.</li>
|
||
<li><strong>A race poster sits on the wrong race weekend.</strong> Emby's season number must be the round: check
|
||
the folder's name (<code>Season 23</code>) or the <code>S23</code> in the file names.</li>
|
||
<li><strong>A thumbnail sits on the wrong session.</strong> Check the episode numbers against the table in step 1:
|
||
a sprint weekend is numbered differently from a standard one.</li>
|
||
<li><strong>Your pictures were replaced.</strong> A refresh with <strong>Replace existing images</strong> on does
|
||
that. Put them in again (step 3a or 3b).</li>
|
||
<li><strong>Set Image from URL does nothing.</strong> Emby fetches the picture from this site itself, so the
|
||
computer Emby runs on must reach <code>https://f1-circuits.zurag.be</code>. Open
|
||
<a href="https://f1-circuits.zurag.be/posters/season/2025.png?v=a1">a poster</a> in a browser on that computer to
|
||
check.</li>
|
||
</ul>
|
||
|
||
<h2>For the technically minded</h2>
|
||
|
||
<h3>The pictures</h3>
|
||
<ul>
|
||
<li>Three routes, each a plain <code>GET</code>, no key: <code>/posters/season/{season}.png</code> (1000×1500),
|
||
<code>/posters/race/{race name}/{season}.png</code> (1000×1500) and
|
||
<code>/posters/session/{race name}/{season}/{session}.png</code> (1920×1080). The sessions are <code>fp1</code>,
|
||
<code>fp2</code>, <code>fp3</code>, <code>pre-qualifying</code>, <code>qualifying</code>,
|
||
<code>post-qualifying</code>, <code>pre-race</code>, <code>race</code>, <code>post-race</code>,
|
||
<code>highlights</code>, <code>pre-sprint-qualifying</code>, <code>sprint-qualifying</code>,
|
||
<code>post-sprint-qualifying</code>, <code>pre-sprint</code>, <code>sprint</code>, <code>post-sprint</code> and
|
||
<code>bonus</code>.</li>
|
||
<li>A race name is Jolpica's, its spaces and other characters encoded: <code>Qatar%20Grand%20Prix</code>,
|
||
<code>S%C3%A3o%20Paulo%20Grand%20Prix</code>.</li>
|
||
<li>Options as query parameters, such as <code>format=jpg</code> (smaller files; the address keeps its
|
||
<code>.png</code>), <code>width=600</code>, <code>style=minimal</code> and <code>bg=photo</code>. Try every option
|
||
in the <a href="../examples/builder.html">poster builder</a>; the <a href="https://f1-circuits.zurag.be/docs">API
|
||
reference</a> lists them.</li>
|
||
<li><code>?v=a1</code> is the address version. An address that carries it is kept by clients for good; it is raised
|
||
when the look changes. The <a href="https://f1-circuits.zurag.be/kometa/formula-1-metadata.yml">Kometa file</a>
|
||
always carries the current one, and lists every picture's address per season, round and episode number.</li>
|
||
</ul>
|
||
|
||
<h3>A whole season as files, with a script</h3>
|
||
<p>For Linux, macOS or a NAS with a shell. It reads the season's addresses from the Kometa file and saves, as JPEG,
|
||
<code>folder.jpg</code> in the show's folder, <code>seasonNN-poster.jpg</code> per round next to it, and
|
||
<code><video>-thumb.jpg</code> next to every video whose name carries its round and episode
|
||
(<code>S23E12</code> or <code>23x12</code>). Keep one picture per item: delete a <code>.png</code> you saved by hand
|
||
for the same item. Then refresh as in step 3b.</p>
|
||
<div class="copy"><code>#!/bin/sh
|
||
# Usage: f1-emby-art.sh 2025 "/media/Formula 1/Season 2025"
|
||
season=$1 show=$2 api=https://f1-circuits.zurag.be opts=format=jpg
|
||
|
||
# Every address of the season: "round episode address", 0 for the show's or a round's own picture.
|
||
list=$(curl -fsS "$api/kometa/formula-1-metadata.yml" | awk -v season="$season" '
|
||
/^ "Season [0-9]+":/ { on = index($0, "\"Season " season "\":") > 0; round = ep = 0; next }
|
||
!on { next }
|
||
/^ [0-9]+:$/ { round = $1 + 0; ep = 0; next }
|
||
/^ [0-9]+:$/ { ep = $1 + 0; next }
|
||
/url_poster:/ { print round, ep, $2 }')
|
||
address() { printf '%s\n' "$list" | awk -v r="$1" -v e="$2" -v o="$opts" '$1 == r && $2 == e { print $3 "&" o }'; }
|
||
|
||
curl -fsSo "$show/folder.jpg" "$(address 0 0)"
|
||
for round in $(printf '%s\n' "$list" | awk '$1 > 0 && $2 == 0 { print $1 }'); do
|
||
curl -fsSo "$show/$(printf 'season%02d-poster.jpg' "$round")" "$(address "$round" 0)"
|
||
done
|
||
find "$show" -type f | grep -Ei '\.(mkv|mp4|m4v|ts|avi|mov|webm)$' | while IFS= read -r file; do
|
||
set -- $(printf '%s\n' "${file##*/}" | sed -nE -e 's/.*[Ss]([0-9]+)[Ee]([0-9]+).*/\1 \2/p' -e t \
|
||
-e 's/^(.*[^0-9])?([0-9]+)x([0-9]+)([^0-9].*)?$/\2 \3/p')
|
||
[ $# = 2 ] && url=$(address "$1" "$2") && [ -n "$url" ] && curl -fsSo "${file%.*}-thumb.jpg" "$url"
|
||
done</code></div>
|
||
|
||
<h3>Through Emby's API</h3>
|
||
<p>Emby downloads a picture from an address onto an item with
|
||
<a href="https://dev.emby.media/reference/RestAPI/RemoteImageService/postItemsByIdRemoteimagesDownload.html"><code>POST
|
||
/Items/{Id}/RemoteImages/Download</code></a>, with <code>Type</code> (<code>Primary</code> for the show's, a
|
||
season's and an episode's picture) and <code>ImageUrl</code> in the query. It needs an administrator: make an
|
||
<a href="https://dev.emby.media/doc/restapi/API-Key-Authentication.html">API key</a> in the server dashboard
|
||
(Advanced, Security, Add) and send it in the <code>X-Emby-Token</code> header.</p>
|
||
<div class="copy"><code>EMBY=http://localhost:8096/emby
|
||
KEY=your-api-key
|
||
|
||
# The show's Id: search the library for it
|
||
curl -fsS -H "X-Emby-Token: $KEY" "$EMBY/Items?IncludeItemTypes=Series&Recursive=true&SearchTerm=Season%202025"
|
||
# Its seasons (IndexNumber is the round) and one season's episodes (IndexNumber is the episode)
|
||
curl -fsS -H "X-Emby-Token: $KEY" "$EMBY/Shows/$SHOW/Seasons"
|
||
curl -fsS -H "X-Emby-Token: $KEY" "$EMBY/Shows/$SHOW/Episodes?SeasonId=$SEASON"
|
||
|
||
# Round 23's poster onto its season
|
||
curl -fsS -X POST -H "X-Emby-Token: $KEY" -G "$EMBY/Items/$SEASON/RemoteImages/Download" \
|
||
--data-urlencode Type=Primary \
|
||
--data-urlencode "ImageUrl=https://f1-circuits.zurag.be/posters/race/Qatar%20Grand%20Prix/2025.png?v=a1&format=jpg"</code></div>
|
||
<p>Emby keeps the copy it downloaded. When the address version is raised, call it again with the new address.</p>
|
||
</main>
|
||
|
||
<footer class="pager">
|
||
<a rel="prev" href="plex.html">← Plex</a>
|
||
<span class="home"></span>
|
||
<a rel="next" href="index.html">Guides →</a>
|
||
</footer>
|
||
<footer class="disclaimer">
|
||
<p>This website is unofficial and is not associated in any way with the Formula 1 companies. F1, FORMULA ONE,
|
||
FORMULA 1, FIA FORMULA ONE WORLD CHAMPIONSHIP, GRAND PRIX and related marks are trade marks of Formula One
|
||
Licensing B.V.</p>
|
||
<p><a href="../examples/licences.html">Licences and credits</a>: every source the pictures are made from, the licence each
|
||
picture takes from its sources, and the licence of the track files and the GPS traces (MIT).</p>
|
||
</footer>
|
||
<script src="guides.js"></script>
|
||
</body>
|
||
</html>
|