Fix network/genre bug from #596

This commit is contained in:
Charles Ewert 2022-07-21 20:06:50 -04:00
parent 04c4dfeb20
commit 0250147f17

View File

@ -94,19 +94,21 @@ sub loadInitialItems()
else else
m.sortAscending = false m.sortAscending = false
end if end if
'Set Stuido Id ' Set Studio Id
if m.top.parentItem.json.type = "Studio" if m.top.parentItem.json.type = "Studio"
m.loadItemsTask.studioIds = m.top.parentItem.Id m.loadItemsTask.studioIds = m.top.parentItem.id
m.loadItemsTask.itemId = m.top.parentItem.parentFolder m.loadItemsTask.itemId = m.top.parentItem.parentFolder
m.loadItemsTask.genreIds = "" m.loadItemsTask.genreIds = ""
'set Genre Id ' Set Genre Id
else if m.top.parentItem.json.type = "Genre" else if m.top.parentItem.json.type = "Genre"
m.loadItemsTask.genreIds = m.top.parentItem.Id m.loadItemsTask.genreIds = m.top.parentItem.id
m.loadItemsTask.itemId = m.top.parentItem.parentFolder m.loadItemsTask.itemId = m.top.parentItem.parentFolder
m.loadItemsTask.studioIds = "" m.loadItemsTask.studioIds = ""
else if (m.view = "Shows" or m.options.view = "Shows") or (m.view = "Movies" or m.options.view = "Movies") else if (m.view = "Shows" or m.options.view = "Shows") or (m.view = "Movies" or m.options.view = "Movies")
m.loadItemsTask.studioIds = "" m.loadItemsTask.studioIds = ""
m.loadItemsTask.genreIds = "" m.loadItemsTask.genreIds = ""
else
m.loadItemsTask.itemId = m.top.parentItem.Id
end if end if
updateTitle() updateTitle()
@ -116,7 +118,6 @@ sub loadInitialItems()
m.loadItemsTask.sortAscending = m.sortAscending m.loadItemsTask.sortAscending = m.sortAscending
m.loadItemsTask.filter = m.filter m.loadItemsTask.filter = m.filter
m.loadItemsTask.startIndex = 0 m.loadItemsTask.startIndex = 0
m.loadItemsTask.itemId = m.top.parentItem.Id
' Load Item Types ' Load Item Types
if m.top.parentItem.collectionType = "movies" if m.top.parentItem.collectionType = "movies"
m.loadItemsTask.itemType = "Movie" m.loadItemsTask.itemType = "Movie"
@ -165,7 +166,7 @@ sub loadInitialItems()
else else
print "[ItemGrid] Unknown Type: " m.top.parentItem print "[ItemGrid] Unknown Type: " m.top.parentItem
end if end if
'end if
if m.top.parentItem.type <> "Folder" and (m.options.view = "Networks" or m.view = "Networks" or m.options.view = "Studios" or m.view = "Studios") if m.top.parentItem.type <> "Folder" and (m.options.view = "Networks" or m.view = "Networks" or m.options.view = "Studios" or m.view = "Studios")
m.loadItemsTask.view = "Networks" m.loadItemsTask.view = "Networks"
m.top.imageDisplayMode = "scaleToFit" m.top.imageDisplayMode = "scaleToFit"