Skip to content

feat: smart list rules on date added, series status and seasons; programmes from addon TV listings - #1726

Merged
moodiness merged 2 commits into
mainfrom
feat/smart-rules-guide-listings
Dec 5, 2026
Merged

moodiness merged 2 commits into
mainfrom
feat/smart-rules-guide-listings

Conversation

@moodiness

Copy link
Copy Markdown
Owner

Smart list rules

  • Date added: in the last N days (today included) or between two days, either open (added with max, or from/to as YYYY-MM-DD). The date is the one apps show (see Dates added of catalog titles): the source's own for IPTV sources and local folders, else the day Polyfin first saw the title in a catalog of the user's libraries, else its release date once out. Read for every title of a listing in one query, per user; days in UTC.
  • Series status: continuing or ended. A status the listing gives counts first, else the description's, else the description's run, else the listing's: a closed run (2016-2021) is ended, an open one (2019-) continuing. Movies have none.
  • Number of seasons: the description's seasons with an episode aired, specials aside, counted by the database rather than read episode by episode.
  • Popularity: no rule of its own. Place in its catalog already serves it, and the docs now say it is the popularity of a popular catalog.
  • Admin app: the rule editor offers the three rules, with help notices, in six languages.

Programmes from addon TV listings

  • A TV catalog without Native EPG whose entry gives a start in released or releaseInfo gives that channel one programme. Starts read:
    • ISO 8601 times, with an offset with or without a colon;
    • a time of day with a date, such as 2026-12-05 19:45, 05/12/2026 19:45, 05.12 19h45, 19:45 05/12 or 2026-12-05 7:45 PM, day first for short dates;
    • LIVE, which starts now, to the minute.
  • Times without a zone are in the server's time zone (TZ in Docker), unless they say UTC or GMT, with or without an offset (UTC+1, GMT-5). Another named zone, such as CET, gives no programme.
  • Length: the entry's runtime, else 2 hours (placeholder). A date alone, a year, a time without a date, or a start outside the days the guide reads (yesterday to 7 days ahead) gives none.
  • Shown as Native EPG programmes are: guide, On Now, the channel's programmes and its current programme; kept as items, one identifier per entry. Only when the channel has no XMLTV guide: a channel mapped to an XMLTV guide shows that guide, even in reads a limit cuts.

Checks

  • go test -race of internal/smartlists, and the smart list, guide, live TV, arrivals and listing tests of internal/library, internal/jellyfin, internal/admin, internal/reminders and internal/recordings: pass.
  • The new tests fail without their parts (shown on a scratch copy): TestSmartListRulesOnStatusSeasonsAndDateAdded, TestEventListingsGiveTheirChannelsAProgramme, TestXMLTVProgrammesComeBeforeListings, TestNativeEPGCatalogsTakeNoListingProgramme.
  • golangci-lint (paralleltest, tparallel), staticcheck, gofmt, web typecheck, format:check, npm test, knip, check-docs.mjs: clean.

French screenshots: /Users/admin/.cache/pf-hls/SmartRulesGuide/shots/

Smart lists gain three rules.

- Date added: in the last N days, today included, or between two days,
either open. The date is the one apps show: the source's own for IPTV
sources and local folders, else the day Polyfin first saw the title in a
catalog of the user's libraries, else its release date once out. One
query a listing reads them all. - Series status: continuing or ended, as
the listing says, else the description, else its run: closed (2016-2021)
ended, open (2019-) continuing. - Number of seasons: the seasons of the
description with an episode aired, specials aside, counted by the
database.

The admin app's rule editor offers them in six languages. The docs say
that Place in its catalog is a popular catalog's popularity.
Sports and event addons list each event as an entry of a TV catalog that
takes no date, its start in released or releaseInfo. Such an entry now
gives its channel one programme, shown as a Native EPG one in the guide,
On Now and the channel's programmes, when the channel has no XMLTV
guide: a channel mapped to an XMLTV guide shows that guide.

The start is an ISO time, its offset with or without a colon, or a time
of day with a date, year or day first, on a 24-hour clock or with AM or
PM. It is read in the server's time zone unless UTC or GMT is written,
with or without an offset; another named zone gives none. LIVE starts
now. The length is the entry's runtime, else 2 hours. A date alone, a
year, a time without a date, or a start outside the days the guide reads
gives none.
@moodiness
moodiness marked this pull request as ready for review December 5, 2026 02:58
@moodiness
moodiness merged commit e083ad2 into main Dec 5, 2026
52 checks passed
@moodiness
moodiness deleted the feat/smart-rules-guide-listings branch December 5, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant