add separate upload in github action
This commit is contained in:
parent
66bf4b5ae7
commit
83e3ae09f2
5 changed files with 122 additions and 24 deletions
97
.github/workflows/android.yml
vendored
97
.github/workflows/android.yml
vendored
|
|
@ -4,6 +4,9 @@ env:
|
|||
# The name of the main module repository
|
||||
main_project_module: app
|
||||
|
||||
permissions:
|
||||
contents: write # for deleting/creating a pre-release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
|
@ -13,10 +16,9 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # for deleting/creating a pre-release
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
|
|
@ -47,20 +49,99 @@ jobs:
|
|||
# Create APK Release
|
||||
- name: Build apk release project (APK)
|
||||
run: ./gradlew assemble
|
||||
|
||||
# Upload Artifact Build
|
||||
# Noted For Output [main_project_module]/build/outputs/apk/debug/
|
||||
- name: Upload APK Debug
|
||||
- name: Find Debug arm64
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/debug/ -type f -name '*arm64*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Debug arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: YTDLnis APK debug generated
|
||||
path: ${{ env.main_project_module }}/build/outputs/apk/debug/
|
||||
name: ytdlnis-autogenerated-arm64-v8a-debug
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Debug armeabiv7
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/debug/ -type f -name '*armeabi*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Debug armeabiv7
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-armeabi-v7a-debug
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Debug universal
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/debug/ -type f -name '*universal*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Debug universal
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-universal-debug
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Debug x86
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/debug/ -type f -name '*x86*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Debug x86
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-x86-debug
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Debug x86_64
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/debug/ -type f -name '*x86_64*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Debug x86_64
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-x86_64-debug
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
# Noted For Output [main_project_module]/build/outputs/apk/release/
|
||||
- name: Upload APK Release
|
||||
- name: Find Release arm64
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/release/ -type f -name '*arm64*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Release arm64
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: YTDLnis APK release generated
|
||||
path: ${{ env.main_project_module }}/build/outputs/apk/release/
|
||||
name: ytdlnis-autogenerated-arm64-v8a-release
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Release armeabiv7
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/release/ -type f -name '*armeabi*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Release armeabiv7
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-armeabi-v7a-release
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Release universal
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/release/ -type f -name '*universal*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Release universal
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-universal-release
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Release x86
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/release/ -type f -name '*x86*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Release x86
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-x86-release
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
- name: Find Release x86_64
|
||||
run: echo "APK_PATH=$(find ${{ env.main_project_module }}/build/outputs/apk/release/ -type f -name '*x86_64*.apk')" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK Release x86_64
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ytdlnis-autogenerated-x86_64-release
|
||||
path: ${{ env.APK_PATH }}
|
||||
|
||||
# Send Message To Telegram
|
||||
- name: send telegram message on push or pull
|
||||
|
|
|
|||
|
|
@ -169,21 +169,31 @@ class GeneralSettingsFragment : BaseSettingsFragment() {
|
|||
findPreference<ListPreference>("ytdlnis_theme")?.apply {
|
||||
summary = entry
|
||||
setOnPreferenceChangeListener { _, newValue ->
|
||||
summary = when(newValue){
|
||||
"System" -> {
|
||||
getString(R.string.system)
|
||||
}
|
||||
val dialog = MaterialAlertDialogBuilder(context)
|
||||
dialog.setTitle(context.getString(R.string.app_icon_change))
|
||||
dialog.setNegativeButton(context.getString(R.string.cancel)) { dialogInterface: DialogInterface, _: Int -> dialogInterface.cancel() }
|
||||
dialog.setPositiveButton(context.getString(R.string.ok)) { _: DialogInterface?, _: Int ->
|
||||
summary = when(newValue){
|
||||
"System" -> {
|
||||
getString(R.string.system)
|
||||
}
|
||||
|
||||
"Dark" -> {
|
||||
getString(R.string.dark)
|
||||
}
|
||||
"Dark" -> {
|
||||
getString(R.string.dark)
|
||||
}
|
||||
|
||||
else -> {
|
||||
getString(R.string.light)
|
||||
else -> {
|
||||
getString(R.string.light)
|
||||
}
|
||||
}
|
||||
editor.putString("ytdlnis_theme", newValue.toString()).apply()
|
||||
ThemeUtil.updateThemes()
|
||||
}
|
||||
ThemeUtil.updateThemes()
|
||||
true
|
||||
dialog.show()
|
||||
|
||||
|
||||
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -598,7 +598,6 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
|
|||
}else{
|
||||
request.addOption("-I", "${downloadItem.playlistIndex!!}:${downloadItem.playlistIndex}")
|
||||
}
|
||||
request.addOption("-i")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -861,7 +860,7 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
|
|||
}
|
||||
|
||||
if (abrSort.isNotBlank()){
|
||||
formatSorting.add(0, "abr:${abrSort}")
|
||||
formatSorting.add(0, "abr~${abrSort}")
|
||||
}
|
||||
|
||||
if(formatSorting.isNotEmpty()) {
|
||||
|
|
@ -902,6 +901,10 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
|
|||
}
|
||||
}
|
||||
|
||||
if (usePlaylistMetadata) {
|
||||
metadataCommands.addOption("--parse-metadata", "%(album,playlist_title,playlist|)s:%(album)s")
|
||||
}
|
||||
|
||||
|
||||
metadataCommands.addOption("--parse-metadata", "%(album_artist,first_artist|)s:%(album_artist)s")
|
||||
metadataCommands.addOption("--parse-metadata", "description:(?:.+?Released\\ on\\s*:\\s*(?P<dscrptn_year>\\d{4}))?")
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import androidx.work.OneTimeWorkRequestBuilder
|
|||
import androidx.work.WorkManager
|
||||
import androidx.work.WorkerParameters
|
||||
import com.deniscerri.ytdl.App
|
||||
import com.deniscerri.ytdl.R
|
||||
import com.deniscerri.ytdl.database.DBManager
|
||||
import com.deniscerri.ytdl.database.models.DownloadItem
|
||||
import com.deniscerri.ytdl.database.repository.DownloadRepository
|
||||
|
|
@ -23,7 +22,6 @@ import com.deniscerri.ytdl.database.repository.HistoryRepository
|
|||
import com.deniscerri.ytdl.database.repository.ObserveSourcesRepository
|
||||
import com.deniscerri.ytdl.database.repository.ResultRepository
|
||||
import com.deniscerri.ytdl.util.Extensions.calculateNextTimeForObserving
|
||||
import com.deniscerri.ytdl.util.Extensions.needsDataUpdating
|
||||
import com.deniscerri.ytdl.util.FileUtil
|
||||
import com.deniscerri.ytdl.util.NotificationUtil
|
||||
import com.deniscerri.ytdl.util.extractors.YTDLPUtil
|
||||
|
|
@ -47,6 +45,7 @@ class ObserveSourceWorker(
|
|||
val downloadRepo = DownloadRepository(dbManager.downloadDao)
|
||||
val commandTemplateDao = dbManager.commandTemplateDao
|
||||
val ytdlpUtil = YTDLPUtil(context, commandTemplateDao)
|
||||
val resultRepository = ResultRepository(dbManager.resultDao, commandTemplateDao, context)
|
||||
val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
|
||||
val item = repo.getByID(sourceID)
|
||||
|
|
@ -63,7 +62,7 @@ class ObserveSourceWorker(
|
|||
}
|
||||
|
||||
val list = kotlin.runCatching {
|
||||
ytdlpUtil.getFromYTDL(item.url)
|
||||
resultRepository.getResultsFromSource(item.url, resetResults = false, addToResults = false, singleItem = false)
|
||||
}.onFailure {
|
||||
Log.e("observe", it.toString())
|
||||
}.getOrElse { listOf() }
|
||||
|
|
@ -114,6 +113,10 @@ class ObserveSourceWorker(
|
|||
res.forEach {
|
||||
val string = Gson().toJson(item.downloadItemTemplate, DownloadItem::class.java)
|
||||
val downloadItem = Gson().fromJson(string, DownloadItem::class.java)
|
||||
downloadItem.title = it.title
|
||||
downloadItem.author = it.author
|
||||
downloadItem.duration = it.duration
|
||||
downloadItem.website = it.website
|
||||
downloadItem.url = it.url
|
||||
downloadItem.thumb = it.thumb
|
||||
downloadItem.status = DownloadRepository.Status.Queued.toString()
|
||||
|
|
|
|||
|
|
@ -463,4 +463,5 @@
|
|||
<string name="use_only_po_token">Use only PO Token (Ignore Player Client)</string>
|
||||
<string name="cache_directory">Cache Folder</string>
|
||||
<string name="cache_directory_warning">Changing the Cache Folder might cause unexpected issues. If the app cannot write to the configured path, it will resort to the default internal cache directory</string>
|
||||
<string name="app_icon_change">Icon could change and Application will close</string>
|
||||
</resources>
|
||||
Loading…
Reference in a new issue