Minimized some code

This commit is contained in:
litetex 2022-03-14 22:07:01 +01:00
parent 2bd4299563
commit 639be7adda
1 changed files with 3 additions and 7 deletions

View File

@ -41,16 +41,12 @@ public final class NewPipe {
}
public static void init(final Downloader d) {
downloader = d;
preferredLocalization = Localization.DEFAULT;
preferredContentCountry = ContentCountry.DEFAULT;
init(d, Localization.DEFAULT);
}
public static void init(final Downloader d, final Localization l) {
downloader = d;
preferredLocalization = l;
preferredContentCountry = l.getCountryCode().isEmpty()
? ContentCountry.DEFAULT : new ContentCountry(l.getCountryCode());
init(d, l, l.getCountryCode().isEmpty()
? ContentCountry.DEFAULT : new ContentCountry(l.getCountryCode()));
}
public static void init(final Downloader d, final Localization l, final ContentCountry c) {