mirror of https://github.com/calzoneman/sync.git
Make vimeo workaround respect default quality option
This commit is contained in:
parent
03a188e8f2
commit
d16482b863
|
@ -67,7 +67,7 @@ mixin us-playback
|
||||||
mixin rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
|
mixin rcheckbox("us-playlistbuttons", "Hide playlist buttons by default")
|
||||||
mixin rcheckbox("us-oldbtns", "Old style playlist buttons")
|
mixin rcheckbox("us-oldbtns", "Old style playlist buttons")
|
||||||
.form-group
|
.form-group
|
||||||
label.control-label.col-sm-4(for="#us-default-quality") Default YouTube/Dailymotion quality
|
label.control-label.col-sm-4(for="#us-default-quality") Default YouTube/Vimeo/Dailymotion quality
|
||||||
.col-sm-8
|
.col-sm-8
|
||||||
select#us-default-quality.form-control
|
select#us-default-quality.form-control
|
||||||
option(value="auto") Auto
|
option(value="auto") Auto
|
||||||
|
|
|
@ -858,9 +858,32 @@ Callbacks = {
|
||||||
} else {
|
} else {
|
||||||
data.type = "rv";
|
data.type = "rv";
|
||||||
}
|
}
|
||||||
// Right now only plays standard definition.
|
|
||||||
// In the future, I may add a quality selector for mobile/standard/HD
|
/* Convert youtube-style quality key to vimeo workaround quality */
|
||||||
data.url = data.direct.sd.url;
|
var q = {
|
||||||
|
small: "mobile",
|
||||||
|
medium: "sd",
|
||||||
|
large: "sd",
|
||||||
|
hd720: "hd",
|
||||||
|
hd1080:"hd",
|
||||||
|
highres: "hd"
|
||||||
|
}[USEROPTS.default_quality] || "sd";
|
||||||
|
|
||||||
|
var fallback = {
|
||||||
|
hd: "sd",
|
||||||
|
sd: "mobile",
|
||||||
|
mobile: false
|
||||||
|
};
|
||||||
|
|
||||||
|
while (!(q in data.direct) && q != false) {
|
||||||
|
q = fallback[q];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!q) {
|
||||||
|
q = "sd";
|
||||||
|
}
|
||||||
|
|
||||||
|
data.url = data.direct[q].url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.type === "rt") {
|
if (data.type === "rt") {
|
||||||
|
|
Loading…
Reference in New Issue