Minimized some code

This commit is contained in:
litetex 2022-03-14 22:07:01 +01:00
parent 2bd4299563
commit 639be7adda

View file

@ -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) {