90 lines
2.2 KiB
Java
90 lines
2.2 KiB
Java
package com.zhangmeng.tools.controller;
|
|
|
|
import javafx.collections.FXCollections;
|
|
import javafx.collections.ObservableList;
|
|
import javafx.fxml.FXML;
|
|
import javafx.scene.control.ComboBox;
|
|
import javafx.util.StringConverter;
|
|
|
|
public class VipParserController {
|
|
|
|
@FXML
|
|
private ComboBox<URLS> comboBox;
|
|
|
|
@FXML
|
|
public void initialize() {
|
|
|
|
ObservableList<URLS> list = FXCollections.observableArrayList();
|
|
URLS[] values = URLS.values();
|
|
list.addAll(values);
|
|
|
|
comboBox.setConverter(new StringConverter<URLS>() {
|
|
@Override
|
|
public String toString(URLS object) {
|
|
if (object == null){
|
|
return "";
|
|
}
|
|
return object.getName();
|
|
}
|
|
|
|
@Override
|
|
public URLS fromString(String string) {
|
|
return null;
|
|
}
|
|
});
|
|
|
|
comboBox.setItems(list);
|
|
comboBox.getSelectionModel().select(4);
|
|
}
|
|
|
|
@FXML
|
|
public void player(){
|
|
|
|
}
|
|
|
|
public enum URLS {
|
|
|
|
vip1717yun("1717yun解析", "https://www.1717yun.com/jx/ty.php?url=", "稳定通用"),
|
|
wpsseo("wpsseo", "http://www.wpsseo.cn/jx/?url=", "稳定通用"),
|
|
cjw123("cjw123", "https://a.cjw123.com/index.php?url=", "稳定通用"),
|
|
xmflv("xmflv", "https://jx.xmflv.com/?url=", "稳定通用"),
|
|
jsonplayer("jsonplayer", "https://jx.jsonplayer.com/player/?url=", "稳定通用"),
|
|
vip1717yun_2("VIP视频解析116kan智能解析", "https://www.1717yun.com/api/?url=", "vip解析");
|
|
|
|
|
|
private String name;
|
|
private String url;
|
|
private String desc;
|
|
|
|
URLS(String name, String url, String desc) {
|
|
this.name = name;
|
|
this.url = url;
|
|
this.desc = desc;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getUrl() {
|
|
return url;
|
|
}
|
|
|
|
public void setUrl(String url) {
|
|
this.url = url;
|
|
}
|
|
|
|
public String getDesc() {
|
|
return desc;
|
|
}
|
|
|
|
public void setDesc(String desc) {
|
|
this.desc = desc;
|
|
}
|
|
}
|
|
}
|