Merge branch 'unstable' into Add-Loading-ux-to-movies-details-screen

This commit is contained in:
candry7731 2023-02-11 12:59:11 -06:00 committed by GitHub
commit c6a525fe47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 605 additions and 23 deletions

View File

@ -19,6 +19,7 @@ sub init()
m.nextEpisodeButton = m.top.findNode("nextEpisode")
m.nextEpisodeButton.text = tr("Next Episode")
m.nextEpisodeButton.setFocus(false)
m.nextupbuttonseconds = get_user_setting("playback.nextupbuttonseconds", "30")
m.showNextEpisodeButtonAnimation = m.top.findNode("showNextEpisodeButton")
m.hideNextEpisodeButtonAnimation = m.top.findNode("hideNextEpisodeButton")
@ -64,7 +65,11 @@ end sub
'
'Update count down text
sub updateCount()
m.nextEpisodeButton.text = tr("Next Episode") + " " + Int(m.top.runTime - m.top.position).toStr()
nextEpisodeCountdown = Int(m.top.runTime - m.top.position)
if nextEpisodeCountdown < 0
nextEpisodeCountdown = 0
end if
m.nextEpisodeButton.text = tr("Next Episode") + " " + nextEpisodeCountdown.toStr()
end sub
'
@ -77,7 +82,13 @@ end sub
' Checks if we need to display the Next Episode button
sub checkTimeToDisplayNextEpisode()
if int(m.top.position) >= (m.top.runTime - 30)
nextEpisodeCountdown = Int(m.top.runTime - m.top.position)
if nextEpisodeCountdown < 0
hideNextEpisodeButton()
return
end if
if int(m.top.position) >= (m.top.runTime - Val(m.nextupbuttonseconds))
showNextEpisodeButton()
updateCount()
return
@ -112,11 +123,10 @@ sub onState(msg)
m.top.retryWithTranscoding = true ' If playback was not reported, retry with transcoding
else
' If an error was encountered, Display dialog
dialog = createObject("roSGNode", "Dialog")
dialog = createObject("roSGNode", "PlaybackDialog")
dialog.title = tr("Error During Playback")
dialog.buttons = [tr("OK")]
dialog.message = tr("An error was encountered while playing this item.")
dialog.observeField("buttonSelected", "dialogClosed")
m.top.getScene().dialog = dialog
end if
@ -197,11 +207,10 @@ sub bufferCheck(msg)
m.top.callFunc("refresh")
else
' If buffering has stopped Display dialog
dialog = createObject("roSGNode", "Dialog")
dialog = createObject("roSGNode", "PlaybackDialog")
dialog.title = tr("Error Retrieving Content")
dialog.buttons = [tr("OK")]
dialog.message = tr("There was an error retrieving the data for this item from the server.")
dialog.observeField("buttonSelected", "dialogClosed")
m.top.getScene().dialog = dialog
' Stop playback and exit player
@ -212,14 +221,6 @@ sub bufferCheck(msg)
end sub
'
' Clean up on Dialog Closed
sub dialogClosed(msg)
sourceNode = msg.getRoSGNode()
sourceNode.unobserveField("buttonSelected")
sourceNode.close = true
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if key = "OK" and m.nextEpisodeButton.hasfocus() and not m.top.trickPlayBar.visible

View File

@ -0,0 +1,9 @@
function onKeyEvent(key as string, press as boolean) as boolean
if key = "OK"
m.top.close = true
return true
end if
return false
end function

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- A PlaybackDialog is a regular dialog, except it takes key releases -->
<!-- instead of presses so that key releases don't fall into other listeners -->
<component name="PlaybackDialog" extends="Dialog">
<script type="text/brightscript" uri="PlaybackDialog.brs" />
</component>

View File

