We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ad51e7 commit 13f1927Copy full SHA for 13f1927
1 file changed
extractor/src/main/java/org/schabi/newpipe/extractor/Info.java
@@ -1,5 +1,6 @@
1
package org.schabi.newpipe.extractor;
2
3
+import org.schabi.newpipe.extractor.exceptions.ExtractionException;
4
import org.schabi.newpipe.extractor.linkhandler.LinkHandler;
5
6
import java.io.Serializable;
@@ -72,6 +73,15 @@ public int getServiceId() {
72
73
return serviceId;
74
}
75
76
+ public StreamingService getService() {
77
+ try {
78
+ return NewPipe.getService(serviceId);
79
+ } catch (final ExtractionException e) {
80
+ // this should be unreachable, as serviceId certainly refers to a valid service
81
+ throw new RuntimeException("Info object has invalid service id", e);
82
+ }
83
84
+
85
public String getId() {
86
return id;
87
0 commit comments