Renamed getFileUrl method of Playable interface

This commit is contained in:
daniel oeh 2013-02-28 13:31:50 +01:00
parent 248467d840
commit 94a38debdf
5 changed files with 9 additions and 9 deletions

View File

@ -230,7 +230,7 @@ public class FeedMedia extends FeedFile implements Playable {
}
@Override
public String getFileUrl() {
public String getLocalMediaUrl() {
return file_url;
}

View File

@ -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) {

View File

@ -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 {

View File

@ -161,7 +161,7 @@ public class ExternalMedia implements Playable {
}
@Override
public String getFileUrl() {
public String getLocalMediaUrl() {
return source;
}

View File

@ -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