Minor fixes to source quality sorting

This commit is contained in:
calzoneman 2015-08-03 19:02:56 -07:00
parent b5efa18984
commit 6f7b34f644
2 changed files with 4 additions and 4 deletions

View file

@ -7,9 +7,9 @@ sortSources = (sources) ->
pref = String(USEROPTS.default_quality)
idx = qualities.indexOf(pref)
if idx < 0
pref = '480'
idx = 2
qualityOrder = qualities.slice(idx).concat(qualities.slice(0, idx))
qualityOrder = qualities.slice(idx).concat(qualities.slice(0, idx).reverse())
sourceOrder = []
flvOrder = []
for quality in qualityOrder

View file

@ -454,9 +454,9 @@
pref = String(USEROPTS.default_quality);
idx = qualities.indexOf(pref);
if (idx < 0) {
pref = '480';
idx = 2;
}
qualityOrder = qualities.slice(idx).concat(qualities.slice(0, idx));
qualityOrder = qualities.slice(idx).concat(qualities.slice(0, idx).reverse());
sourceOrder = [];
flvOrder = [];
for (j = 0, len = qualityOrder.length; j < len; j++) {