Skip to content

Show a release's NFO and MediaInfo from the picker - #589

Merged
xbmc4lyfe merged 21 commits into
grouping-release-indexfrom
nfo-mediainfo-viewer
Nov 16, 2026
Merged

xbmc4lyfe merged 21 commits into
grouping-release-indexfrom
nfo-mediainfo-viewer

Conversation

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator

Summary

Left or Right on a release in the picker opens its NFO and MediaInfo over the list. Stacked on #588 (base grouping-release-index) so both land together.

Opening the viewer, turning the page, changing tabs, and a tersely named listing

Recorded in a test Kodi against stand-in indexers. Metropolis (1927); the releases, the NFO and the group are made up.

  • One tab per unique text. Indexers mostly carry the same NFO, so identical texts share a tab that lists every indexer carrying it. A tab is as tall as that list.
  • The text is drawn by the add-on, with its own terminal font, into an image. Skins seldom have a monospace font and an add-on cannot add one, so this is what makes NFO art line up on any skin. The page size follows the screen, and the header says how many pages there are.
  • What the text says of the release, under it, in the picker's colors: a check when the listing's name already says it, a small NEW when the text is where it comes from.
  • Rows carry NFO and MEDIAINFO tags, and the bottom bar lists the shortcut.
The picker's tags A terse listing: what the NFO adds
Picker rows with NFO and MEDIAINFO tags 2160p and DV confirmed; HDR10, HEVC, audio, source and group new

Note

One thing is open: the font file. resources/fonts/terminal-8x16.bin is not in this PR yet. The pictures use a trial font taken from the test machine, which lacks five block characters. The maintainer is choosing which complete font ships. Without the file the viewer works in the skin's own text box, with NFO art written in plain characters. The pictures will be taken again with the font that ships.

Changes

flowchart TD
    key([Left or Right on a release]) --> kept{Anything kept<br/>for this release?}
    kept -- yes --> show[Show it at once]
    kept -- no --> any{Does any listing<br/>offer an NFO or MediaInfo?}
    any -- no --> none([Notification: nothing to show])
    any -- yes --> wait[Open the window<br/>and say who is being asked]
    show --> ask
    wait --> ask[Ask each indexer not asked yet<br/>its MediaInfo, its NFO]
    ask --> check{About this release?}
    check -- yes --> keep[Keep the text<br/>per release and indexer]
    check -- no or none --> skip[Remember that this indexer<br/>has nothing for it]
    keep --> tabs[Identical texts become one tab<br/>naming every indexer]
    skip --> tabs
    tabs --> draw([Draw the tabs again])

    classDef stage fill:#151520,stroke:#4A9EFF,color:#FFFFFF
    classDef endpoint fill:#1E1E2E,stroke:#34D399,color:#FFFFFF
    classDef halt fill:#1E1E2E,stroke:#FBBF24,color:#FFFFFF
    class show,wait,ask,keep,tabs stage
    class key,draw endpoint
    class none,skip,kept,any,check halt
Loading

New modules:

Module What it does
release_docs.py Keeps the NFO and MediaInfo text per release and indexer (newest 400 releases), remembers an indexer that had nothing, and puts identical texts into one tab. No link or key is kept.
doc_fetch.py Asks every indexer that lists the release, once, when the viewer opens. A refusing indexer is paused for a day, as in the search. Also tells the picker which tags a row gets, from an in-memory index.
doc_attributes.py What a text says of the release, each attribute marked as confirming the name or as new.
mediainfo_text.py A MediaInfo XML report as MediaInfo-style text. The uploader's folder is not shown.
text_image.py Draws text pages and the attribute row to indexed PNGs with an 8x16 font, at an integer scale chosen for the screen. Pure Python.
nfo_viewer.py, nfo-viewer.xml The window: tabs, pages, keys.
picker_colors.py The picker's resolution and source colors, shared with the viewer.

Changes to existing code:

  • nfo_audio.py keeps the texts it already reads during the search, so the viewer opens on them without a request. Ranking is unchanged.
  • results_dialog.py and results-dialog.xml: Left and Right open the viewer; a row's tags (HYBRID, REPACK, NFO, MEDIAINFO) share one label under the name in both views.
  • Fix found while testing in Kodi: the picker's list could miss the keyboard focus. Kodi shows the active view's list one frame after the view is set; a short result list was built before that frame, the hidden list refused the focus, and no key reached it. The focus is now asked for until the list has it.
  • A listing named without a release group keeps an NFO that names the same film, for the viewer only. Its audio is still not used for ranking.

