1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix web socket attachment to session object

This commit is contained in:
Luke Pulverenti 2013-12-26 13:46:38 -05:00
parent d9dac5269d
commit 6e4a7594fc
4 changed files with 13 additions and 5 deletions

View file

@ -618,7 +618,7 @@ form, .readOnlyContent {
}
.tblConnections img {
height: 60px;
height: 54px;
}
.clientNowPlayingImage {

View file

@ -4,7 +4,7 @@
<title>Media Library</title>
</head>
<body>
<div id="librarySettingsPage" data-role="page" class="page type-interior">
<div id="librarySettingsPage" data-role="page" class="page type-interior mediaLibraryPage">
<div data-role="content">
<div class="content-primary">

View file

@ -112,7 +112,9 @@
html += '</td>';
html += '<td class="username">';
html += connection.UserName || '';
if (connection.UserId) {
html += '<a href="useredit.html?userid=' + connection.UserId + '">' + connection.UserName + '</a>';
}
html += '</td>';
var nowPlayingItem = connection.NowPlayingItem;
@ -138,7 +140,11 @@
row.removeClass('deadSession');
$('.username', row).html(session.UserName || '');
if (session.UserId) {
$('.username', row).html('<a href="useredit.html?userid=' + session.UserId + '">' + session.UserName + '</a>').trigger('create');
} else {
$('.username', row).html('');
}
var nowPlayingItem = session.NowPlayingItem;

View file

@ -673,7 +673,7 @@ var Dashboard = {
name: "Media Library",
divider: true,
href: "library.html",
selected: pageElem.id == "mediaLibraryPage" && !getParameterByName('userId')
selected: page.hasClass("mediaLibraryPage")
}, {
name: "Metadata",
href: "metadata.html",
@ -1248,6 +1248,8 @@ $(function () {
// Close the connection gracefully when possible
if (ApiClient.isWebSocketOpen() && !MediaPlayer.isPlaying()) {
console.log('Sending close web socket command');
ApiClient.closeWebSocket();
}
});