Merge branch 'master' into fixes/flickering-items
This commit is contained in:
commit
6b3dbdfaee
|
@ -2,6 +2,8 @@ sub init()
|
|||
|
||||
m.options = m.top.findNode("options")
|
||||
|
||||
m.showItemCount = get_user_setting("itemgrid.showItemCount") = "true"
|
||||
|
||||
m.tvGuide = invalid
|
||||
m.channelFocused = invalid
|
||||
|
||||
|
@ -37,6 +39,9 @@ sub init()
|
|||
m.favorite = "Favorite"
|
||||
|
||||
m.loadItemsTask = createObject("roSGNode", "LoadItemsTask2")
|
||||
|
||||
'set inital counts for overhang before content is loaded.
|
||||
m.loadItemsTask.totalRecordCount = 0
|
||||
m.spinner = m.top.findNode("spinner")
|
||||
m.spinner.visible = true
|
||||
|
||||
|
@ -299,6 +304,9 @@ sub onItemFocused()
|
|||
focusedRow = m.itemGrid.currFocusRow
|
||||
|
||||
itemInt = m.itemGrid.itemFocused
|
||||
|
||||
updateTitle()
|
||||
|
||||
' If no selected item, set background to parent backdrop
|
||||
if itemInt = -1
|
||||
return
|
||||
|
@ -428,7 +436,6 @@ sub optionsClosed()
|
|||
m.filter = m.options.filter
|
||||
updateTitle()
|
||||
reload = true
|
||||
|
||||
'Store filter setting
|
||||
if m.top.parentItem.collectionType = "livetv"
|
||||
set_user_setting("display.livetv.filter", m.options.filter)
|
||||
|
@ -537,11 +544,16 @@ sub updateTitle()
|
|||
if m.filter = "All"
|
||||
m.top.overhangTitle = m.top.parentItem.title
|
||||
else if m.filter = "Favorites"
|
||||
m.top.overhangTitle = m.top.parentItem.title + tr(" (Favorites)")
|
||||
else
|
||||
m.top.overhangTitle = m.top.parentItem.title + tr(" (Filtered)")
|
||||
m.top.overhangTitle = m.top.parentItem.title + " " + tr("(Favorites)")
|
||||
end if
|
||||
|
||||
if m.top.AlphaSelected <> ""
|
||||
m.top.overhangTitle = m.top.parentItem.title + tr(" (Filtered)")
|
||||
m.top.overhangTitle = m.top.parentItem.title + " " + tr("(Filtered)")
|
||||
end if
|
||||
|
||||
actInt = m.itemGrid.itemFocused + 1
|
||||
if m.showItemCount and m.loadItemsTask.totalRecordCount > 0
|
||||
m.top.overhangTitle += " (" + tr("%1 of %2").Replace("%1", actInt.toStr()).Replace("%2", m.loadItemsTask.totalRecordCount.toStr()) + ")"
|
||||
end if
|
||||
|
||||
end sub
|
||||
|
|
|
@ -72,6 +72,10 @@ sub loadItems()
|
|||
tmp = CreateObject("roSGNode", "FolderData")
|
||||
else if item.Type = "Video"
|
||||
tmp = CreateObject("roSGNode", "VideoData")
|
||||
else if item.Type = "Photo"
|
||||
tmp = CreateObject("roSGNode", "PhotoData")
|
||||
else if item.type = "PhotoAlbum"
|
||||
tmp = CreateObject("roSGNode", "FolderData")
|
||||
else
|
||||
print "[LoadItems] Unknown Type: " item.Type
|
||||
end if
|
||||
|
|
|
@ -517,6 +517,16 @@
|
|||
<translation>Always show the titles below the poster images. (If disabled, title will be shown under hilighted item only)</translation>
|
||||
<extracomment>Description for option in Setting Screen</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Item Count</source>
|
||||
<translation>Item Count</translation>
|
||||
<extracomment>UI -> Media Grid -> Item Count in user setting screen.</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show item count in the library, and index of selected item.</source>
|
||||
<translation>Show item count in the library, and index of selected item.</translation>
|
||||
<extracomment>Description for option in Setting Screen</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set Favorite</source>
|
||||
<translation>Set Favorite</translation>
|
||||
|
@ -542,5 +552,10 @@
|
|||
<translation>Go to episode</translation>
|
||||
<extracomment>Continue Watching Popup Menu - Navigate to the Episode Detail Page</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 of %2</source>
|
||||
<translation>%1 of %2</translation>
|
||||
<extracomment>Item position and count. %1 = current item. %2 = total number of items</extracomment>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
|
@ -20,6 +20,13 @@
|
|||
"title": "Media Grid",
|
||||
"description": "Media Grid Options",
|
||||
"children": [
|
||||
{
|
||||
"title": "Item Count",
|
||||
"description": "Show item count in the library, and index of selected item.",
|
||||
"settingName": "itemgrid.showItemCount",
|
||||
"type": "bool",
|
||||
"default": "false"
|
||||
},
|
||||
{
|
||||
"title": "Item Titles",
|
||||
"description": "Always show the titles below the poster images. (If disabled, title will be shown under hilighted item only)",
|
||||
|
|
Loading…
Reference in New Issue
Block a user