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

add more sync indicators

This commit is contained in:
Luke Pulverenti 2015-06-03 11:26:39 -04:00
parent 6e6bf85030
commit 755f6fc79c
8 changed files with 42 additions and 33 deletions

View file

@ -933,7 +933,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
position: absolute; position: absolute;
top: 32px; top: 32px;
right: 29px; right: 29px;
text-align: center;
vertical-align: middle; vertical-align: middle;
} }
@ -953,7 +952,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
color: #fff; color: #fff;
z-index: 4; z-index: 4;
position: absolute; position: absolute;
margin: 5px 0 0 6px; margin: 4px 0 0 6px;
} }
.pie { .pie {
@ -965,7 +964,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
-o-border-radius: 50px; -o-border-radius: 50px;
border-radius: 50px; border-radius: 50px;
clip: rect(0px, 12px, 24px, 0px); clip: rect(0px, 12px, 24px, 0px);
background-color: rgba(31, 31, 31, .8); background-color: rgba(10, 10, 10, .9);
z-index: 2; z-index: 2;
} }
@ -1385,7 +1384,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
.itemsListview .playedIndicator { .itemsListview .playedIndicator {
left: 55px; left: 55px;
top: 2px; top: 2px;
background: rgba(82, 181, 75, .8); }
.itemsListview .syncIndicator, .itemsListview .pieIndicator {
left: 55px;
} }
.listviewImage { .listviewImage {

View file

@ -282,7 +282,7 @@
} }
} }
@media all and (max-width: 1280px) { @media all and (max-width: 1200px) {
/* They can use the left menu */ /* They can use the left menu */
.dashboardEntryHeaderButton { .dashboardEntryHeaderButton {

View file

@ -868,6 +868,8 @@
html += textlines[verticalTextLines] || LibraryBrowser.getRatingHtml(item, false); html += textlines[verticalTextLines] || LibraryBrowser.getRatingHtml(item, false);
html += '</div>'; html += '</div>';
html += LibraryBrowser.getSyncIndicator(item);
if (item.Type == 'Series' || item.Type == 'Season' || item.Type == 'BoxSet' || item.MediaType == 'Video') { if (item.Type == 'Series' || item.Type == 'Season' || item.Type == 'BoxSet' || item.MediaType == 'Video') {
if (item.UserData.UnplayedItemCount) { if (item.UserData.UnplayedItemCount) {
//html += '<span class="ui-li-count">' + item.UserData.UnplayedItemCount + '</span>'; //html += '<span class="ui-li-count">' + item.UserData.UnplayedItemCount + '</span>';

View file

@ -130,44 +130,44 @@
apiClients.push(apiClient); apiClients.push(apiClient);
var existingServer = credentialProvider.credentials().Servers.filter(function (s) { var existingServers = credentialProvider.credentials().Servers.filter(function (s) {
return stringEqualsIgnoreCase(s.ManualAddress, apiClient.serverAddress()); return stringEqualsIgnoreCase(s.ManualAddress, apiClient.serverAddress()) ||
stringEqualsIgnoreCase(s.LocalAddress, apiClient.serverAddress()) ||
stringEqualsIgnoreCase(s.RemoteAddress, apiClient.serverAddress());
})[0]; });
if (existingServer) { var existingServer = existingServers.length ? existingServers[0] : {};
existingServer.DateLastAccessed = new Date().getTime(); existingServer.DateLastAccessed = new Date().getTime();
existingServer.LastConnectionMode = MediaBrowser.ConnectionMode.Manual; existingServer.LastConnectionMode = MediaBrowser.ConnectionMode.Manual;
apiClient.serverInfo(existingServer); existingServer.ManualAddress = apiClient.serverAddress();
} apiClient.serverInfo(existingServer);
Events.on(apiClient, 'authenticated', function (e, result) { Events.on(apiClient, 'authenticated', function (e, result) {
onAuthenticated(this, result, {}, true); onAuthenticated(this, result, {}, true);
}); });
if (!existingServers.length) {
var credentials = credentialProvider.credentials();
credentials.Servers = [existingServer];
credentialProvider.credentials(credentials);
}
Events.trigger(self, 'apiclientcreated', [apiClient]); Events.trigger(self, 'apiclientcreated', [apiClient]);
return apiClient.getPublicSystemInfo().done(function (systemInfo) { if (existingServer.Id) {
return;
}
apiClient.getPublicSystemInfo().done(function (systemInfo) {
var credentials = credentialProvider.credentials(); var credentials = credentialProvider.credentials();
existingServer.Id = systemInfo.Id;
apiClient.serverInfo(existingServer);
var server = credentials.Servers.filter(function (s) { credentials.Servers = [existingServer];
return s.Id == systemInfo.Id;
})[0] || {};
updateServerInfo(server, systemInfo);
server.DateLastAccessed = new Date().getTime();
server.LastConnectionMode = MediaBrowser.ConnectionMode.Manual;
server.ManualAddress = apiClient.serverAddress();
apiClient.serverInfo(server);
credentialProvider.addOrUpdateServer(credentials.Servers, server);
credentialProvider.credentials(credentials); credentialProvider.credentials(credentials);
}); });
}; };

View file

@ -3,12 +3,11 @@
window.FileSystem = { window.FileSystem = {
fileExists: function (path) { fileExists: function (path) {
return false;
return NativeFileSystem.fileExists(path); return NativeFileSystem.fileExists(path);
}, },
translateFilePath: function (path) { translateFilePath: function (path) {
return NativeFileSystem.translateFilePath(path); return 'file://' + NativeFileSystem.translateFilePath(path);
} }
}; };

View file

@ -1,6 +1,12 @@
(function () { (function () {
function getLocalMediaSource(serverId, itemId) { function getLocalMediaSource(serverId, itemId) {
var json = ApiClientBridge.getLocalMediaSource(serverId, itemId);
if (json) {
return JSON.parse(json);
}
return null; return null;
} }

View file

@ -7,7 +7,7 @@
}, },
translateFilePath: function (path) { translateFilePath: function (path) {
return path; return 'file://' + path;
} }
}; };

View file

@ -7,7 +7,7 @@
}, },
translateFilePath: function (path) { translateFilePath: function (path) {
return path; return 'file://' + path;
} }
}; };