Fix FilteringHlsPlaylistParser

Only filter HlsMasterPlaylists.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=183394956
This commit is contained in:
eguven 2018-01-26 08:42:46 -08:00 committed by Andrew Lewis
parent e1dbaf26c2
commit 61ba0f2827

View file

@ -26,30 +26,30 @@ import java.io.IOException;
/** An action to download or remove downloaded HLS streams. */ /** An action to download or remove downloaded HLS streams. */
public final class HlsDownloadAction extends SegmentDownloadAction<String> { public final class HlsDownloadAction extends SegmentDownloadAction<String> {
public static final Deserializer DESERIALIZER = new SegmentDownloadActionDeserializer<String>() { public static final Deserializer DESERIALIZER =
new SegmentDownloadActionDeserializer<String>() {
@Override @Override
public String getType() { public String getType() {
return TYPE; return TYPE;
} }
@Override @Override
protected String readKey(DataInputStream input) throws IOException { protected String readKey(DataInputStream input) throws IOException {
return input.readUTF(); return input.readUTF();
} }
@Override @Override
protected String[] createKeyArray(int keyCount) { protected String[] createKeyArray(int keyCount) {
return new String[0]; return new String[keyCount];
} }
@Override @Override
protected DownloadAction createDownloadAction(Uri manifestUri, boolean removeAction, protected DownloadAction createDownloadAction(
String data, String[] keys) { Uri manifestUri, boolean removeAction, String data, String[] keys) {
return new HlsDownloadAction(manifestUri, removeAction, data, keys); return new HlsDownloadAction(manifestUri, removeAction, data, keys);
} }
};
};
private static final String TYPE = "HlsDownloadAction"; private static final String TYPE = "HlsDownloadAction";