Merge branch 'master' into feature/637-replay-back

This commit is contained in:
Neil Burrows 2022-06-28 13:10:17 +04:00 committed by GitHub
commit 6d6d95803c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 452 additions and 15 deletions

View File

@ -60,6 +60,17 @@ sub itemContentChanged()
else if itemData.type = "MusicArtist"
m.itemPoster.uri = itemData.PosterUrl
m.itemText.text = itemData.Title
m.itemPoster.height = 290
m.itemPoster.width = 290
m.itemText.translation = [0, m.itemPoster.height + 7]
m.backdrop.height = 290
m.backdrop.width = 290
m.posterText.height = 200
m.posterText.width = 280
else
print "Unhandled Grid Item Type: " + itemData.type
end if

View File

@ -111,6 +111,8 @@ sub loadInitialItems()
else if m.top.parentItem.collectionType = "music"
' Default Settings
m.loadItemsTask.recursive = false
m.itemGrid.itemSize = "[290, 290]"
m.itemGrid.itemSpacing = "[ 0, 20]"
m.loadItemsTask.itemType = "MusicArtist,MusicAlbum"
m.view = get_user_setting("display.music.view")
@ -122,7 +124,6 @@ sub loadInitialItems()
m.loadItemsTask.itemType = "MusicAlbum"
m.loadItemsTask.recursive = true
end if
else if m.top.parentItem.collectionType = "livetv"
m.loadItemsTask.itemType = "LiveTV"

View File

@ -51,8 +51,12 @@ sub itemContentChanged() as void
m.poster = m.top.findNode("poster")
itemData = m.top.itemContent
m.title.text = itemData.title
if itemData.json.lookup("Type") = "Episode" and itemData.json.IndexNumber <> invalid
m.title.text = StrI(itemData.json.IndexNumber) + ". " + m.title.text
else if itemData.json.lookup("Type") = "MusicAlbum"
m.title.font = "font:SmallestSystemFont"
m.staticTitle.font = "font:SmallestSystemFont"
end if
m.staticTitle.text = m.title.text

View File

@ -12,19 +12,19 @@ sub setPoster()
else
if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ImageTags.Primary }
imgParams = { "maxHeight": 440, "maxWidth": 295 }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
imgParams = { "maxHeight": 440 }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 295, "Tag": m.top.json.ParentThumbImageTag }
imgParams = { "maxHeight": 440, "maxWidth": 295 }
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
end if
' Add Backdrop Image
if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
imgParams = { "maxHeight": 720, "maxWidth": 1280 }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if

View File

@ -15,19 +15,19 @@ sub setPoster()
' Add Artist Image
if m.top.json.ImageTags.Primary <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 440, "Tag": m.top.json.ImageTags.Primary }
imgParams = { "maxHeight": 440, "maxWidth": 440 }
m.top.posterURL = ImageURL(m.top.json.id, "Primary", imgParams)
else if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 440, "Tag": m.top.json.BackdropImageTags[0] }
imgParams = { "maxHeight": 440 }
m.top.posterURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
else if m.top.json.ParentThumbImageTag <> invalid and m.top.json.ParentThumbItemId <> invalid
imgParams = { "maxHeight": 440, "maxWidth": 440, "Tag": m.top.json.ParentThumbImageTag }
imgParams = { "maxHeight": 440, "maxWidth": 440 }
m.top.posterURL = ImageURL(m.top.json.ParentThumbItemId, "Thumb", imgParams)
end if
' Add Backdrop Image
if m.top.json.BackdropImageTags[0] <> invalid
imgParams = { "maxHeight": 720, "maxWidth": 1280, "Tag": m.top.json.BackdropImageTags[0] }
imgParams = { "maxHeight": 720, "maxWidth": 1280 }
m.top.backdropURL = ImageURL(m.top.json.id, "Backdrop", imgParams)
end if

View File

@ -11,13 +11,13 @@ sub init()
end sub
sub updateSize()
itemWidth = 200
itemHeight = 320 ' width * 1.5 + text
itemWidth = 250
itemHeight = 250
m.top.visible = true
' size of the whole row
m.top.itemSize = [1700, (itemHeight + 40)]
m.top.itemSize = [1650, 290]
' spacing between rows
m.top.itemSpacing = [0, 0]

View File

