|
6 | 6 | import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudService; |
7 | 7 | import org.schabi.newpipe.extractor.services.youtube.YoutubeService; |
8 | 8 |
|
9 | | -import java.util.Arrays; |
10 | | -import java.util.Collections; |
11 | 9 | import java.util.List; |
12 | 10 |
|
13 | 11 | /* |
|
34 | 32 | @SuppressWarnings({"ConstantName", "InnerAssignment"}) // keep unusual names and inner assignments |
35 | 33 | public final class ServiceList { |
36 | 34 | private ServiceList() { |
37 | | - //no instance |
| 35 | + // no instance |
38 | 36 | } |
39 | 37 |
|
40 | | - public static final YoutubeService YouTube; |
41 | | - public static final SoundcloudService SoundCloud; |
42 | | - public static final MediaCCCService MediaCCC; |
43 | | - public static final PeertubeService PeerTube; |
44 | | - public static final BandcampService Bandcamp; |
| 38 | + public static final YoutubeService YouTube = new YoutubeService(0); |
| 39 | + public static final SoundcloudService SoundCloud = new SoundcloudService(1); |
| 40 | + public static final MediaCCCService MediaCCC = new MediaCCCService(2); |
| 41 | + public static final PeertubeService PeerTube = new PeertubeService(3); |
| 42 | + public static final BandcampService Bandcamp = new BandcampService(4); |
45 | 43 |
|
46 | 44 | /** |
47 | 45 | * When creating a new service, put this service in the end of this list, |
48 | 46 | * and give it the next free id. |
49 | 47 | */ |
50 | | - private static final List<StreamingService> SERVICES = Collections.unmodifiableList( |
51 | | - Arrays.asList( |
52 | | - YouTube = new YoutubeService(0), |
53 | | - SoundCloud = new SoundcloudService(1), |
54 | | - MediaCCC = new MediaCCCService(2), |
55 | | - PeerTube = new PeertubeService(3), |
56 | | - Bandcamp = new BandcampService(4) |
57 | | - )); |
| 48 | + private static final List<StreamingService> SERVICES = List.of( |
| 49 | + YouTube, SoundCloud, MediaCCC, PeerTube, Bandcamp); |
58 | 50 |
|
59 | 51 | /** |
60 | 52 | * Get all the supported services. |
|
0 commit comments