genius lyrics test
only for songs with vk lyrics
This commit is contained in:
@@ -3,21 +3,32 @@ package com.vk.api.audio;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.vk.api.base.ApiRequest;
|
||||
import com.vk.dto.music.MusicTrack;
|
||||
import com.vk.log.L;
|
||||
import org.json.JSONObject;
|
||||
import ru.vtosters.lite.music.Genius;
|
||||
import ru.vtosters.lite.utils.Preferences;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class AudioGetLyrics extends ApiRequest<AudioGetLyrics.a> {
|
||||
public AudioGetLyrics(int lyrics_id, String audio_id) {
|
||||
private final MusicTrack musicTrack;
|
||||
|
||||
public AudioGetLyrics(int lyrics_id, String audio_id, MusicTrack mt) {
|
||||
super("audio.getLyrics");
|
||||
c("audio_id", audio_id);
|
||||
musicTrack = mt;
|
||||
}
|
||||
|
||||
/* renamed from: a */
|
||||
public a a(@NonNull JSONObject jSONObject) {
|
||||
var aVar = new a();
|
||||
|
||||
if (Preferences.getBoolValue("useGenius", false)) {
|
||||
aVar.a = Genius.getTextMusic(musicTrack);
|
||||
return aVar;
|
||||
}
|
||||
|
||||
try {
|
||||
var lines = new ArrayList<>();
|
||||
var lyrics = jSONObject.getJSONObject("response").getJSONObject("lyrics");
|
||||
|
||||
@@ -76,7 +76,7 @@ public class LyricsHolder extends RecyclerHolder<PlayerInfo> implements View.OnC
|
||||
this.f18328f.b(8);
|
||||
ViewUtils.a(this.g, 0);
|
||||
ViewUtils.a(this.h, 8);
|
||||
new AudioGetLyrics(e2.G, e2.y1()).a(new b(e2)).a();
|
||||
new AudioGetLyrics(e2.G, e2.y1(), e2).a(new b(e2)).a();
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
|
||||
Reference in New Issue
Block a user