Jump to content

"Play next episode automatically" - Customize Timing?


Recommended Posts

Posted

Howdy!

The next episode prompt sometimes pops up before credits roll and can be distracting.  (Usually it pops around 45-48s seconds but some shows have only 30s credits.)  I appreciate this feature, but would rather err on the side of starting a little later.  Is it possible to adjust this?

 

Thanks!

Posted

Hi, what Emby app are you seeing this with?

Posted

2.1.21g app on Android TV (Nvidia Shield)
4.8.10.0 server on Windows

Posted
4 hours ago, bubba_nuts said:

2.1.21g app on Android TV (Nvidia Shield)
4.8.10.0 server on Windows

Hi.  Can you try searching for our standard android app (Just "Emby" on Amazon and "Emby for Android on Google) on the same device's app store and see how that compares?

Thanks.

 

  • 2 weeks later...
bubba_nuts
Posted

I installed Emby for Android 3.4.20 and after enabling "Play next episode automatically" and "Show up next preview", the prompt pops up with about 20s left in the show I tested.

Is this time hardcoded, based on the length of the video file, or something else?  Do the different Emby apps do it differently by design?

Lots of UI nuances between the Android TV and Android versions (when used side by side on my Shield), so I'm not sure I want to switch.

Posted
5 hours ago, bubba_nuts said:

I installed Emby for Android 3.4.20 and after enabling "Play next episode automatically" and "Show up next preview", the prompt pops up with about 20s left in the show I tested.

Is this time hardcoded, based on the length of the video file, or something else?  Do the different Emby apps do it differently by design?

Lots of UI nuances between the Android TV and Android versions (when used side by side on my Shield), so I'm not sure I want to switch.

Hi, yes it is 20 seconds. It is possible that there could be some variation amongst Emby apps. What UI nuances are you referring to?

bubba_nuts
Posted (edited)

This is just from playing with it for a bit today, but here's some observations so far...

  • During video playback, pressing up navigation in the Android TV app goes directly to the chapter select.  With Android app, its down, right, down, and then you can select the chapter.
  • Holding the navigation button on the Android TV app toggles Stats for Nerds.  This popup also has more details in the Android TV app.
  • Skipping music forward and backward is 25 seconds in Android instead of 10 seconds in Android TV.  (Not a big deal, just an observation.)
  • Scrolling right and left (presumably up and down also) in the home screen is about 50% snappier in the Android TV version.

 

Edited by bubba_nuts
Posted
On 1/2/2025 at 11:06 PM, bubba_nuts said:

This is just from playing with it for a bit today, but here's some observations so far...

  • During video playback, pressing up navigation in the Android TV app goes directly to the chapter select.  With Android app, its down, right, down, and then you can select the chapter.
  • Holding the navigation button on the Android TV app toggles Stats for Nerds.  This popup also has more details in the Android TV app.
  • Skipping music forward and backward is 25 seconds in Android instead of 10 seconds in Android TV.  (Not a big deal, just an observation.)
  • Scrolling right and left (presumably up and down also) in the home screen is about 50% snappier in the Android TV version.

 

@bubba_nutshave you explored the playback options in the app?

Quote

Skipping music forward and backward is 25 seconds in

These are configurable.

  • 1 year later...
lolotux
Posted

Sorry Long answer : but solved issue
And it's in French


 

HowTo - Emby Web : bouton Épisode suivant à 96 % de lecture

Version : 04/07/2026

1. Principe

Objectif : afficher le bouton 'Épisode suivant' dans Emby Web quand 96 % de l'épisode est lu.

Ce réglage remplace le comportement natif, qui utilise environ 30/35/40 secondes avant la fin, ou un marqueur CreditsStart quand il existe.

0.96 signifie : déclencher quand il reste 4 % de la durée totale.

Chemin concerné : /opt/emby-server/system/dashboard-ui/videoosd/videoosd.js

Plateforme testée : Debian 12, Emby Web 4.9.5.0.

2. Sauvegarder le fichier

Créer le dossier de sauvegarde puis copier le fichier JavaScript original.

sudo mkdir -p /root/backup_emby_ui
sudo cp -a /opt/emby-server/system/dashboard-ui/videoosd/videoosd.js /root/backup_emby_ui/videoosd.js.BAK_$(date +%Y%m%d_%H%M%S)

3. Appliquer le patch 96 %

Le patch ignore le marqueur CreditsStart, puis remplace le seuil par runtimeTicks*.96.

La commande ci-dessous reste utilisable si le fichier contient encore les valeurs natives 40/35/30 ou un ancien test en 120/120/120.

sudo python3 - <<'PY'
from pathlib import Path
import re

p = Path('/opt/emby-server/system/dashboard-ui/videoosd/videoosd.js')
s = p.read_text()

s = s.replace(
    'creditsInfo=(null==creditsInfo?void 0:creditsInfo.start)||0',
    'creditsInfo=0'
)

pattern = r'runtimeTicks-1e3\*\(fiftyMinuteTicks<=runtimeTicks\?\d+:fortyMinuteTicks<=runtimeTicks\?\d+:\d+\)\*1e4'
s2 = re.sub(pattern, 'runtimeTicks*.96', s, count=1)

if s2 == s and 'runtimeTicks*.96' not in s:
    raise SystemExit('Seuil UpNext non trouvé : vérifier manuellement videoosd.js')

p.write_text(s2)
print('OK patch UpNext 96 pct')
PY

4. Redémarrer Emby

Le redémarrage force Emby à resservir le fichier modifié.

sudo systemctl restart emby-server

5. Vérifier côté serveur

Cette commande contourne le cache navigateur avec un paramètre aléatoire. Le résultat attendu est creditsInfo=0 puis runtimeTicks*.96.

curl -s 'http://debian12:8096/web/videoosd/videoosd.js?check='$(date +%s)   | grep -oE 'creditsInfo=0|runtimeTicks\*\.96|runtimeTicks-1e3\*\(fiftyMinuteTicks<=runtimeTicks\?[0-9]+:fortyMinuteTicks<=runtimeTicks\?[0-9]+:[0-9]+\)\*1e4'

Résultat attendu

creditsInfo=0
runtimeTicks*.96

6. Forcer le cache du navigateur

Piège observé : Chromium peut garder l'ancien videoosd.js pour l'URL versionnée videoosd.js?v=4.9.5.0.

Dans la console du navigateur, sur l'onglet Emby, forcer le rechargement de cette URL exacte. Adapter v= si Emby utilise une autre version.

fetch('/web/videoosd/videoosd.js?v=4.9.5.0', {cache:'reload'})
  .then(r => r.text())
  .then(t => console.log(
    'PCT96=', t.includes('runtimeTicks*.96'),
    'CREDITS0=', t.includes('creditsInfo=0'),
    'HAS_NATIVE=', /fiftyMinuteTicks<=runtimeTicks\?\d+:fortyMinuteTicks<=runtimeTicks\?\d+:\d+/.test(t)
  ));

Résultat attendu dans la console

PCT96= true CREDITS0= true HAS_NATIVE= false

7. Recharger Emby Web

Fermer et rouvrir l'onglet Emby, ou utiliser Ctrl+F5.

Lancer ensuite un épisode et vérifier l'apparition du bouton vers 96 % de lecture.

8. Effet de 0.96 selon la durée

Durée épisode Bouton vers
40 min 1 min 36 restantes
50 min 2 min restantes
60 min 2 min 24 restantes

9. Retour arrière

Restaurer le backup choisi, redémarrer Emby, puis forcer le cache navigateur comme plus haut.

sudo cp -a /root/backup_emby_ui/videoosd.js.BAK_YYYYMMDD_HHMMSS /opt/emby-server/system/dashboard-ui/videoosd/videoosd.js
sudo systemctl restart emby-server

10. Notes importantes

Ne pas supprimer /var/lib/emby/metadata ni /var/lib/emby/cache pour ce sujet : le problème n'était pas la base Emby, mais le JavaScript servi et le cache navigateur.

Une mise à jour Emby peut remplacer videoosd.js. Dans ce cas, refaire la sauvegarde puis réappliquer le patch.

creditsInfo.start correspond au début du générique détecté par Emby via CreditsStart. Le patch creditsInfo=0 force l'utilisation du seuil proportionnel, donc un comportement constant.

lolotux
Posted

Hi,

I found a workaround to change when the “Next Episode / Up Next” prompt appears in Emby Web.

Tested on Emby 4.9.5.0.

File:
 /opt/emby-server/system/dashboard-ui/videoosd/videoosd.js

Original logic uses:
 30 / 35 / 40 seconds before the end,
depending on episode duration.

I changed it to trigger at 96% of playback instead, so the prompt appears when about 4% of the episode remains.

Patch idea:

1. Backup the file.

2. Replace the fallback timing logic:

 runtimeTicks-1e3*(fiftyMinuteTicks<=runtimeTicks?40:fortyMinuteTicks<=runtimeTicks?35:30)*1e4

with:

 runtimeTicks*.96

3. Optional but important:
Emby may use CreditsStart markers when available, so I also forced creditsInfo to 0 in the UpNext calculation to always use the percentage-based trigger.

4. Restart Emby.

5. Clear/reload the browser cache for:
 /web/videoosd/videoosd.js?v=4.9.5.0

In Chromium/Chrome DevTools console:

fetch('/web/videoosd/videoosd.js?v=4.9.5.0', {cache:'reload'})

Important notes:
- This is not an official setting.
- It will probably be overwritten by Emby updates.
- Backup before modifying.
- A proper UI setting would still be much better.

Result:
The UpNext prompt now appears around 96% of the episode instead of the hardcoded 30/35/40 seconds.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...