Update Nano.java

pull/586/head
FongMi 2 years ago
parent ace5699e64
commit 542a31f4d9
  1. 3
      app/src/main/java/com/fongmi/android/tv/server/Nano.java

@ -12,7 +12,6 @@ import com.fongmi.android.tv.server.process.Process;
import com.github.catvod.utils.Asset;
import com.google.common.net.HttpHeaders;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
@ -105,7 +104,7 @@ public class Nano extends NanoHTTPD {
if (path.isEmpty()) path = "index.html";
InputStream is = Asset.open(path);
return newFixedLengthResponse(Response.Status.OK, getMimeTypeForFile(path), is, is.available());
} catch (IOException e) {
} catch (Exception e) {
return newFixedLengthResponse(Response.Status.NOT_FOUND, MIME_HTML, null);
}
}

Loading…
Cancel
Save