From d1d9a341bd8727a2704264b4474de2a9d12abab4 Mon Sep 17 00:00:00 2001 From: zaednasr <75589932+zaednasr@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:01:37 +0200 Subject: [PATCH] 1.8.0 --- CHANGELOG.md | 23 +++++++++++++ README-az.md | 2 +- README-es.md | 4 +-- README-id.md | 2 +- README-ja.md | 4 +-- README-pt.md | 2 +- README-sq.md | 2 +- README.md | 4 +-- app/build.gradle | 6 ++-- .../ytdl/database/dao/DownloadDao.kt | 16 +++++++--- .../database/viewmodel/DownloadViewModel.kt | 32 ++++++++++++------- .../ytdl/ui/downloads/HistoryFragment.kt | 1 + .../android/en-US/changelogs/108000000.txt | 8 +++++ 13 files changed, 76 insertions(+), 30 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/108000000.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index 78baeaca..7ea6ad86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # YTDLnis Changelog +> # 1.8.0 (2024-10) + +# Notice + +This version has the updated python version 3.11. Due to yt-dlp's deprecation of python 3.8, this update had to be made, but at the same time support for Android 6 will be dropped. Android 6 users can still keep using the previous version until yt-dlp stops working in the future. + +# What's Changed + +- Re-added individual pause button for downloads +- Added ability to set preferred command template +- Added PO Token setting for youtube extractor arguments +- Added customizable client for youtube extractor arguments +- Added preference to add extra youtube extractor arguments +- Added a header on cancelled/errored/scheduled/saved tabs to show the count and a dropdown menu to delete and copy urls instead of using the main queue screen menu +- Fixed app not starting scheduled downloads with the resume button if there were no paused downloads, weird ik +- Added Socket Timeout in Download Settings +- Fixed app not adding extra commands in the very end of the command list +- Fixed #580 +- Small fixes on the home screen channel tab filters +- Fixed app crashing when pressing the thumbnail icon in the result card details. The icon is hidden if there is no thumbnail +- Watch Videos playlist type link is supported for data fetching and downloading. +- Added ability to parse the "artists" tag when fetching data for ytm + > # 1.7.9.2 (2024-09) # What's Changed diff --git a/README-az.md b/README-az.md index 913d62c9..0b9df070 100644 --- a/README-az.md +++ b/README-az.md @@ -10,7 +10,7 @@

- YTDLnis Android 6.0 və yuxarı üçün yt-dlp istifadə edən pulsuz və açıq mənbəli video/səs yükləyicidir. + YTDLnis Android 7.0 və yuxarı üçün yt-dlp istifadə edən pulsuz və açıq mənbəli video/səs yükləyicidir.

diff --git a/README-es.md b/README-es.md index 179d7c82..cb9972e2 100644 --- a/README-es.md +++ b/README-es.md @@ -10,10 +10,10 @@

-YTDLnis es un descargador de audio/video gratuito y de código abierto que utiliza yt-dlp para Android 6.0 y superior. +YTDLnis es un descargador de audio/video gratuito y de código abierto que utiliza yt-dlp para Android 7.0 y superior.

- [Creado por Denis Çerri. Actualmente mantenido por zaednasr] + Creado por Denis Çerri

diff --git a/README-id.md b/README-id.md index 67ee9e1a..e7a3dc45 100644 --- a/README-id.md +++ b/README-id.md @@ -10,7 +10,7 @@

- YTDLnis adalah pengunduh video/audio sumber terbuka dan gratis yang menggunakan yt-dlp bagi Android 6.0 ke atas. + YTDLnis adalah pengunduh video/audio sumber terbuka dan gratis yang menggunakan yt-dlp bagi Android 7.0 ke atas.

diff --git a/README-ja.md b/README-ja.md index eee84db8..b5ad63fb 100644 --- a/README-ja.md +++ b/README-ja.md @@ -20,10 +20,10 @@

- YTDLnisは、Android 6.0以降に対応した、yt-dlpを使用した無料かつオープンソースのビデオ/オーディオダウンローダーです。 + YTDLnisは、Android 7.0以降に対応した、yt-dlpを使用した無料かつオープンソースのビデオ/オーディオダウンローダーです。

- [Denis Çerriによって作成されました。現在はzaednasrによってメンテナンスされています] + Denis Çerriによって作成されました

