APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Music Player
版本号:1.0
包名称:music.downloader.mp3player.downloadmusic

MD5 校验值:61e58c10a11e4adec8760ee3854e996a

反编译源代码说明

SoundcloudChannelTabExtractor.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package org.schabi.newpipe.extractor.services.soundcloud.extractors;

import f0.AbstractC1761a;
import org.schabi.newpipe.extractor.InfoItem;
import org.schabi.newpipe.extractor.ListExtractor;
import org.schabi.newpipe.extractor.MultiInfoItemsCollector;
import org.schabi.newpipe.extractor.Page;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabExtractor;
import org.schabi.newpipe.extractor.channel.tabs.ChannelTabs;
import org.schabi.newpipe.extractor.downloader.Downloader;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
import org.schabi.newpipe.extractor.services.soundcloud.SoundcloudParsingHelper;
import org.schabi.newpipe.extractor.utils.Utils;
import p4.r;

public class SoundcloudChannelTabExtractor extends ChannelTabExtractor {
    private static final String USERS_ENDPOINT = "https://api-v2.soundcloud.com/users/";
    private final String userId;

    public SoundcloudChannelTabExtractor(StreamingService streamingService, ListLinkHandler listLinkHandler) {
        super(streamingService, listLinkHandler);
        this.userId = getLinkHandler().getId();
    }

    private String getEndpoint() {
        String name = getName();
        name.getClass();
        name.hashCode();
        char c7 = 65535;
        switch (name.hashCode()) {
            case -1865828127:
                if (name.equals("playlists")) {
                    c7 = 0;
                    break;
                }
                break;
            case -1415163932:
                if (name.equals(ChannelTabs.ALBUMS)) {
                    c7 = 1;
                    break;
                }
                break;
            case -865716088:
                if (name.equals("tracks")) {
                    c7 = 2;
                    break;
                }
                break;
        }
        switch (c7) {
            case 0:
                return "/playlists_without_albums";
            case 1:
                return "/albums";
            case 2:
                return "/tracks";
            default:
                throw new ParsingException(r.n("Unsupported tab: ", getName()));
        }
    }

    @Override
    public String getId() {
        return this.userId;
    }

    @Override
    public ListExtractor.InfoItemsPage<InfoItem> getInitialPage() {
        StringBuilder m4 = AbstractC1761a.m(USERS_ENDPOINT, this.userId, getEndpoint(), "?client_id=", SoundcloudParsingHelper.clientId());
        m4.append("&limit=20&linked_partitioning=1");
        return getPage(new Page(m4.toString()));
    }

    @Override
    public ListExtractor.InfoItemsPage<InfoItem> getPage(Page page) {
        if (page == null || Utils.isNullOrEmpty(page.getUrl())) {
            throw new IllegalArgumentException("Page doesn't contain an URL");
        }
        MultiInfoItemsCollector multiInfoItemsCollector = new MultiInfoItemsCollector(getServiceId());
        return new ListExtractor.InfoItemsPage<>(multiInfoItemsCollector, new Page(SoundcloudParsingHelper.getInfoItemsFromApi(multiInfoItemsCollector, page.getUrl())));
    }

    @Override
    public void onFetchPage(Downloader downloader) {
    }
}