@ -9866,5 +9866,88 @@
<translation>Einstellungen für die Startseite.</translation>
<extracomment>Description for Home Page user settings.</extracomment>
</message>
<message>
<source>Sign Out</source>
<translation>Abmelden</translation>
</message>
<message>
<source>Delete Saved</source>
<translation>Löschen</translation>
</message>
<message>
<source>Error During Playback</source>
<translation>Fehler bei der wiedergabe</translation>
<extracomment>Dialog title when error occurs during playback</extracomment>
</message>
<message>
<source>There was an error retrieving the data for this item from the server.</source>
<translation>Fehler beim laden der Daten vom Server</translation>
<extracomment>Dialog detail when unable to load Content from Server</extracomment>
</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>Dieses %1 hat keine Inhalte</translation>
</message>
<message>
<source>RUNTIME</source>
<translation>Laufzeit</translation>
</message>
<message>
<source>An error was encountered while playing this item.</source>
<translation>Beim Abspielen ist ein Fehler aufgetreten.</translation>
<extracomment>Dialog detail when error occurs during playback</extracomment>
</message>
<message>
<source>Save Credentials?</source>
<translation>Schlüssel speichern?</translation>
</message>
<message>
<source>Error Retrieving Content</source>
<translation>Fehler beim laden des Inhalts</translation>
<extracomment>Dialog title when unable to load Content from Server</extracomment>
</message>
<message>
<comment>Title of Tab for switching &quot;views&quot; when looking at a library</comment>
<source>TAB_VIEW</source>
<translation>Ansicht</translation>
</message>
<message>
<source>RELEASE_DATE</source>
<translation>Veröffentlichungsdatum</translation>
</message>
<message>
<source>Change Server</source>
<translation>Server wechseln</translation>
</message>
<message>
<comment>Name or Title field of media item</comment>
<source>TITLE</source>
<translation>Name</translation>
</message>
<message>
<source>CRITIC_RATING</source>
<translation>Kritiker Bewertung</translation>
</message>
<message>
<source>OFFICIAL_RATING</source>
<translation>Altersfreigabe</translation>
</message>
<message>
<source>IMDB_RATING</source>
<translation>IMDb Bewertung</translation>
</message>
<message>
<source>PLAY_COUNT</source>
<translation>Wiedergabeanzahl</translation>
</message>
<message>
<source>DATE_PLAYED</source>
<translation>Zuletzt abgespielt</translation>
</message>
<message>
<source>DATE_ADDED</source>
<translation>Datum</translation>
</message>
</context>
</TS>

View File

@ -3103,5 +3103,111 @@
<source>Record Series</source>
<translation>Record Series</translation>
</message>
<message>
<source>Delete Saved</source>
<translation>Delete Saved</translation>
</message>
<message>
<source>Save Credentials?</source>
<translation>Save Credentials?</translation>
</message>
<message>
<source>On Now</source>
<translation>On Now</translation>
</message>
<message>
<source>TV Shows</source>
<translation>TV Shows</translation>
</message>
<message>
<source>Died</source>
<translation>Died</translation>
</message>
<message>
<source>More Like This</source>
<translation>More Like This</translation>
</message>
<message>
<source>Additional Parts</source>
<translation>Additional Parts</translation>
<extracomment>Additional parts of a video</extracomment>
</message>
<message>
<source>Delete Saved</source>
<translation>Delete Saved</translation>
</message>
<message>
<source>Born</source>
<translation>Born</translation>
</message>
<message>
<source>Special Features</source>
<translation>Special Features</translation>
</message>
<message>
<source>Save Credentials?</source>
<translation>Save Credentials?</translation>
</message>
<message>
<source>Press &apos;OK&apos; to Close</source>
<translation>Press &apos;OK&apos; to Close</translation>
</message>
<message>
<source>Cast &amp; Crew</source>
<translation>Cast &amp; Crew</translation>
</message>
<message>
<source>Age</source>
<translation>Age</translation>
</message>
<message>
<source>Pick a Jellyfin server from the local network</source>
<translation>Select an available Jellyfin server from your local network:</translation>
<extracomment>Instructions on initial app launch when the user is asked to pick a server from a list</extracomment>
</message>
<message>
<source>Record</source>
<translation>Record</translation>
</message>
<message>
<source>Cancel Series Recording</source>
<translation>Cancel Series Recording</translation>
</message>
<message>
<source>Close</source>
<translation>Close</translation>
</message>
<message>
<source>Unknown</source>
<translation>Unknown</translation>
<extracomment>Title for a cast member for which we have no information for</extracomment>
</message>
<message>
<source>Enter the server name or IP address</source>
<translation>Enter the server name or IP address</translation>
<extracomment>Title of KeyboardDialog when manually entering a server URL</extracomment>
</message>
<message>
<source>Cancel Recording</source>
<translation>Cancel Recording</translation>
</message>
<message>
<source>View Channel</source>
<translation>View Channel</translation>
</message>
<message>
<source>...or enter server URL manually:</source>
<translation>If no server is listed above, you may also enter the server URL manually:</translation>
<extracomment>Instructions on initial app launch when the user is asked to manually enter a server URL</extracomment>
</message>
<message>
<source>Error Getting Playback Information</source>
<translation>Error Getting Playback Information</translation>
<extracomment>Dialog Title: Received error from server when trying to get information about the selected item for playback</extracomment>
</message>
<message>
<source>Record Series</source>
<translation>Record Series</translation>
</message>
</context>
</TS>

