Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/77c73e241fe1705528e3ffbb42f074c46240b9fb?style=unified&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
15 additions and
4 deletions
@ -329,13 +329,17 @@ namespace Emby.Server.Implementations.Session
}
/// <inheritdoc />
public void CloseIfNeeded ( SessionInfo session )
public async Task CloseIfNeededAsync ( SessionInfo session )
{
if ( ! session . SessionControllers . Any ( i = > i . IsSessionActive ) )
{
var key = GetSessionKey ( session . Client , session . DeviceId ) ;
_activeConnections . TryRemove ( key , out _ ) ;
if ( ! string . IsNullOrEmpty ( session . PlayState ? . LiveStreamId ) )
{
await _mediaSourceManager . CloseLiveStream ( session . PlayState . LiveStreamId ) . ConfigureAwait ( false ) ;
}
OnSessionEnded ( session ) ;
}
@ -413,6 +417,7 @@ namespace Emby.Server.Implementations.Session
session . PlayState . IsPaused = info . IsPaused ;
session . PlayState . PositionTicks = info . PositionTicks ;
session . PlayState . MediaSourceId = info . MediaSourceId ;
session . PlayState . LiveStreamId = info . LiveStreamId ;
session . PlayState . CanSeek = info . CanSeek ;
session . PlayState . IsMuted = info . IsMuted ;
session . PlayState . VolumeLevel = info . VolumeLevel ;
@ -53,13 +53,13 @@ namespace Emby.Server.Implementations.Session
connection . Closed + = OnConnectionClosed ;
}
private void OnConnectionClosed ( object? sender , EventArgs e )
private async void OnConnectionClosed ( object? sender , EventArgs e )
{
var connection = sender as IWebSocketConnection ? ? throw new ArgumentException ( $"{nameof(sender)} is not of type {nameof(IWebSocketConnection)}" , nameof ( sender ) ) ;
_logger . LogDebug ( "Removing websocket from session {Session}" , _session . Id ) ;
_sockets . Remove ( connection ) ;
connection . Closed - = OnConnectionClosed ;
_sessionManager . CloseIfNeeded ( _session ) ;
await _sessionManager . CloseIfNeeded Async ( _session ) . ConfigureAwait ( false ) ;
}
/// <inheritdoc />
@ -352,6 +352,6 @@ namespace MediaBrowser.Controller.Session
/// <returns>Task.</returns>
Task RevokeUserTokens ( Guid userId , string currentAccessToken ) ;
void CloseIfNeeded ( SessionInfo session ) ;
Task CloseIfNeededAsync ( SessionInfo session ) ;
}
}
@ -64,5 +64,11 @@ namespace MediaBrowser.Model.Session
/// </summary>
/// <value>The repeat mode.</value>
public RepeatMode RepeatMode { get ; set ; }
/// <summary>
/// Gets or sets the now playing live stream identifier.
/// </summary>
/// <value>The live stream identifier.</value>
public string LiveStreamId { get ; set ; }
}
}