From 709cc2ccdfe103cfbaf952bce3f99ba1d7d0f69b Mon Sep 17 00:00:00 2001 From: Li ZongYing Date: Thu, 7 Dec 2023 01:05:26 +0800 Subject: [PATCH] fix empty string bug --- .github/workflows/build.yml | 2 +- app/src/main/java/com/lizongying/mytv/TVList.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9caf1e8..0f292ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,5 +52,5 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ steps.sign_app.outputs.signedReleaseFile }} - asset_name: my-tv.apk + asset_name: my-tv-{{ github.ref_name }}.apk asset_content_type: application/vnd.android.package-archive \ No newline at end of file diff --git a/app/src/main/java/com/lizongying/mytv/TVList.kt b/app/src/main/java/com/lizongying/mytv/TVList.kt index aa595a8..2be8fcf 100644 --- a/app/src/main/java/com/lizongying/mytv/TVList.kt +++ b/app/src/main/java/com/lizongying/mytv/TVList.kt @@ -107,6 +107,9 @@ object TVList { val map: MutableMap>> = mutableMapOf() for (i in tvs.split("\n")) { + if (!i.contains(",")) { + continue + } val (channel, title, url) = i.split(",") val titleMap = map[channel] ?: mutableMapOf()