View File

@ -1103,6 +1103,16 @@
<translation>Loading trailer</translation>
<extracomment>Dialog title in Main.brs</extracomment>
</message>
<message>
<source>Next Episode Button Time</source>
<translation>Next Episode Button Time</translation>
<extracomment>Settings Menu - Title for option</extracomment>
</message>
<message>
<source>Set how many seconds before the end of an episode the Next Episode button should appear. Set to 0 to disable.</source>
<translation>Set how many seconds before the end of an episode the Next Episode button should appear. Set to 0 to disable.</translation>
<extracomment>Settings Menu - Description for option</extracomment>
</message>
</context>
</TS>

View File

@ -2741,5 +2741,327 @@
<translation>Modo Cine</translation>
<extracomment>Settings Menu - Title for option</extracomment>
</message>
<message>
<source>Delete Saved</source>
<translation>Borrar guardado</translation>
</message>
<message>
<source>Died</source>
<translation>Muerto</translation>
</message>
<message>
<source>Change Server</source>
<translation>Cambiar de servidor</translation>
</message>
<message>
<source>Sign Out</source>
<translation>Desconectar</translation>
</message>
<message>
<source>Save Credentials?</source>
<translation>¿Guardar credenciales?</translation>
</message>
<message>
<source>Error During Playback</source>
<translation>Error al reproducir</translation>
<extracomment>Dialog title when error occurs during playback</extracomment>
</message>
<message>
<source>An error was encountered while playing this item.</source>
<translation>Se encontró un error mientras se reproducía este medio</translation>
<extracomment>Dialog detail when error occurs during playback</extracomment>
</message>
<message>
<source>RUNTIME</source>
<translation>Tiempo funcionando</translation>
</message>
<message>
<comment>Title of Tab for switching &quot;views&quot; when looking at a library</comment>
<source>TAB_VIEW</source>
<translation>Visualización</translation>
</message>
<message>
<source>Special Features</source>
<translation>Características especiales</translation>
</message>
<message>
<source>On Now</source>
<translation>Reproduciendo ahora</translation>
</message>
<message>
<source>Error Retrieving Content</source>
<translation>Error al recuperar el contenido desde el servidor</translation>
<extracomment>Dialog title when unable to load Content from Server</extracomment>
</message>
<message>
<source>Born</source>
<translation>Nacido</translation>
</message>
<message>
<source>Loading Channel Data</source>
<translation>Cargando información del canal</translation>
</message>
<message>
<source>Error loading Channel Data</source>
<translation>Error al cargar información del canal</translation>
</message>
<message>
<source>IMDB_RATING</source>
<translation>Valoración de IMDb</translation>
</message>
<message>
<source>DATE_ADDED</source>
<translation>Fecha añadida</translation>
</message>
<message>
<source>DATE_PLAYED</source>
<translation>Fecha de reproducción</translation>
</message>
<message>
<source>OFFICIAL_RATING</source>
<translation>Valoración parental</translation>
</message>
<message>
<source>PLAY_COUNT</source>
<translation>Contador de reproducciones</translation>
</message>
<message>
<source>RELEASE_DATE</source>
<translation>Fecha de lanzamiento</translation>
</message>
<message>
<comment>Title of Tab for options to sort library content</comment>
<source>TAB_SORT</source>
<translation>Ordenar</translation>
</message>
<message>
<comment>Title of Tab for options to filter library content</comment>
<source>TAB_FILTER</source>
<translation>Filtro</translation>
</message>
<message>
<source>Age</source>
<translation>Edad</translation>
</message>
<message>
<source>Cast &amp; Crew</source>
<translation>Actores y personal</translation>
</message>
<message>
<source>More Like This</source>
<translation>Más como este/a</translation>
</message>
<message>
<source>today</source>
<translation>hoy</translation>
<extracomment>Current day</extracomment>
</message>
<message>
<source>Saturday</source>
<translation>Sábado</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Repeat</source>
<translation>Repetir</translation>
<extracomment>If TV Shows has previously been broadcasted</extracomment>
</message>
<message>
<source>Movies (Presentation)</source>
<translation>Películas (presentación)</translation>
</message>
<message>
<source>Movies (Grid)</source>
<translation>Películas (cuadrícula)</translation>
</message>
<message>
<source>TV Shows</source>
<translation>Programas de TV</translation>
</message>
<message>
<source>yesterday</source>
<translation>ayer</translation>
<extracomment>Previous day</extracomment>
</message>
<message>
<source>tomorrow</source>
<translation>mañana</translation>
<extracomment>Next day</extracomment>
</message>
<message>
<source>Thursday</source>
<translation>Jueves</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Friday</source>
<translation>Viernes</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Started at</source>
<translation>Empezado a las</translation>
<extracomment>(Past Tense) For defining time when a program started today (e.g. Started at 08:00) </extracomment>
</message>
<message>
<source>Starts at</source>
<translation>Empieza a las</translation>
<extracomment>(Future Tense) For defining time when a program will start today (e.g. Starts at 08:00) </extracomment>
</message>
<message>
<source>Live</source>
<translation>En vivo</translation>
<extracomment>If TV Show is being broadcast live (not pre-recorded)</extracomment>
</message>
<message>
<source>TV Guide</source>
<translation>Guía de TV</translation>
<extracomment>Menu option for showing Live TV Guide / Schedule</extracomment>
</message>
<message>
<source>Record Series</source>
<translation>Grabar series</translation>
</message>
<message>
<source>Cancel Recording</source>
<translation>Cancelar grabación</translation>
</message>
<message>
<source>Cancel Series Recording</source>
<translation>Cancelar grabación de series</translation>
</message>
<message>
<source>Close</source>
<translation>Cerrar</translation>
</message>
<message>
<source>Connecting to Server</source>
<translation>Conectando al servidor</translation>
<extracomment>Message to display to user while client is attempting to connect to the server</extracomment>
</message>
<message>
<source>Not found</source>
<translation>No se ha encontrado</translation>
<extracomment>Title of message box when the requested content is not found on the server</extracomment>
</message>
<message>
<source>Unknown</source>
<translation>Desconocido</translation>
<extracomment>Title for a cast member for which we have no information for</extracomment>
</message>
<message>
<source>Pick a Jellyfin server from the local network</source>
<translation>Seleccione un servidor Jellyfin disponible en su red local</translation>
<extracomment>Instructions on initial app launch when the user is asked to pick a server from a list</extracomment>
</message>
<message>
<source>Press &apos;OK&apos; to Close</source>
<translation>Pulsa &apos;OK&apos; para cerrar</translation>
</message>
<message>
<source>Additional Parts</source>
<translation>Partes adicionales</translation>
<extracomment>Additional parts of a video</extracomment>
</message>
<message>
<source>Movies</source>
<translation>Películas</translation>
</message>
<message>
<source>Sunday</source>
<translation>Domingo</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Monday</source>
<translation>Lunes</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Tuesday</source>
<translation>Martes</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Wednesday</source>
<translation>Miércoles</translation>
<extracomment>Day of Week</extracomment>
</message>
<message>
<source>Starts</source>
<translation>Empieza</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>Ended at</source>
<translation>Terminado a las</translation>
<extracomment>(Past Tense) For defining time when a program will ended (e.g. Ended at 08:00) </extracomment>
</message>
<message>
<source>Ends at</source>
<translation>Termina a las</translation>
<extracomment>(Past Tense) For defining a day and time when a program ended (e.g. Ended Wednesday, 08:00) </extracomment>
</message>
<message>
<source>Channels</source>
<translation>Canales</translation>
<extracomment>Menu option for showing Live TV Channel List</extracomment>
</message>
<message>
<source>View Channel</source>
<translation>Canal Ver</translation>
</message>
<message>
<source>Record</source>
<translation>Grabar</translation>
</message>
<message>
<source>Started</source>
<translation>Empezado</translation>
<extracomment>(Past Tense) For defining a day and time when a program started (e.g. Started Wednesday, 08:00) </extracomment>
</message>
<message>
<source>There was an error retrieving the data for this item from the server.</source>
<translation>Hubo un error al recuperar la información de este objeto desde el servidor</translation>
<extracomment>Dialog detail when unable to load Content from Server</extracomment>
</message>
<message>
<source>Unable to load Channel Data from the server</source>
<translation>Incapaz de cargar la información del canal desde el servidor</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>Este/a %1 no contiene medios</translation>
</message>
<message>
<comment>Name or Title field of media item</comment>
<source>TITLE</source>
<translation>Nombre</translation>
</message>
<message>
<source>CRITIC_RATING</source>
<translation>Valoración de los críticos</translation>
</message>
<message>
<source>The requested content does not exist on the server</source>
<translation>El contenido solicitado no existe en el servidor</translation>
<extracomment>Content of message box when the requested content is not found on the server</extracomment>
</message>
<message>
<source>Enter the server name or IP address</source>
<translation>Introduce el nombre del servidor o la dirección IP</translation>
<extracomment>Title of KeyboardDialog when manually entering a server URL</extracomment>
</message>
<message>
<source>...or enter server URL manually:</source>
<translation>Si arriba no hay ningún servidor listado, puedes introducir la URL del servidor manualmente:</translation>
<extracomment>Instructions on initial app launch when the user is asked to manually enter a server URL</extracomment>
</message>
<message>
<source>Error Getting Playback Information</source>
<translation>Error obteniendo la información de reproducción</translation>
<extracomment>Dialog Title: Received error from server when trying to get information about the selected item for playback</extracomment>
</message>
</context>
</TS>

