fix issue with originalUrl
This commit is contained in:
parent
cf3ea22753
commit
50a17afc05
|
@ -27,7 +27,7 @@ public abstract class Info implements Serializable {
|
||||||
*
|
*
|
||||||
* @see Extractor#getOriginalUrl()
|
* @see Extractor#getOriginalUrl()
|
||||||
*/
|
*/
|
||||||
private final String originalUrl;
|
private String originalUrl;
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
private final List<Throwable> errors = new ArrayList<>();
|
private final List<Throwable> errors = new ArrayList<>();
|
||||||
|
@ -62,6 +62,12 @@ public abstract class Info implements Serializable {
|
||||||
return getClass().getSimpleName() + "[url=\"" + url + "\"" + ifDifferentString + ", name=\"" + name + "\"]";
|
return getClass().getSimpleName() + "[url=\"" + url + "\"" + ifDifferentString + ", name=\"" + name + "\"]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if you use an api and want to handle the website url
|
||||||
|
// overriding original url is essential
|
||||||
|
public void setOriginalUrl(String url) {
|
||||||
|
originalUrl = url;
|
||||||
|
}
|
||||||
|
|
||||||
public int getServiceId() {
|
public int getServiceId() {
|
||||||
return serviceId;
|
return serviceId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,11 @@ public class ChannelInfo extends ListInfo<StreamInfoItem> {
|
||||||
extractor.getLinkHandler(),
|
extractor.getLinkHandler(),
|
||||||
extractor.getName());
|
extractor.getName());
|
||||||
|
|
||||||
|
try {
|
||||||
|
info.setOriginalUrl(extractor.getOriginalUrl());
|
||||||
|
} catch (Exception e) {
|
||||||
|
info.addError(e);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
info.setAvatarUrl(extractor.getAvatarUrl());
|
info.setAvatarUrl(extractor.getAvatarUrl());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -47,6 +47,11 @@ public class PlaylistInfo extends ListInfo<StreamInfoItem> {
|
||||||
extractor.getLinkHandler(),
|
extractor.getLinkHandler(),
|
||||||
extractor.getName());
|
extractor.getName());
|
||||||
|
|
||||||
|
try {
|
||||||
|
info.setOriginalUrl(extractor.getOriginalUrl());
|
||||||
|
} catch (Exception e) {
|
||||||
|
info.addError(e);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
info.setStreamCount(extractor.getStreamCount());
|
info.setStreamCount(extractor.getStreamCount());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -37,6 +37,11 @@ public class SearchInfo extends ListInfo<InfoItem> {
|
||||||
extractor.getLinkHandler(),
|
extractor.getLinkHandler(),
|
||||||
extractor.getSearchString());
|
extractor.getSearchString());
|
||||||
|
|
||||||
|
try {
|
||||||
|
info.setOriginalUrl(extractor.getOriginalUrl());
|
||||||
|
} catch (Exception e) {
|
||||||
|
info.addError(e);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
info.searchSuggestion = extractor.getSearchSuggestion();
|
info.searchSuggestion = extractor.getSearchSuggestion();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue