Minimized some code
This commit is contained in:
parent
2bd4299563
commit
639be7adda
1 changed files with 3 additions and 7 deletions
|
@ -41,16 +41,12 @@ public final class NewPipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(final Downloader d) {
|
public static void init(final Downloader d) {
|
||||||
downloader = d;
|
init(d, Localization.DEFAULT);
|
||||||
preferredLocalization = Localization.DEFAULT;
|
|
||||||
preferredContentCountry = ContentCountry.DEFAULT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(final Downloader d, final Localization l) {
|
public static void init(final Downloader d, final Localization l) {
|
||||||
downloader = d;
|
init(d, l, l.getCountryCode().isEmpty()
|
||||||
preferredLocalization = l;
|
? ContentCountry.DEFAULT : new ContentCountry(l.getCountryCode()));
|
||||||
preferredContentCountry = l.getCountryCode().isEmpty()
|
|
||||||
? ContentCountry.DEFAULT : new ContentCountry(l.getCountryCode());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(final Downloader d, final Localization l, final ContentCountry c) {
|
public static void init(final Downloader d, final Localization l, final ContentCountry c) {
|
||||||
|
|
Loading…
Reference in a new issue