m0ngr31 / EPlusTV

Virtual linear channels for ESPN, ESPN+, Gotham Sports, NFL+, B1G+, NESN, Mountain West, FloSports, Paramount+, CBS Sports, MLB.tv, and FOX Sports
MIT License
144 stars 24 forks source link

Enhancement - Sort playlist by bandwidth/resolution (decreasing) #111

Closed nlhintz closed 1 month ago

nlhintz commented 1 month ago

The EMBY implementation for IPTV currently only accesses the first stream in the playlist. The ESPN+ channels that have multiple streams seem to have the lowest bandwidth/resolution stream listed first in the playlist, so EMBY always plays the lowest bandwidth/resolution stream. Are there any downsides to sorting the playlist by bandwidth so the highest bandwidth stream is first in the playlist (maybe enable this behavior based on an environment variable)? I've been using the patch included below for a while, and it seems to work as expected.

Nathan

`diff --git a/services/playlist-handler.ts b/services/playlist-handler.ts index 902c184..1f1c547 100644 --- a/services/playlist-handler.ts +++ b/services/playlist-handler.ts @@ -129,10 +129,21 @@ export class PlaylistHandler { const urlParams = this.network === 'foxsports' ? new URL(realManifestUrl).search : '';

   const clonedManifest = updateVersion(manifest);
nlhintz commented 1 month ago

Sorry for the formatting, GitHub reformatted my code block, and I couldn't attach the patch file directly. I've included the patch in the ".zip" file that's attached.

playlist-handler.zip

m0ngr31 commented 1 month ago

Okay, going live with this in v3.2.4

nlhintz commented 1 month ago

@m0ngr31 Thank you!