Two choices that differ from the approved mockup:

  • NFO is yellow, not orange: REPACK already uses that orange and the two sit side by side.
  • In the plain List view the tags also share one label. A separate tag label beside the size column made Kodi clip the size.

Testing

  • just test passes: 5,162 tests. One test in the grouping branch, test_failed_history_read_leaves_the_snapshot_unknown, failed once in a full run and passes alone and on three re-runs of its file.
  • just lint passes
  • Tested in Kodi: a test Kodi (Estuary, 1920x1080) with stand-in NZBHydra2 and nine stand-in indexers. Both picker views, the viewer with the trial font and without a font, paging, tab changes, the slow indexer arriving late, and that no key appears in the log.
  • Updated README.md, CHANGELOG.md, and docs-site/ (new page features/nfo-viewer.md, built with just docs and checked in a browser, including the chart)

Not tested: a 4K or 720p Kodi screen (the page size for those is covered by unit tests only), and the Bingie skin.

The picker's viewer will show a release's NFO and MediaInfo. This adds
what it is built on: the text kept per release and indexer, identical
texts put together, what a text says beside the listing's name, a reader
that asks every indexer listing the release, a MediaInfo report as
text, and a renderer that draws text with a fixed terminal font.
Left or Right on a release opens a viewer over the list. It has one tab
per unique text, naming every indexer that carries it, the text drawn
with the add-on's own terminal font and paged for the screen it is on,
and under it what the text says of the release, each attribute marked
as confirming the listing's name or as new.

The picker's rows carry NFO and MEDIAINFO tags for what there is to
open, and the footer lists the shortcut. In List compacted the tags,
HYBRID and REPACK share one label, since that row has no room for
another column.
… listing's NFO

Found by running the viewer in Kodi:

The active view's list is shown one frame after the view is set. A short
list is built before that frame, the list then refuses the focus, and no
key reaches it. The focus is now asked for until the list has it.

A listing named without a release group whose NFO names the same film
is shown in the viewer, with what the NFO adds marked as new. Its audio
is still not used for ranking.

The image of a text's attributes is named by what it shows: Kodi keeps
a drawn image by its path, and showed another release's marks.
In the plain List view a tag label beside the size column clipped the
size in Kodi. The tags now share one label under the name, as they do
in List compacted, where Kodi draws them right.

Without the add-on's font, NFO art is written with plain characters:
skin fonts lack the box and block characters and Kodi drew an empty
box for each.
A docs page with screenshots, a recording and a chart of where the
texts come from; changelog entries; links from the features overview
and the filtering page.

When texts arrive after the window opened, the first tab is shown,
unless a key already changed the tab or the page.

The pictures use a trial font and are to be taken again with the font
that ships.
@xbmc4lyfe xbmc4lyfe self-assigned this Nov 16, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T12:59:04.305524Z
We couldn’t complete this review. Comment @codex review to try again.
03c893d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@xbmc4lyfe

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

- A MediaInfo report with NaN or an infinite number raised out of the
  viewer every time it opened on that release. Such a value is now
  written as it came, and a report that cannot be laid out is shown as
  it was kept.
- Closing the viewer and opening it again while indexers were still
  answering asked them again. A request in hand is now known, and not
  sent twice.
- The viewer gave up after eight seconds and never showed an answer
  that came later. It now draws the tabs again as each indexer answers,
  and waits for all of them.
- The store's index is made again from the files when it cannot be
  read, takes in what another run of the add-on kept, and only ever
  removes files that carry its own kind of name.
- A reply that repeats the request's key is kept without it.
- The index merge lets the newer entry win and drops entries whose file
  is gone, so another run's update is not lost or its file removed.
- A request thread starts while it is registered, so it is never seen
  as finished before it began.
- A drawing failure in the viewer is logged instead of escaping Kodi's
  callback.
- An echoed apikey is removed however short it is.
@xbmc4lyfe
xbmc4lyfe merged commit 793a9cf into grouping-release-index Nov 16, 2026
3 checks passed
@xbmc4lyfe
xbmc4lyfe deleted the nfo-mediainfo-viewer branch November 16, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant