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

show tips on web client home page

This commit is contained in:
Luke Pulverenti 2013-07-23 08:29:28 -04:00
parent 6802a45d77
commit 18c08d74f1
3 changed files with 32 additions and 2 deletions

View file

@ -10,6 +10,7 @@
<table class="ehsContent">
<tr>
<td>
<h1 class="listHeader firstListHeader">Views</h1>
<div id="views">
@ -18,6 +19,8 @@
<h1 class="listHeader"><a href="itemlist.html">Media Collections<img src="css/images/rightarrow.png" style="height: 24px; margin-left: .5em;" /></a></h1>
<div id="divCollections"></div>
<div id="tip" class="ui-bar-e" style="padding: .5em; font-weight: normal; margin: 2em 0; display: none;"></div>
</td>
</tr>
</table>

View file

@ -1,5 +1,24 @@
(function ($, document, apiClient) {
function reloadTips(page) {
var tips = [
'Did you know that editing the artist or album of a music video will allow it to appear on the artist page?',
'Did you know that editing the tmdb id, tvdb id, and/or games db id of an album will allow media browser to link it to a movie, series or game as a soundtrack?',
'Did you know you can re-order your media collections by editing their sort names?'
];
var random = Math.floor((Math.random() * tips.length * 2));
var tip = tips[random];
if (tip) {
$('#tip', page).html(tip).show();
} else {
$('#tip', page).hide();
}
}
function getViewHtml(view) {
var html = '';
@ -70,4 +89,12 @@
});
});
$(document).on('pagebeforeshow', "#indexPage", function () {
var page = this;
reloadTips(page);
});
})(jQuery, document, ApiClient);

View file

@ -676,12 +676,12 @@
}
// If none then look at user configuration
if (user.Configuration.AudioLanguagePreference) {
if (user.Configuration.SubtitleLanguagePreference) {
for (i = 0, length = mediaStreams.length; i < length; i++) {
mediaStream = mediaStreams[i];
if (mediaStream.Type == "Audio" && mediaStream.Language == user.Configuration.AudioLanguagePreference) {
if (mediaStream.Type == "Subtitle" && mediaStream.Language == user.Configuration.SubtitleLanguagePreference) {
if (user.Configuration.UseForcedSubtitlesOnly) {