mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Separate the functions for creating a mediaItem from a Child object and from a Download object
This commit is contained in:
parent
e3f088468c
commit
e337c6faf2
15 changed files with 103 additions and 141 deletions
|
|
@ -6,10 +6,9 @@ import android.net.Network;
|
|||
import android.net.NetworkCapabilities;
|
||||
import android.net.Uri;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
|
||||
import com.cappielloantonio.play.App;
|
||||
import com.cappielloantonio.play.R;
|
||||
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -45,6 +44,8 @@ public class MusicUtil {
|
|||
uri.append("&format=").append(getTranscodingFormatPreference());
|
||||
uri.append("&id=").append(id);
|
||||
|
||||
Log.d(TAG, "getStreamUri: " + uri);
|
||||
|
||||
return Uri.parse(uri.toString());
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ public class MusicUtil {
|
|||
StringBuilder uri = new StringBuilder();
|
||||
|
||||
uri.append(App.getSubsonicClientInstance(false).getUrl());
|
||||
uri.append("stream");
|
||||
uri.append("download");
|
||||
|
||||
if (params.containsKey("u") && params.get("u") != null)
|
||||
uri.append("?u=").append(params.get("u"));
|
||||
|
|
@ -71,6 +72,8 @@ public class MusicUtil {
|
|||
|
||||
uri.append("&id=").append(id);
|
||||
|
||||
Log.d(TAG, "getDownloadUri: " + uri);
|
||||
|
||||
return Uri.parse(uri.toString());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue