Skip to content

Commit

Permalink
format config url
Browse files Browse the repository at this point in the history
  • Loading branch information
lizongying committed May 26, 2024
1 parent 131b6c1 commit d6b8644
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ jobs:
run: |
chmod +x history.sh
output=$(./history.sh)
trimmed_output=$(echo "$output" | awk '{$1=$1};1')
echo "::set-output name=history::$trimmed_output"
echo "$output" > history.md
- name: Create Release
id: create_release
Expand All @@ -55,7 +54,7 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: ${{ steps.get_history.outputs.history }}
body_path: history.md

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
Expand All @@ -65,4 +64,19 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.sign_app.outputs.signedReleaseFile }}
asset_name: my-tv-0-${{ github.ref_name }}.apk
asset_content_type: application/vnd.android.package-archive
asset_content_type: application/vnd.android.package-archive

- name: Gitee Create Release
run: |
latest_commit=$(git rev-parse HEAD)
history=$(cat history.md)
curl -v POST https://gitee.com/api/v5/repos/${{ github.repository }}/releases \
-H "Content-Type: application/json" \
-d '{
"access_token": "${{ secrets.GITEE_ACCESS_TOKEN}}",
"tag_name": "${{ github.ref_name }}",
"name": "Release ${{ github.ref_name }}",
"body": "'"$history"'",
"prerelease": false,
"target_commitish": "'"$latest_commit"'"
}'
2 changes: 2 additions & 0 deletions app/src/main/java/com/lizongying/mytv0/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class MainActivity : FragmentActivity() {
View.SYSTEM_UI_FLAG_IMMERSIVE
}

window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)

setContentView(R.layout.activity_main)

if (savedInstanceState == null) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/lizongying/mytv0/SimpleServer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class SimpleServer(private val context: Context, port: Int) : NanoHTTPD(port) {
val map = HashMap<String, String>()
session.parseBody(map)
map["postData"]?.let {
val uri = Uri.parse(Gson().fromJson(it, UriResponse::class.java).uri)
val url = Utils.formatUrl(Gson().fromJson(it, UriResponse::class.java).uri)
val uri = Uri.parse(url)
Log.i(TAG, "uri $uri")
handler.post {
TVList.parseUri(uri)
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/lizongying/mytv0/models/TVList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ object TVList {
}

fun setPosition(position: Int): Boolean {
Log.i(TAG, "setPosition $position/${size()} ${getTVModel(position).tv.title} ${getTVModel(position).like.value}")
if (position >= size()) {
return false
}
Expand Down
Empty file modified history.sh
100644 → 100755
Empty file.

0 comments on commit d6b8644

Please sign in to comment.