working
This commit is contained in:
parent
79728ef106
commit
b40ea3ba7d
4 changed files with 2570 additions and 21 deletions
|
@ -40,6 +40,13 @@ public class DefaultKioskFragment extends KioskFragment {
|
||||||
|
|
||||||
final KioskList kioskList = NewPipe.getService(serviceId).getKioskList();
|
final KioskList kioskList = NewPipe.getService(serviceId).getKioskList();
|
||||||
kioskId = kioskList.getDefaultKioskId();
|
kioskId = kioskList.getDefaultKioskId();
|
||||||
|
if (kioskId == null) {
|
||||||
|
url = "";
|
||||||
|
name = "";
|
||||||
|
currentInfo = null;
|
||||||
|
currentNextPage = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
url = kioskList.getListLinkHandlerFactoryByType(kioskId).fromId(kioskId).getUrl();
|
url = kioskList.getListLinkHandlerFactoryByType(kioskId).fromId(kioskId).getUrl();
|
||||||
|
|
||||||
kioskTranslatedName = KioskTranslator.getTranslatedKioskName(kioskId, requireContext());
|
kioskTranslatedName = KioskTranslator.getTranslatedKioskName(kioskId, requireContext());
|
||||||
|
|
|
@ -433,7 +433,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
||||||
Log.w(TAG, "onCreateOptionsMenu() called with null service");
|
Log.w(TAG, "onCreateOptionsMenu() called with null service");
|
||||||
updateService();
|
updateService();
|
||||||
}
|
}
|
||||||
|
if (service.getSearchQHFactory() != null) {
|
||||||
for (final String filter : service.getSearchQHFactory().getAvailableContentFilter()) {
|
for (final String filter : service.getSearchQHFactory().getAvailableContentFilter()) {
|
||||||
if (filter.equals(YoutubeSearchQueryHandlerFactory.MUSIC_SONGS)) {
|
if (filter.equals(YoutubeSearchQueryHandlerFactory.MUSIC_SONGS)) {
|
||||||
final MenuItem musicItem = menu.add(2,
|
final MenuItem musicItem = menu.add(2,
|
||||||
|
@ -458,6 +458,7 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
||||||
isFirstItem = false;
|
isFirstItem = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
menu.setGroupCheckable(1, true, true);
|
menu.setGroupCheckable(1, true, true);
|
||||||
|
|
||||||
restoreFilterChecked(menu, filterItemCheckedId);
|
restoreFilterChecked(menu, filterItemCheckedId);
|
||||||
|
|
|
@ -61,6 +61,9 @@ public final class KioskTranslator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getKioskIcon(final String kioskId) {
|
public static int getKioskIcon(final String kioskId) {
|
||||||
|
if (kioskId == null) {
|
||||||
|
return R.drawable.ic_add_circle_outline;
|
||||||
|
}
|
||||||
switch (kioskId) {
|
switch (kioskId) {
|
||||||
case "Trending":
|
case "Trending":
|
||||||
case "Top 50":
|
case "Top 50":
|
||||||
|
|
2538
hs_err_pid2452.log
Normal file
2538
hs_err_pid2452.log
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue