Skip to content

Commit

Permalink
Merge branch 'oliver-work' into dev-2.4.1
Browse files Browse the repository at this point in the history
Latest #265
  • Loading branch information
ukdtom committed Feb 19, 2017
2 parents b2b5a28 + b220557 commit 74a3412
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions http/modules/subtitlemgmt/jscript/functions_shows.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ subtitlemgmt.fetch_section_type_show = function(section_key, pageToShow) {
var start = (Number(subtitlemgmt.selected_section.currentpage) * Number(subtitlemgmt.options.items_per_page));
webtools.loading('Library Size: ' + subtitlemgmt.selected_section.totalsize + '<br>Currently fetching: ' + start + '->' + (start + subtitlemgmt.options.items_per_page));
$.ajax({
url: '/webtools2?module=pms&function=getSection&key=' + subtitlemgmt.selected_section.key + '&start=' + start + '&size=9999',
url: '/webtools2?module=pms&function=getSection&key=' + subtitlemgmt.selected_section.key + '&start=0&size=9999',
cache: false,
dataType: 'JSON',
success: function(data) {
Expand Down Expand Up @@ -199,7 +199,7 @@ subtitlemgmt.fetch_season_episodes = function(season_key, pageToShow) {
});
}
], function() {
subtitlemgmt.display_episodes();
subtitlemgmt.display_episodes(true);
});
get_episodes.start(season_key);
}
Expand Down Expand Up @@ -234,7 +234,7 @@ subtitlemgmt.display_season = function() {
if (end > subtitlemgmt.selected_section.contents.length) {
end = subtitlemgmt.selected_section.contents.length
}
for (var i = (subtitlemgmt.selected_section.currentpage * subtitlemgmt.options.items_per_page); i < end; i++) {
for (var i = 0; i < subtitlemgmt.selected_section.contents.length; i++) {
newEntry.push('<tr><td><a class="customlink" onclick="javascript:subtitlemgmt.fetch_season_episodes(' + subtitlemgmt.selected_section.contents[i].key + ',0)">' + subtitlemgmt.selected_section.contents[i].title + '</a></td><td>Episodes in season: ' + subtitlemgmt.selected_section.contents[i].size + '</td></tr>');

}
Expand Down
7 changes: 6 additions & 1 deletion http/modules/subtitlemgmt/jscript/functions_video.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ subtitlemgmt.fetch_section_type_movies = function(section_key, pageToShow) {
get_section_video.start(section_key);
}

subtitlemgmt.display_episodes = function () {
subtitlemgmt.display_episodes = function (forceAll) {
window.scrollTo(0, 0);
/*
Go through all the options and modify the output accordingly.
Expand Down Expand Up @@ -166,6 +166,11 @@ subtitlemgmt.display_episodes = function () {

$('#ContentBody').html('');


if (forceAll) {
start = 0
end = subtitlemgmt.selected_section.contents.length;
}
for (var i = start; i < end; i++) {
if (subtitlemgmt.options.options_hide_withoutsubs && subtitlemgmt.selected_section.contents[i].subtitles.length === 0) {
continue;
Expand Down

0 comments on commit 74a3412

Please sign in to comment.