From b4390fc5d136e599aa79b87fe36729480d736f1a Mon Sep 17 00:00:00 2001 From: Ahmad Date: Sat, 14 Dec 2024 18:12:22 +0700 Subject: [PATCH] Release: Nightly 5.4.7 - Remove mac build (not working) - Fix hianime/aniwatch subtitle --- .github/workflows/nightly-build.yml | 45 +++++----- app/build.gradle | 2 +- app/src/main/assets/view/m.js | 88 +++++++++++-------- .../androidtv/animetvjmto/AnimeView.java | 33 +++++++ electron/src/libs/intercept.js | 32 +++++-- 5 files changed, 131 insertions(+), 69 deletions(-) diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 6b31b32d..f5fa2177 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -10,7 +10,8 @@ jobs: release_desktop: strategy: matrix: - platform: [ windows-latest, ubuntu-latest, macos-latest, macos-13] + platform: [ windows-latest, ubuntu-latest] + # platform: [ windows-latest, ubuntu-latest, macos-latest, macos-13] runs-on: ${{ matrix.platform }} if: startsWith(github.event.head_commit.message, 'Release:') steps: @@ -39,27 +40,27 @@ jobs: - name: Install app dependencies run: npm install - - name: Build app (MacOS - arm64) - if: matrix.platform == 'macos-latest' - run: npm run build-mac - - - name: Upload build (MacOS - arm64) - uses: actions/upload-artifact@v4 - if: matrix.platform == 'macos-latest' - with: - name: animetv-mac-arm64.dmg - path: ./electron/builds/animetv-darwin-arm64/*.dmg - - - name: Build app (MacOS - x64) - if: matrix.platform == 'macos-13' - run: npm run build-mac-x64 - - - name: Upload build (MacOS - x64) - uses: actions/upload-artifact@v4 - if: matrix.platform == 'macos-13' - with: - name: animetv-mac-x64.dmg - path: ./electron/builds/animetv-darwin-x64/*.dmg + # - name: Build app (MacOS - arm64) + # if: matrix.platform == 'macos-latest' + # run: npm run build-mac + + # - name: Upload build (MacOS - arm64) + # uses: actions/upload-artifact@v4 + # if: matrix.platform == 'macos-latest' + # with: + # name: animetv-mac-arm64.dmg + # path: ./electron/builds/animetv-darwin-arm64/*.dmg + + # - name: Build app (MacOS - x64) + # if: matrix.platform == 'macos-13' + # run: npm run build-mac-x64 + + # - name: Upload build (MacOS - x64) + # uses: actions/upload-artifact@v4 + # if: matrix.platform == 'macos-13' + # with: + # name: animetv-mac-x64.dmg + # path: ./electron/builds/animetv-darwin-x64/*.dmg - name: Build app (Windows - x64) if: matrix.platform == 'windows-latest' diff --git a/app/build.gradle b/app/build.gradle index c3110545..91c6449d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,7 +11,7 @@ android { minSdk 22 targetSdk 34 versionCode 540 - versionName "5.4.6-Nightly" + versionName "5.4.7-Nightly" // Automatic Build Version diff --git a/app/src/main/assets/view/m.js b/app/src/main/assets/view/m.js index 472c8de7..6227786c 100644 --- a/app/src/main/assets/view/m.js +++ b/app/src/main/assets/view/m.js @@ -8187,50 +8187,60 @@ const pb={ dt.ep_stream_sel = seld; var subld = dt.ep_servers[subut][subuid]; console.log("GOT-VIDEO-IFRAME-URL : "+seld.link); - console.log("GOT-SUB-URL : "+subld.link); + console.log("GOT-SUB-URL : "+subld.link+" LOAD SUB: "+loadSubtitle); // Get Video Data if (loadSubtitle){ - var vvturl='https://'+seld.dns+'/embed-2/ajax/e-1/getSources?id='+enc(subld.sid); - $ap(vvturl,function(r){ - if (r.ok){ - try{ - var jv=JSON.parse(r.responseText); - /* Load Intro / Outro */ - try{ - var st=jv.intro.start; - var en=jv.intro.end; - var sto=jv.outro.start; - var eno=jv.outro.end; - dt.skip=[ - [st?st:0,en?en:0], - [sto?sto:0,eno?eno:0] - ]; - }catch(e){} - - /* Load Subtitle */ - vtt.clear(); - pb.subtitles=[]; - window.__subtitle=pb.subtitles; - try{ - if (jv.tracks){ - var n=jv.tracks.length; - for (var i=0;i-1){ req.headers.set("Referer","https://hianime.to/"); - console.log("EMBED = "+url); } if (url.pathname.indexOf('/getSources')>-1){ console.log("SOURCES = "+url); + + let f=intercept.fetchNormal(req); + let body=await (await f).text(); + console.log(body); + intercept.getsource_cache=body; + // return new Response(body, { + // status: f.status, + // headers: f.headers + // }); return intercept.fetchNormal(req); } - // console.log("GET SORCES = "+url); - // let f=intercept.fetchStream(req); - // let body=await (await f).text(); - // console.log(body); - // } return intercept.fetchStream(req); }