Remove unused parameters from getDownloadInputStream()
This commit is contained in:
parent
6b750dac4d
commit
a13306c680
|
@ -321,9 +321,9 @@ public class CachedMusicService implements MusicService
|
|||
}
|
||||
|
||||
@Override
|
||||
public Pair<InputStream, Boolean> getDownloadInputStream(Context context, MusicDirectory.Entry song, long offset, int maxBitrate, CancellableTask task) throws Exception
|
||||
public Pair<InputStream, Boolean> getDownloadInputStream(MusicDirectory.Entry song, long offset, int maxBitrate) throws Exception
|
||||
{
|
||||
return musicService.getDownloadInputStream(context, song, offset, maxBitrate, task);
|
||||
return musicService.getDownloadInputStream(song, offset, maxBitrate);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -377,8 +377,7 @@ public class DownloadFile
|
|||
{
|
||||
// Attempt partial HTTP GET, appending to the file if it exists.
|
||||
Pair<InputStream, Boolean> response = musicService
|
||||
.getDownloadInputStream(context, song, partialFile.length(), bitRate,
|
||||
DownloadTask.this);
|
||||
.getDownloadInputStream(song, partialFile.length(), bitRate);
|
||||
|
||||
if (response.getSecond())
|
||||
{
|
||||
|
|
|
@ -108,7 +108,7 @@ public interface MusicService
|
|||
* Return response {@link InputStream} and a {@link Boolean} that indicates if this response is
|
||||
* partial.
|
||||
*/
|
||||
Pair<InputStream, Boolean> getDownloadInputStream(Context context, MusicDirectory.Entry song, long offset, int maxBitrate, CancellableTask task) throws Exception;
|
||||
Pair<InputStream, Boolean> getDownloadInputStream(MusicDirectory.Entry song, long offset, int maxBitrate) throws Exception;
|
||||
|
||||
// TODO: Refactor and remove this call (see RestMusicService implementation)
|
||||
String getVideoUrl(Context context, String id, boolean useFlash) throws Exception;
|
||||
|
|
|
@ -893,7 +893,7 @@ public class OfflineMusicService implements MusicService
|
|||
}
|
||||
|
||||
@Override
|
||||
public Pair<InputStream, Boolean> getDownloadInputStream(Context context, MusicDirectory.Entry song, long offset, int maxBitrate, CancellableTask task) {
|
||||
public Pair<InputStream, Boolean> getDownloadInputStream(MusicDirectory.Entry song, long offset, int maxBitrate) {
|
||||
Timber.w("OfflineMusicService.getDownloadInputStream was called but it isn't available");
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,6 @@ import org.moire.ultrasonic.domain.toDomainEntitiesList
|
|||
import org.moire.ultrasonic.domain.toDomainEntity
|
||||
import org.moire.ultrasonic.domain.toDomainEntityList
|
||||
import org.moire.ultrasonic.domain.toMusicDirectoryDomainEntity
|
||||
import org.moire.ultrasonic.util.CancellableTask
|
||||
import org.moire.ultrasonic.util.FileUtil
|
||||
import org.moire.ultrasonic.util.Util
|
||||
import timber.log.Timber
|
||||
|
@ -611,11 +610,9 @@ open class RESTMusicService(
|
|||
|
||||
@Throws(Exception::class)
|
||||
override fun getDownloadInputStream(
|
||||
context: Context,
|
||||
song: MusicDirectory.Entry,
|
||||
offset: Long,
|
||||
maxBitrate: Int,
|
||||
task: CancellableTask
|
||||
maxBitrate: Int
|
||||
): Pair<InputStream, Boolean> {
|
||||
val songOffset = if (offset < 0) 0 else offset
|
||||
|
||||
|
|
Loading…
Reference in New Issue