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

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

MD5 校验值:61e58c10a11e4adec8760ee3854e996a

反编译源代码说明

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


package org.schabi.newpipe.extractor.services.peertube;

import V1.z;
import a4.c;
import a4.d;
import java.io.IOException;
import org.schabi.newpipe.extractor.NewPipe;
import org.schabi.newpipe.extractor.downloader.Response;
import org.schabi.newpipe.extractor.exceptions.ParsingException;
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException;
import org.schabi.newpipe.extractor.utils.JsonUtils;
import org.schabi.newpipe.extractor.utils.Utils;
import p4.r;

public class PeertubeInstance {
    public static final PeertubeInstance DEFAULT_INSTANCE = new PeertubeInstance("https://framatube.org", "FramaTube");
    private String name;
    private final String url;

    public PeertubeInstance(String str) {
        this.url = str;
        this.name = "PeerTube";
    }

    public void fetchInstanceMetaData() {
        try {
            Response response = NewPipe.getDownloader().get(this.url + "/api/v1/config");
            if (response != null && !Utils.isBlank(response.responseBody())) {
                try {
                    this.name = JsonUtils.getString((c) z.h().H(response.responseBody()), "instance.name");
                    return;
                } catch (d | ParsingException e) {
                    throw new Exception("unable to parse instance config", e);
                }
            }
            throw new Exception(r.n("unable to configure instance ", this.url));
        } catch (IOException | ReCaptchaException e7) {
            throw new Exception(r.n("unable to configure instance ", this.url), e7);
        }
    }

    public String getName() {
        return this.name;
    }

    public String getUrl() {
        return this.url;
    }

    public PeertubeInstance(String str, String str2) {
        this.url = str;
        this.name = str2;
    }
}