diff --git a/README-pt.md b/README-pt.md index 8250ce12..4a9787f5 100644 --- a/README-pt.md +++ b/README-pt.md @@ -10,7 +10,7 @@

- YTDLnis é um aplicativo gratuito e de código aberto para baixar vídeos/áudios usando yt-dlp disponível para o Android 6.0 e superior. + YTDLnis é um aplicativo gratuito e de código aberto para baixar vídeos/áudios usando yt-dlp disponível para o Android 7.0 e superior.

diff --git a/README-sq.md b/README-sq.md index 7235afc7..fd64d097 100644 --- a/README-sq.md +++ b/README-sq.md @@ -10,7 +10,7 @@

- YTDLnis është një shkarkues video/audio falas dhe me burim të hapur duke përdorur yt-dlp për Android 6.0 dhe më lart. + YTDLnis është një shkarkues video/audio falas dhe me burim të hapur duke përdorur yt-dlp për Android 7.0 dhe më lart.

diff --git a/README.md b/README.md index 6ef0476f..98a1058c 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@

- YTDLnis is a free and open source video/audio downloader using yt-dlp for Android 6.0 and above. + YTDLnis is a free and open source video/audio downloader using yt-dlp for Android 7.0 and above.

- [Created by Denis Çerri. Currently being maintained by zaednasr] + Created by Denis Çerri

