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

reduce sync db access

This commit is contained in:
Luke Pulverenti 2016-08-03 02:38:19 -04:00
parent ff0882ba79
commit 6ec48ff340
4 changed files with 46 additions and 45 deletions

View file

@ -1067,6 +1067,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var indicatorsHtml = '';
indicatorsHtml += indicators.getSyncIndicator(item);
indicatorsHtml += indicators.getTimerIndicator(item);
if (options.showGroupCount) {

View file

@ -12,6 +12,16 @@
background-color: #52B54B;
}
.indicator {
border-radius: 500px;
display: -ms-flex;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
}
.timerIndicator {
color: #CB272A;
}
@ -48,11 +58,26 @@
height: 28px;
}
.playedIndicatorIcon {
.syncIndicator {
color: #fff;
border-radius: 500px;
padding: 3px;
}
.emptySyncIndicator {
background: #ccc;
color: #333;
}
.fullSyncIndicator {
background: #cc3333;
}
.playedIndicatorIcon, .syncIndicator {
width: 22px;
height: 22px;
font-size: 22px;
}
}
.layout-tv .countIndicator, .layout-tv .playedIndicator {
width: 3.8vh;

View file

@ -100,12 +100,24 @@ define(['css!./indicators.css', 'material-icons'], function () {
return '';
}
function getSyncIndicator(item) {
if (item.SyncPercent == 100) {
return '<i class="md-icon indicator syncIndicator fullSyncIndicator">file_download</i>';
} else if (item.SyncPercent != null) {
return '<i class="md-icon indicator syncIndicator emptySyncIndicator">file_download</i>';
}
return '';
}
return {
getProgressBarHtml: getProgressBarHtml,
getPlayedIndicatorHtml: getPlayedIndicator,
getChildCountIndicatorHtml: getChildCountIndicatorHtml,
enableProgressIndicator: enableProgressIndicator,
getTimerIndicator: getTimerIndicator,
enablePlayedIndicator: enablePlayedIndicator
enablePlayedIndicator: enablePlayedIndicator,
getSyncIndicator: getSyncIndicator
};
});

View file

@ -847,43 +847,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
background: rgba(248, 58, 34, .8);
}
.syncIndicator {
display: block;
position: absolute;
top: 5px;
right: 5px;
text-align: center;
vertical-align: middle;
width: 24px;
height: 24px;
border-radius: 50%;
color: #fff;
line-height: 19px;
background-color: #52B54B;
}
.seriesTimerIndicator {
color: #cc3333;
position: absolute;
top: 5px;
right: 5px;
font-size: 200%;
}
.playedIndicator + .syncIndicator, .countIndicator + .syncIndicator {
top: 32px;
}
.card .playedIndicator, .card .countIndicator {
position: absolute;
top: 5px;
right: 5px;
}
.syncIndicator i {
font-size: 180%;
}
.recordingProgressBar::-moz-progress-bar {
background-color: #cc3333;
}