@ -2,6 +2,11 @@ sub init()
m.top.optionsAvailable = false
setupMainNode()
' Load background image
m.LoadBackdropImageTask = CreateObject("roSGNode", "LoadItemsTask")
m.LoadBackdropImageTask.itemsToLoad = "backdropImage"
m.backDrop = m.top.findNode("backdrop")
m.artistImage = m.top.findNode("artistImage")
m.dscr = m.top.findNode("overview")
m.dscr.observeField("isTextEllipsized", "onEllipsisChanged")
@ -17,6 +22,11 @@ end sub
sub pageContentChanged()
item = m.top.pageContent
' Use metadata to load backdrop image
m.LoadBackdropImageTask.itemId = item.json.id
m.LoadBackdropImageTask.observeField("content", "onBackdropImageLoaded")
m.LoadBackdropImageTask.control = "RUN"
' Populate scene data
setScreenTitle(item.json)
setPosterImage(item.posterURL)
@ -35,6 +45,23 @@ sub setPosterImage(posterURL)
end if
end sub
sub onBackdropImageLoaded()
data = m.LoadBackdropImageTask.content[0]
m.LoadBackdropImageTask.unobserveField("content")
if isValid(data) and data <> ""
setBackdropImage(data)
end if
end sub
' Add backdrop image to screen
sub setBackdropImage(data)
if isValid(data)
if m.backDrop.uri <> data
m.backDrop.uri = data
end if
end if
end sub
' Populate on screen text variables
sub setOnScreenTextValues(json)
if isValid(json)

View File

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<component name="MusicArtistDetails" extends="JFGroup">
<children>
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[-10]" >
<Poster id="backdrop" opacity=".4" loadDisplayMode="scaleToZoom" width="1920" height="1200" blendColor="#3f3f3f" />
<LayoutGroup id="toplevel" layoutDirection="vert" itemSpacings="[35]" >
<LayoutGroup id="main_group" layoutDirection="horiz" itemSpacings="[15]" >
<Poster id="artistImage" width="450" height="450" />
<Label id="overview" wrap="true" maxLines="8" width="1250" ellipsisText=" ... (Press * to read more)" />
<Label id="overview" wrap="true" maxLines="9" width="1250" ellipsisText=" ... (Press * to read more)" />
</LayoutGroup>
<MusicArtistAlbumRow id="albums" />
<Rectangle id='albumRect' translation="[0, 0]" width="1720" height="325" color="0x00000066">
<MusicArtistAlbumRow id="albums" translation="[35, 10]" rowLabelColor="#999999" rowLabelFont="font:SmallestSystemFont" />
</Rectangle>
</LayoutGroup>
</children>
<interface>

View File