diff --git a/app/build.gradle b/app/build.gradle index 5c1aae1a..c19a2a8b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,9 +9,9 @@ plugins { def properties = new Properties() def versionMajor = 1 -def versionMinor = 7 -def versionPatch = 9 -def versionBuild = 2 // bump for dogfood builds, public betas, etc. +def versionMinor = 8 +def versionPatch = 0 +def versionBuild = 0 // bump for dogfood builds, public betas, etc. def isBeta = false def versionExt = "" diff --git a/app/src/main/java/com/deniscerri/ytdl/database/dao/DownloadDao.kt b/app/src/main/java/com/deniscerri/ytdl/database/dao/DownloadDao.kt index a0e4d920..2694ef41 100644 --- a/app/src/main/java/com/deniscerri/ytdl/database/dao/DownloadDao.kt +++ b/app/src/main/java/com/deniscerri/ytdl/database/dao/DownloadDao.kt @@ -118,7 +118,7 @@ interface DownloadDao { @Query("SELECT * FROM downloads WHERE status='Scheduled' ORDER BY downloadStartTime, id") fun getScheduledDownloadsList() : List - @Query("SELECT id FROM downloads WHERE status='Queued' ORDER BY id") + @Query("SELECT id FROM downloads WHERE status='Queued' ORDER BY downloadStartTime, id") fun getQueuedDownloadsListIDs() : List @RewriteQueriesToDropUnusedColumns @@ -289,8 +289,11 @@ interface DownloadDao { resetScheduleTimeForItems(existingIDs) existingIDs.forEach { updateDownloadID(it, -it) } - downloads.filter { !existingIDs.contains(it) }.reversed().forEach { - updateDownloadID(it, it + existingIDs.size) + downloads.filter { !existingIDs.contains(it) }.toMutableList().apply { + this.reverse() + this.forEach { + updateDownloadID(it, it + existingIDs.size) + } } existingIDs.forEachIndexed { idx, it -> @@ -305,8 +308,11 @@ interface DownloadDao { resetScheduleTimeForItems(existingIDs) existingIDs.forEach { updateDownloadID(it, -it) } - downloads.filter { !existingIDs.contains(it) }.reversed().forEach { - updateDownloadID(it, it + existingIDs.size) + downloads.filter { !existingIDs.contains(it) }.toMutableList().apply { + this.reverse() + this.forEach { + updateDownloadID(it, it + existingIDs.size) + } } existingIDs.forEachIndexed { idx, it -> diff --git a/app/src/main/java/com/deniscerri/ytdl/database/viewmodel/DownloadViewModel.kt b/app/src/main/java/com/deniscerri/ytdl/database/viewmodel/DownloadViewModel.kt index 84e51662..97d338f8 100644 --- a/app/src/main/java/com/deniscerri/ytdl/database/viewmodel/DownloadViewModel.kt +++ b/app/src/main/java/com/deniscerri/ytdl/database/viewmodel/DownloadViewModel.kt @@ -176,7 +176,7 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel return@combine PausedAllDownloadsState.HIDDEN }else if (paused > 1 || (active == 0 && queued > 0) || (paused > 0 && active > 0)) { return@combine PausedAllDownloadsState.RESUME - }else if (active > 1) { + }else if (active > 1 || (active > 0 && queued > 0)) { return@combine PausedAllDownloadsState.PAUSE }else{ return@combine PausedAllDownloadsState.HIDDEN @@ -767,12 +767,14 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel //other ids that need to move around val takenPositions = mutableListOf() - for (dID in downloads.filter { !ids.contains(it) && it < lastID }.reversed()){ - val newID = downloads.last { !newIDs.contains(it) && !takenPositions.contains(it) && it <= lastID } - takenPositions.add(newID) - dao.updateDownloadID(dID, newID) + downloads.filter { !ids.contains(it) && it < lastID }.toMutableList().apply { + this.reverse() + this.forEach { dID -> + val newID = downloads.last { !newIDs.contains(it) && !takenPositions.contains(it) && it <= lastID } + takenPositions.add(newID) + dao.updateDownloadID(dID, newID) + } } - ids.forEachIndexed { idx, it -> dao.updateDownloadID(-it, newIDs[idx]) } @@ -782,7 +784,7 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel suspend fun putAtBottomOfQueue(ids: List) = CoroutineScope(Dispatchers.IO).launch{ val downloads = dao.getQueuedDownloadsListIDs() ids.forEach { dao.updateDownloadID(it, -it)} - val newIDs = downloads.sortedByDescending { it }.take(ids.size) + val newIDs = downloads.takeLast(ids.size) //other ids that need to move around val takenPositions = mutableListOf() @@ -792,8 +794,11 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel dao.updateDownloadID(dID, newID) } - ids.reversed().forEachIndexed { idx, it -> - dao.updateDownloadID(-it, newIDs[idx]) + ids.toMutableList().apply { + this.reverse() + this.forEachIndexed { idx, it -> + dao.updateDownloadID(-it, newIDs[idx]) + } } } @@ -803,9 +808,12 @@ class DownloadViewModel(private val application: Application) : AndroidViewModel dao.updateDownloadID(current, -current) if (current > id){ - for (dID in downloads.filter { it in id until current }.reversed()){ - val index = downloads.indexOf(dID) - dao.updateDownloadID(dID, downloads[index + 1]) + downloads.filter { it in id until current }.toMutableList().apply { + this.reverse() + this.forEach { dID -> + val index = downloads.indexOf(dID) + dao.updateDownloadID(dID, downloads[index + 1]) + } } }else{ for (dID in downloads.filter { it in (current + 1)..id }){ diff --git a/app/src/main/java/com/deniscerri/ytdl/ui/downloads/HistoryFragment.kt b/app/src/main/java/com/deniscerri/ytdl/ui/downloads/HistoryFragment.kt index e0624e6b..64e22f34 100644 --- a/app/src/main/java/com/deniscerri/ytdl/ui/downloads/HistoryFragment.kt +++ b/app/src/main/java/com/deniscerri/ytdl/ui/downloads/HistoryFragment.kt @@ -151,6 +151,7 @@ class HistoryFragment : Fragment(), HistoryAdapter.OnItemClickListener{ historyViewModel = ViewModelProvider(this)[HistoryViewModel::class.java] historyViewModel.allItems.observe(viewLifecycleOwner) { + allhistoryList = it if(it.isEmpty()){ noResults!!.visibility = VISIBLE selectionChips!!.visibility = GONE diff --git a/fastlane/metadata/android/en-US/changelogs/108000000.txt b/fastlane/metadata/android/en-US/changelogs/108000000.txt new file mode 100644 index 00000000..8ec34eaa --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/108000000.txt @@ -0,0 +1,8 @@ +# What's Changed + +- Update to Python 3.11, FFMpeg 7.0.1, Cryptodome-3.20.0, mutagen-1.47.0 +- Re-added individual pause button for downloads +- Added ability to set preferred command template +- Added youtube extractor argument preferences +- Download Queue general fixes +- Read the Github changelog for more info \ No newline at end of file