Renamed getFileUrl method of Playable interface
This commit is contained in:
parent
248467d840
commit
94a38debdf
|
@ -230,7 +230,7 @@ public class FeedMedia extends FeedFile implements Playable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getFileUrl() {
|
||||
public String getLocalMediaUrl() {
|
||||
return file_url;
|
||||
}
|
||||
|
||||
|
|
|
@ -467,7 +467,7 @@ public class PlaybackService extends Service {
|
|||
setStatus(PlayerStatus.PREPARING);
|
||||
player.prepareAsync();
|
||||
} else {
|
||||
player.setDataSource(media.getFileUrl());
|
||||
player.setDataSource(media.getLocalMediaUrl());
|
||||
setStatus(PlayerStatus.PREPARING);
|
||||
player.prepareAsync();
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ public class PlaybackService extends Service {
|
|||
if (shouldStream) {
|
||||
player.setDataSource(media.getStreamUrl());
|
||||
} else if (media.localFileAvailable()) {
|
||||
player.setDataSource(media.getFileUrl());
|
||||
player.setDataSource(media.getLocalMediaUrl());
|
||||
}
|
||||
|
||||
if (prepareImmediately) {
|
||||
|
|
|
@ -88,8 +88,8 @@ public class ChapterUtils {
|
|||
public static void readID3ChaptersFromPlayableFileUrl(Playable p) {
|
||||
if (AppConfig.DEBUG)
|
||||
Log.d(TAG, "Reading id3 chapters from item " + p.getEpisodeTitle());
|
||||
if (p != null && p.localFileAvailable() && p.getFileUrl() != null) {
|
||||
File source = new File(p.getFileUrl());
|
||||
if (p != null && p.localFileAvailable() && p.getLocalMediaUrl() != null) {
|
||||
File source = new File(p.getLocalMediaUrl());
|
||||
if (source.exists()) {
|
||||
ChapterReader reader = new ChapterReader();
|
||||
InputStream in = null;
|
||||
|
@ -152,8 +152,8 @@ public class ChapterUtils {
|
|||
}
|
||||
|
||||
public static void readOggChaptersFromPlayableFileUrl(Playable media) {
|
||||
if (media != null && media.getFileUrl() != null) {
|
||||
File source = new File(media.getFileUrl());
|
||||
if (media != null && media.getLocalMediaUrl() != null) {
|
||||
File source = new File(media.getLocalMediaUrl());
|
||||
if (source.exists()) {
|
||||
InputStream input = null;
|
||||
try {
|
||||
|
|
|
@ -161,7 +161,7 @@ public class ExternalMedia implements Playable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getFileUrl() {
|
||||
public String getLocalMediaUrl() {
|
||||
return source;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ public interface Playable extends Parcelable {
|
|||
* Returns an url to a local file that can be played or null if this file
|
||||
* does not exist.
|
||||
*/
|
||||
public String getFileUrl();
|
||||
public String getLocalMediaUrl();
|
||||
|
||||
/**
|
||||
* Returns an url to a file that can be streamed by the player or null if
|
||||
|
|
Loading…
Reference in New Issue