Merge pull request #297 from okcaptain/dev

Dev
pull/298/head^2
okcaptain 2 years ago committed by GitHub
commit c41d1f209b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/build.gradle
  2. 7
      app/src/main/java/com/fongmi/android/tv/player/extractor/JianPian.java

@ -10,8 +10,8 @@ android {
applicationId "com.fongmi.android.tv"
minSdk 21
targetSdk 28
versionCode 225
versionName "0217"
versionCode 227
versionName "2.2.7"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]

@ -3,7 +3,6 @@ package com.fongmi.android.tv.player.extractor;
import android.net.Uri;
import com.fongmi.android.tv.player.Source;
import com.github.catvod.utils.Path;
import com.p2p.P2PClass;
import java.net.URLDecoder;
@ -33,11 +32,12 @@ public class JianPian implements Source.Extractor {
private void start(String url) {
try {
if (path != null) p2p.P2Pdoxdel(path.getBytes("GBK"));
String lastPath = path;
path = URLDecoder.decode(url).split("\\|")[0];
path = path.replace("jianpian://pathtype=url&path=", "");
path = path.replace("tvbox-xg://", "").replace("tvbox-xg:", "");
path = path.replace("xg://", "ftp://").replace("xgplay://", "ftp://");
if (lastPath != null && !lastPath.equals(path)) p2p.P2Pdoxdel(lastPath.getBytes("GBK"));
p2p.P2Pdoxstart(path.getBytes("GBK"));
p2p.P2Pdoxadd(path.getBytes("GBK"));
} catch (Exception e) {
@ -58,11 +58,8 @@ public class JianPian implements Source.Extractor {
public void exit() {
try {
if (p2p != null && path != null) p2p.P2Pdoxpause(path.getBytes("GBK"));
if (p2p != null && path != null) p2p.P2Pdoxdel(path.getBytes("GBK"));
if (p2p != null) p2p.P2Pdoxendhttpd();
} catch (Exception e) {
e.printStackTrace();
}
Path.clear(Path.jpa());
}
}

Loading…
Cancel
Save