mirror of https://github.com/FongMi/TV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
697 B
20 lines
697 B
package com.xunlei.downloadlib;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Util {
|
|
|
|
private static final List<String> VIDEO = Arrays.asList("avi", "flv", "mkv", "mov", "mp4", "mpeg", "mpe", "mpg", "wmv");
|
|
private static final List<String> AUDIO = Arrays.asList("aac", "ape", "flac", "mp3", "m4a", "ogg");
|
|
private static final long MINIMAL = 30 * 1024 * 1024;
|
|
|
|
public static boolean isMedia(String ext, long size) {
|
|
return (VIDEO.contains(ext) || AUDIO.contains(ext)) && size > MINIMAL;
|
|
}
|
|
|
|
public static boolean notAd(List<String> ads, String name) {
|
|
for (String ad : ads) if (name.contains(ad)) return false;
|
|
return true;
|
|
}
|
|
}
|
|
|