|
4 | 4 |
|
5 | 5 | ' Returns the primary display title for a row item. |
6 | 6 | ' |
7 | | -' - Season: returns the series name (stored in subtitle by the transformer) |
8 | | -' - Episode: returns the series name (item.seriesName) |
| 7 | +' - Season: returns the season label (item.name, e.g. "Season 1") |
| 8 | +' - Episode: returns the episode code and title (item.subtitle, e.g. "S1E2 - Pilot") |
9 | 9 | ' - All others: returns item.name |
10 | 10 | ' |
11 | 11 | ' @param item - JellyfinBaseItem content node |
12 | 12 | ' @returns Display title string, or "" if item is invalid |
13 | 13 | function getRowItemTitle(item as object) as string |
14 | 14 | if not isValid(item) then return "" |
15 | 15 |
|
16 | | - ' Season: transformer stores seriesName in subtitle for primary display |
| 16 | + ' Season: item.name is the season label; subtitle holds seriesName (shown as secondary text) |
17 | 17 | if item.type = "Season" |
18 | | - return item.subtitle |
| 18 | + return item.name |
19 | 19 | end if |
20 | 20 |
|
21 | | - ' Episode: show the series name as the headline (episode title goes in subtitle) |
| 21 | + ' Episode: subtitle holds the pre-computed episode code + title ("S1E2 - Name"); |
| 22 | + ' seriesName provides context and is shown as secondary text below. |
22 | 23 | if item.type = "Episode" |
23 | | - return item.seriesName |
| 24 | + return item.subtitle |
24 | 25 | end if |
25 | 26 |
|
26 | 27 | return item.name |
27 | 28 | end function |
28 | 29 |
|
29 | 30 | ' Returns the secondary display subtitle for a row item. |
30 | 31 | ' |
31 | | -' - Season: returns the season label ("Season 1", "Season 2", etc.) from item.name |
| 32 | +' - Season: returns the series name (stored in item.subtitle by the transformer) |
| 33 | +' - Episode: returns the series name (item.seriesName) |
32 | 34 | ' - All others: returns the pre-computed subtitle field |
33 | | -' (e.g., "2024 • PG-13" for Movie, "S1E2 - Title" for Episode, "2020 - Present" for Series) |
| 35 | +' (e.g., "2024 • PG-13" for Movie, "2020 - Present" for Series) |
34 | 36 | ' |
35 | 37 | ' @param item - JellyfinBaseItem content node |
36 | 38 | ' @returns Display subtitle string, or "" if item is invalid |
37 | 39 | function getRowItemSubtitle(item as object) as string |
38 | 40 | if not isValid(item) then return "" |
39 | 41 |
|
40 | | - ' Season: name holds "Season 1", subtitle holds seriesName (used as the title) |
| 42 | + ' Season: subtitle field holds the series name; name holds "Season N" (shown as title) |
41 | 43 | if item.type = "Season" |
42 | | - return item.name |
| 44 | + return item.subtitle |
| 45 | + end if |
| 46 | + |
| 47 | + ' Episode: series name provides context for the episode code+title shown above |
| 48 | + if item.type = "Episode" |
| 49 | + return item.seriesName |
43 | 50 | end if |
44 | 51 |
|
45 | 52 | return item.subtitle |
|
0 commit comments