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