View File

@ -5713,5 +5713,32 @@
<source>Transcoding Information</source>
<translation>Informations de transcodage</translation>
</message>
<message>
<source>On Now</source>
<translation>En ce moment</translation>
</message>
<message>
<source>Save Credentials?</source>
<translation>Sauvegarder les informations d&apos;identification?</translation>
</message>
<message>
<source>Error Retrieving Content</source>
<translation>Erreur lors de la récupération du contenu</translation>
<extracomment>Dialog title when unable to load Content from Server</extracomment>
</message>
<message>
<source>There was an error retrieving the data for this item from the server.</source>
<translation>Une erreur s&apos;est produite lors de la récupération des données de cet élément à partir du serveur.</translation>
<extracomment>Dialog detail when unable to load Content from Server</extracomment>
</message>
<message>
<source>Error During Playback</source>
<translation>Erreur lors de la lecture</translation>
<extracomment>Dialog title when error occurs during playback</extracomment>
</message>
<message>
<source>Delete Saved</source>
<translation>Supprimer les valeurs enregistrées</translation>
</message>
</context>
</TS>

View File

@ -3,13 +3,6 @@
"title": "Playback",
"description": "Settings relating to playback and supported codec and media types.",
"children": [
{
"title": "Cinema Mode",
"description": "Cinema Mode brings the theater experience straight to your living room with the ability to play custom intros before the main feature.",
"settingName": "playback.cinemamode",
"type": "bool",
"default": "false"
},
{
"title": "Codec Support",
"description": "Enable or disable Direct Play support for certain codecs",
@ -77,6 +70,20 @@
}
]
},
{
"title": "Cinema Mode",
"description": "Cinema Mode brings the theater experience straight to your living room with the ability to play custom intros before the main feature.",
"settingName": "playback.cinemamode",
"type": "bool",
"default": "false"
},
{
"title": "Next Episode Button Time",
"description": "Set how many seconds before the end of an episode the Next Episode button should appear. Set to 0 to disable.",
"settingName": "playback.nextupbuttonseconds",
"type": "integer",
"default": "30"
},
{
"title": "Text Subtitles Only",
"description": "Only display text subtitles to minimize transcoding.",

View File

@ -525,7 +525,11 @@ sub Main (args as dynamic) as void
else if node.showID = invalid
sceneManager.callFunc("popScene")
else
autoPlayNextEpisode(node.id, node.showID)
if video.errorMsg = ""
autoPlayNextEpisode(node.id, node.showID)
else
sceneManager.callFunc("popScene")
end if
end if
end if
else if type(msg) = "roDeviceInfoEvent"

View File

@ -47,7 +47,9 @@ sub AddVideoContent(video, mediaSourceId, audio_stream_idx = 1, subtitle_idx = -
end if
if m.videotype = "Episode" or m.videotype = "Series"
video.runTime = (meta.json.RunTimeTicks / 10000000.0)
if isValid(meta.json.RunTimeTicks)
video.runTime = (meta.json.RunTimeTicks / 10000000.0)
end if
video.content.contenttype = "episode"
end if

View File

@ -155,6 +155,11 @@ sub LoadUserAbilities(user)
else
set_user_setting("livetv.canrecord", "false")
end if
if user.Policy.EnableContentDeletion = true
set_user_setting("content.candelete", "true")
else
set_user_setting("content.candelete", "false")
end if
end sub
function initQuickConnect()