NewPipeExtractor/src/main/java/org/schabi/newpipe/extractor/ServiceList.java

37 lines
893 B
Java
Raw Normal View History

2017-03-01 18:47:52 +01:00
package org.schabi.newpipe.extractor;
import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudService;
2017-08-06 22:20:15 +02:00
import org.schabi.newpipe.extractor.services.youtube.YoutubeService;
2017-03-01 18:47:52 +01:00
2017-08-06 22:20:15 +02:00
/**
* A list of supported services.
2017-03-01 18:47:52 +01:00
*/
2017-08-06 22:20:15 +02:00
public enum ServiceList {
2017-08-07 18:12:51 +02:00
YouTube(new YoutubeService(0, "YouTube")),
2017-08-06 22:20:15 +02:00
SoundCloud(new SoundcloudService(1, "SoundCloud"));
// DailyMotion(new DailyMotionService(2, "DailyMotion"));
private final StreamingService service;
ServiceList(StreamingService service) {
this.service = service;
}
public StreamingService getService() {
return service;
}
public StreamingService.ServiceInfo getServiceInfo() {
return service.getServiceInfo();
}
public int getId() {
return service.getServiceId();
}
2017-03-01 18:47:52 +01:00
2017-08-06 22:20:15 +02:00
@Override
public String toString() {
return service.getServiceInfo().name;
}
2017-03-01 18:47:52 +01:00
}