diff --git a/components/ItemGrid/MovieLibraryView.bs b/components/ItemGrid/MovieLibraryView.bs index 68e131e2c..5b0ea0433 100644 --- a/components/ItemGrid/MovieLibraryView.bs +++ b/components/ItemGrid/MovieLibraryView.bs @@ -1,6 +1,7 @@ import "pkg:/source/api/baserequest.bs" import "pkg:/source/api/Image.bs" import "pkg:/source/enums/ColorPalette.bs" +import "pkg:/source/enums/ItemType.bs" import "pkg:/source/enums/String.bs" import "pkg:/source/utils/config.bs" import "pkg:/source/utils/deviceCapabilities.bs" @@ -184,6 +185,11 @@ sub loadInitialItems() m.loadItemsTask.itemId = m.top.parentItem.Id end if + if isStringEqual(getCollectionType(), ItemType.BOXSET) + m.loadItemsTask.itemType = "Movie" + m.loadItemsTask.itemId = m.top.parentItem.Id + end if + ' By default we load movies m.loadItemsTask.studioIds = "" m.loadItemsTask.view = "Movies" @@ -248,6 +254,13 @@ sub setMoviesOptions(options) { "Title": tr("Genres"), "Name": "Genres" } ] + if isStringEqual(getCollectionType(), ItemType.BOXSET) + options.views = [ + { "Title": tr("Movies (Presentation)"), "Name": "Movies" }, + { "Title": tr("Movies (Grid)"), "Name": "MoviesGrid" }, + ] + end if + if m.top.parentItem.json.type = "Genre" options.views = [ { "Title": tr("Movies (Presentation)"), "Name": "Movies" }, diff --git a/components/config/ConfigList.bs b/components/config/ConfigList.bs index c5bb21648..727c58bda 100644 --- a/components/config/ConfigList.bs +++ b/components/config/ConfigList.bs @@ -12,9 +12,6 @@ sub init() m.top.itemSpacing = [0, 25] m.top.setfocus(true) - group = m.global.sceneManager.callFunc("getActiveScene") - group.lastFocus = m.top - end sub sub setData() diff --git a/components/config/LoginScene.bs b/components/config/LoginScene.bs index 3a7e3708f..2b0cdf969 100644 --- a/components/config/LoginScene.bs +++ b/components/config/LoginScene.bs @@ -2,8 +2,6 @@ import "pkg:/source/utils/misc.bs" sub init() m.top.setFocus(true) - group = m.global.sceneManager.callFunc("getActiveScene") - group.lastFocus = m.top m.top.optionsAvailable = false end sub diff --git a/components/config/SetServerScreen.bs b/components/config/SetServerScreen.bs index 10d2fc98a..449cdcfb6 100644 --- a/components/config/SetServerScreen.bs +++ b/components/config/SetServerScreen.bs @@ -7,8 +7,6 @@ import "pkg:/source/utils/misc.bs" sub init() m.top.optionsAvailable = false m.top.setFocus(true) - group = m.global.sceneManager.callFunc("getActiveScene") - group.lastFocus = m.top m.serverPicker = m.top.findNode("serverPicker") m.serverUrlTextbox = m.top.findNode("serverUrlTextbox") diff --git a/source/Main.bs b/source/Main.bs index 909a4300b..cf1ec81bd 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -97,18 +97,26 @@ sub Main (args as dynamic) as void end if end for + ' Bypass What's New popup if server is Jellyfin demo + if isStringEqual(m.global.session.server.url, "https://demo.jellyfin.org/stable") + set_user_setting("LastRunVersion", m.global.app.version) + end if + ' Bypass What's New popup if deep linking arguments were passed if not isValidAndNotEmpty(args.mediaType) or not isValidAndNotEmpty(args.contentId) - usersLastRunVersion = m.global.session.user.settings.lastRunVersion - ' has the current user ran this version before? - if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) - set_user_setting("LastRunVersion", m.global.app.version) - ' show what's new popup - if m.global.session.user.settings["load.allowwhatsnew"] - dialog = createObject("roSGNode", "WhatsNewDialog") - m.scene.dialog = dialog - m.scene.dialog.observeField("buttonSelected", m.port) - end if + set_user_setting("LastRunVersion", m.global.app.version) + end if + + ' Bypass What's New popup if deep linking arguments were passed + usersLastRunVersion = m.global.session.user.settings.lastRunVersion + ' has the current user ran this version before? + if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) + set_user_setting("LastRunVersion", m.global.app.version) + ' show what's new popup + if m.global.session.user.settings["load.allowwhatsnew"] + dialog = createObject("roSGNode", "WhatsNewDialog") + m.scene.dialog = dialog + m.scene.dialog.observeField("buttonSelected", m.port) end if end if @@ -369,6 +377,9 @@ sub Main (args as dynamic) as void group = CreateItemGrid(selectedItem) end if sceneManager.callFunc("pushScene", group) + else if selectedItemType = "boxset" + group = CreateMovieLibraryView(selectedItem) + sceneManager.callFunc("pushScene", group) else if selectedItemType = "folder" and selectedItem.json.type = "genre" ' User clicked on a genre folder if selectedItem.json.MovieCount > 0 @@ -380,7 +391,7 @@ sub Main (args as dynamic) as void else if selectedItemType = "folder" and LCase(type(selectedItem.json.type)) = "rostring" and LCase(selectedItem.json.type) = "musicgenre" group = CreateMusicLibraryView(selectedItem) sceneManager.callFunc("pushScene", group) - else if selectedItemType = "userview" or selectedItemType = "folder" or selectedItemType = "channel" or selectedItemType = "boxset" + else if selectedItemType = "userview" or selectedItemType = "folder" or selectedItemType = "channel" group = CreateItemGrid(selectedItem) sceneManager.callFunc("pushScene", group) else if selectedItemType = "episode" or selectedItemType = "recording" diff --git a/source/static/whatsNew/1.0.8.json b/source/static/whatsNew/1.0.8.json index 0370864fa..6c810e602 100644 --- a/source/static/whatsNew/1.0.8.json +++ b/source/static/whatsNew/1.0.8.json @@ -22,5 +22,9 @@ { "description": "Improve look of overflow description popups", "author": "1hitsong" + }, + { + "description": "Use movie library view for boxset content", + "author": "1hitsong" } ] \ No newline at end of file