@ -1932,6 +1932,397 @@
<source>Movies</source>
<translation>Filmy</translation>
</message>
<message>
<source>Special Features</source>
<translation>Speciální funkce</translation>
<message>
<source>Press &apos;OK&apos; to Close</source>
<translation>Pro zavření stiskněte &apos;OK&apos;</translation>
</message>
</message>
<message>
<source>More Like This</source>
<translation>Více podobných</translation>
</message>
<message>
<source>Cast &amp; Crew</source>
<translation>Obsazení &amp; štáb</translation>
</message>
<message>
<source>Age</source>
<translation>Věk</translation>
</message>
<message>
<source>Died</source>
<translation>Úmrtí</translation>
</message>
<message>
<source>Born</source>
<translation>Narozen</translation>
</message>
<message>
<comment>Title of Tab for options to filter library content</comment>
<source>TAB_FILTER</source>
<translation>Filtr</translation>
</message>
<message>
<comment>Title of Tab for options to sort library content</comment>
<source>TAB_SORT</source>
<translation>Třídit</translation>
</message>
<message>
<comment>Title of Tab for switching &quot;views&quot; when looking at a library</comment>
<source>TAB_VIEW</source>
<translation>Pohled</translation>
</message>
<message>
<source>RUNTIME</source>
<translation>Délka</translation>
</message>
<message>
<source>RELEASE_DATE</source>
<translation>Datum vydání</translation>
</message>
<message>
<source>PLAY_COUNT</source>
<translation>Počet přehrání</translation>
</message>
<message>
<source>OFFICIAL_RATING</source>
<translation>Rodičovské hodnocení</translation>
</message>
<message>
<source>DATE_PLAYED</source>
<translation>Datum přehrání</translation>
</message>
<message>
<source>DATE_ADDED</source>
<translation>Datum přidání</translation>
</message>
<message>
<source>CRITIC_RATING</source>
<translation>Honocení kritiků</translation>
</message>
<message>
<source>IMDB_RATING</source>
<translation>Hodnocení IMDb</translation>
</message>
<message>
<comment>Name or Title field of media item</comment>
<source>TITLE</source>
<translation>Název</translation>
</message>
<message>
<comment>Message displayed in Item Grid when no item to display. %1 is container type (e.g. Boxset, Collection, Folder, etc)</comment>
<source>NO_ITEMS</source>
<translation>Tato %1 neobsahuje žádné položky</translation>
</message>
<message>
<source>On Now</source>
<translation>Nyní</translation>
</message>
<message>
<source>Delete Saved</source>
<translation>Smazat uložené</translation>
</message>
<message>
<source>Save Credentials?</source>
<translation>Uložit přihlašovací údaje?</translation>
</message>
<message>
<source>Use the replay button to slowly animate to the first item in the folder. (If disabled, The folder will reset to the first item immediately)</source>
<translation>Pro pomalý posung na první položku složky použijte tlačítko pro znovupřehrávání. (Pokud není povoleno, složka se nastaví hned na první položku)</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Return to Top</source>
<translation>Návrat nahoru</translation>
<extracomment>UI -&gt; Media Grid -&gt; Item Title in user setting screen.</extracomment>
</message>
<message>
<source>There was an error authenticating via Quick Connect.</source>
<translation>Při ověřování přes rychlé připojení se vyskytla chyba.</translation>
</message>
<message>
<source>(Dialog will close automatically)</source>
<translation>(Dialog se automaticky zavře)</translation>
</message>
<message>
<source>Here is your Quick Connect code:</source>
<translation>Zde je Váš kód pro rychlé připojení:</translation>
</message>
<message>
<source>Quick Connect</source>
<translation>Rychle připojit</translation>
</message>
<message>
<source>%1 of %2</source>
<translation>%1 z %2</translation>
<extracomment>Item position and count. %1 = current item. %2 = total number of items</extracomment>
</message>
<message>
<source>Go to episode</source>
<translation>Přejít k epizodě</translation>
<extracomment>Continue Watching Popup Menu - Navigate to the Episode Detail Page</extracomment>
</message>
<message>
<source>Go to season</source>
<translation>Přejít k sérii</translation>
<extracomment>Continue Watching Popup Menu - Navigate to the Season Page</extracomment>
</message>
<message>
<source>Go to series</source>
<translation>Přejít k seriálům</translation>
<extracomment>Continue Watching Popup Menu - Navigate to the Series Detail Page</extracomment>
</message>
<message>
<source>Set Watched</source>
<translation>Označit jako shlédnuté</translation>
<extracomment>Button Text - When pressed, marks item as Warched</extracomment>
</message>
<message>
<source>Set Favorite</source>
<translation>Nastavit jako oblíbené</translation>
<extracomment>Button Text - When pressed, sets item as Favorite</extracomment>
</message>
<message>
<source>Show item count in the library, and index of selected item.</source>
<translation>Zobrazit počet položek v knihovně a index vybrané položky.</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Item Count</source>
<translation>Počet položek</translation>
<extracomment>UI -&gt; Media Grid -&gt; Item Count in user setting screen.</extracomment>
</message>
<message>
<source>Always show the titles below the poster images. (If disabled, title will be shown under hilighted item only)</source>
<translation>Vždy zobrazovat názvy pod obrázkem plakátu. (Pokud je vypnuto, název bude zobrazen pouze pod zvýrazněnou položkou)</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Item Titles</source>
<translation>Názvy položek</translation>
<extracomment>UI -&gt; Media Grid -&gt; Item Title in user setting screen.</extracomment>
</message>
<message>
<source>Media Grid Options</source>
<translation>Možnosti mřížky s médii</translation>
</message>
<message>
<source>Media Grid</source>
<translation>Mřížka s médii</translation>
<extracomment>UI -&gt; Media Grid section in user setting screen.</extracomment>
</message>
<message>
<source>User Interface</source>
<translation>Uživatelské prostředí</translation>
<extracomment>Title for User Interface section in user setting screen.</extracomment>
</message>
<message>
<source>Disabled</source>
<translation>Zakázáno</translation>
</message>
<message>
<source>Enabled</source>
<translation>Povoleno</translation>
</message>
<message>
<source>Support direct play of MPEG 2 content (e.g. Live TV). This will prevent transcoding of MPEG 2 content, but uses significantly more bandwidth</source>
<translation>Podpora přímého přehrávání obsahu MPEG 2 (např. živá TV). Tím je sice zabráněno překódování MPEG 2 obsahu, ale je využito větší šířky pásma</translation>
<extracomment>Settings Menu - Description for option</extracomment>
</message>
<message>
<source>MPEG 2 Support</source>
<translation>MPEG 2 podpora</translation>
<extracomment>Settings Menu - Title for option</extracomment>
</message>
<message>
<source>Playback</source>
<translation>Přehrávání</translation>
<extracomment>Title for Playback section in user setting screen.</extracomment>
</message>
<message>
<source>Version</source>
<translation>Verze</translation>
</message>
<message>
<source>An error was encountered while playing this item. Server did not provide required transcoding data.</source>
<translation>Při přehrávání této položky došlo k chybě. Server neposkytl požadovaná data o překódování.</translation>
<extracomment>Content of message box when trying to play an item which requires transcoding, and the server did not provide transcode url</extracomment>
</message>
<message>
<source>Error Getting Playback Information</source>
<translation>Nepodařilo se získat informace o přehrávání</translation>
<extracomment>Dialog Title: Received error from server when trying to get information about the selected item for playback</extracomment>
</message>
<message>
<source>...or enter server URL manually:</source>
<translation>nebo zadejte URL serveru ručně:</translation>
<extracomment>Instructions on initial app launch when the user is asked to manually enter a server URL</extracomment>
</message>
<message>
<source>Pick a Jellyfin server from the local network</source>
<translation>Vyberte server Jellyfin z místní sítě</translation>
<extracomment>Instructions on initial app launch when the user is asked to pick a server from a list</extracomment>
</message>
<message>
<source>Enter the server name or ip address</source>
<translation>Zadejte název nebo IP adresu serveru</translation>
<extracomment>Title of KeyboardDialog when manually entering a server URL</extracomment>
</message>
<message>
<source>The requested content does not exist on the server</source>
<translation>Požadovaný obsah na serveru neexistuje</translation>
<extracomment>Content of message box when the requested content is not found on the server</extracomment>
</message>
<message>
<source>Unknown</source>
<translation>Neznámý</translation>
<extracomment>Title for a cast member for which we have no information for</extracomment>
</message>
<message>
<source>Not found</source>
<translation>Nenalezeno</translation>
<extracomment>Title of message box when the requested content is not found on the server</extracomment>
</message>
<message>
<source>Connecting to Server</source>
<translation>Připojování k serveru</translation>
<extracomment>Message to display to user while client is attempting to connect to the server</extracomment>
</message>
<message>
<source>Close</source>
<translation>Zavřít</translation>
</message>
<message>
<source>Cancel Series Recording</source>
<translation>Zrušit nahrávání řad</translation>
</message>
<message>
<source>Cancel Recording</source>
<translation>Zrušit nahrávání</translation>
</message>
<message>
<source>Record Series</source>
<translation>Nahrávat řady</translation>
</message>
<message>
<source>Record</source>
<translation>Nahrávat</translation>
</message>
<message>
<source>View Channel</source>
<translation>Zobrazit kanál</translation>
</message>
<message>
<source>TV Guide</source>
<translation>Programový průvodce</translation>
<extracomment>Menu option for showing Live TV Guide / Schedule</extracomment>
</message>
<message>
<source>Channels</source>
<translation>Kanály</translation>
<extracomment>Menu option for showing Live TV Channel List</extracomment>
</message>
<message>
<source>Repeat</source>
<translation>Opakovat</translation>
<extracomment>If TV Shows has previously been broadcasted</extracomment>
</message>
<message>
<source>Live</source>
<translation>Živě</translation>
<extracomment>If TV Show is being broadcast live (not pre-recorded)</extracomment>
</message>
<message>
<source>Ends at</source>
<translation>Skončilo v</translation>
<extracomment>(Past Tense) For defining a day and time when a program ended (e.g. Ended Wednesday, 08:00) </extracomment>
</message>
<message>
<source>Ended at</source>
<translation>Skončilo v</translation>
<extracomment>(Past Tense) For defining time when a program will ended (e.g. Ended at 08:00) </extracomment>
</message>
<message>
<source>Starts</source>
<translation>Začíná</translation>
<extracomment>(Future Tense) For defining a day and time when a program will start (e.g. Starts Wednesday, 08:00) </extracomment>
</message>
<message>
<source>Starts at</source>
<translation>Začíná v</translation>
<extracomment>(Future Tense) For defining time when a program will start today (e.g. Starts at 08:00) </extracomment>
</message>
<message>
<source>Started</source>
<translation>Začalo</translation>
<extracomment>(Past Tense) For defining a day and time when a program started (e.g. Started Wednesday, 08:00) </extracomment>
</message>
<message>
<source>Started at</source>
<translation>Začátek v</translation>
<extracomment>(Past Tense) For defining time when a program started today (e.g. Started at 08:00) </extracomment>
</message>
<message>
<source>Saturday</source>
<translation>Sobota</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Friday</source>
<translation>Pátek</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Thursday</source>
<translation>Čtvrtek</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Wednesday</source>
<translation>Středa</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Tuesday</source>
<translation>Úterý</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Monday</source>
<translation>Pondělí</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Sunday</source>
<translation>Neděle</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>tomorrow</source>
<translation>zítra</translation>
<extracomment>Next day</extracomment>
</message>
<message>
<source>yesterday</source>
<translation>včera</translation>
<extracomment>Previous day</extracomment>
</message>
<message>
<source>today</source>
<translation>dnes</translation>
<extracomment>Current day</extracomment>
</message>
<message>
<source>TV Shows</source>
<translation>TV pořady</translation>
</message>
<message>
<source>Movies</source>
<translation>Filmy</translation>
</message>
<message>
<source>Special Features</source>
<translation>Speciální funkce</translation>