Minor fixes to source quality sorting
This commit is contained in:
parent
b5efa18984
commit
6f7b34f644
|
@ -7,9 +7,9 @@ sortSources = (sources) ->
|
||||||
pref = String(USEROPTS.default_quality)
|
pref = String(USEROPTS.default_quality)
|
||||||
idx = qualities.indexOf(pref)
|
idx = qualities.indexOf(pref)
|
||||||
if idx < 0
|
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 = []
|
sourceOrder = []
|
||||||
flvOrder = []
|
flvOrder = []
|
||||||
for quality in qualityOrder
|
for quality in qualityOrder
|
||||||
|
|
|
@ -454,9 +454,9 @@
|
||||||
pref = String(USEROPTS.default_quality);
|
pref = String(USEROPTS.default_quality);
|
||||||
idx = qualities.indexOf(pref);
|
idx = qualities.indexOf(pref);
|
||||||
if (idx < 0) {
|
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 = [];
|
sourceOrder = [];
|
||||||
flvOrder = [];
|
flvOrder = [];
|
||||||
for (j = 0, len = qualityOrder.length; j < len; j++) {
|
for (j = 0, len = qualityOrder.length; j < len; j++) {
|
||||||
|
|
Loading…
Reference in a new issue