pull/653/head
deniscerri 2 years ago
parent c3d355d296
commit 032d4d58e9
No known key found for this signature in database
GPG Key ID: 95C43D517D830350

@ -1,5 +1,18 @@
# YTDLnis Changelog
> # 1.8.1.1 (2024-12)
# What's Changed
- Fixed some preferences having wrong description
- Fixed app not matching vp9 formats sometimes
- Fixed command templates order icon
- Fixed app crashing when going landscape on large tablets
- Player Client preference is now reset so its empty by default. If you had modified it, please set it again :)
- Added ability for the app to also move the write info json files along with the video if the user requests it as extra command
- Made the re-download button always show the download card for error downloads
- Used format sorting for selecting worst format instead of wv or wa
> # 1.8.1 (2024-11)
# What's Changed
@ -15,7 +28,6 @@
- #618, made all preferences with a description show their values
- Fixed bug that prevented app from loading all urls from text file
- Added ability to stop an observed source but not delete it
-
## Custom yt-dlp source

@ -12,7 +12,7 @@ def properties = new Properties()
def versionMajor = 1
def versionMinor = 8
def versionPatch = 1
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
def versionBuild = 1 // bump for dogfood builds, public betas, etc.
def isBeta = false
def versionExt = ""

@ -364,7 +364,13 @@ class ErroredDownloadsFragment : Fragment(), GenericDownloadAdapter.OnItemClickL
val item = withContext(Dispatchers.IO){
downloadViewModel.getItemByID(itemID)
}
downloadViewModel.queueDownloads(listOf(item), true)
findNavController().navigate(R.id.downloadBottomSheetDialog, bundleOf(
Pair("downloadItem", item),
Pair("result", downloadViewModel.createResultItemFromDownload(item)),
Pair("type", item.type)
))
adapter.notifyItemChanged(position)
}
}

@ -629,13 +629,18 @@ object UiUtil {
download.setOnClickListener {
longClickDownloadButton(item)
bottomSheet.cancel()
true
}
}
DownloadRepository.Status.Scheduled -> {
download!!.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_downloads, 0, 0, 0);
download.text = context.getString(R.string.download_now)
}
DownloadRepository.Status.Error -> {
download?.setOnClickListener {
longClickDownloadButton(item)
bottomSheet.cancel()
}
}
else -> {
download?.setOnLongClickListener {
longClickDownloadButton(item)
@ -645,7 +650,7 @@ object UiUtil {
}
}
if (status != DownloadRepository.Status.Queued){
if (status != DownloadRepository.Status.Queued && status != DownloadRepository.Status.Error){
download?.setOnClickListener {
bottomSheet.dismiss()
downloadItem(item)

@ -78,7 +78,8 @@ class YTDLPUtil(private val context: Context) {
val extraCommands = sharedPreferences.getString("data_fetching_extra_commands", "")!!
if (extraCommands.isNotBlank()){
addConfig(extraCommands)
addCommands(extraCommands.split(" ", "\t", "\n"))
//addConfig(extraCommands)
}
}
@ -762,12 +763,9 @@ class YTDLPUtil(private val context: Context) {
var abrSort = ""
var audioQualityId : String = downloadItem.format.format_id
if (audioQualityId.isBlank() || listOf("0", context.getString(R.string.best_quality), "ba", "best", "").contains(audioQualityId)){
if (audioQualityId.isBlank() || listOf("0", context.getString(R.string.best_quality), "ba", "best", "", context.getString(R.string.worst_quality), "wa", "worst").contains(audioQualityId)){
audioQualityId = "ba/b"
}else if (listOf(context.getString(R.string.worst_quality), "wa", "worst").contains(audioQualityId)){
audioQualityId = "wa/w"
}else if(audioQualityId.contains("kbps_ytdlnisgeneric")){
abrSort = audioQualityId.split("kbps")[0]
audioQualityId = ""
}else{
@ -798,6 +796,10 @@ class YTDLPUtil(private val context: Context) {
val formatSorting = StringBuilder("hasaud")
if (downloadItem.format.format_id == context.resources.getString(R.string.worst_quality) || downloadItem.format.format_id == "wa" || downloadItem.format.format_id == "worst") {
formatSorting.append(",+br,+res,+fps")
}
if (abrSort.isNotBlank()){
formatSorting.append(",abr:${abrSort}")
}
@ -990,11 +992,8 @@ class YTDLPUtil(private val context: Context) {
}
}
}else{
if (videoF == context.resources.getString(R.string.best_quality) || videoF == "best") {
if (videoF == context.resources.getString(R.string.best_quality) || videoF == "best" || videoF == context.resources.getString(R.string.worst_quality) || videoF == "worst") {
videoF = "bv"
}else if (videoF == context.resources.getString(R.string.worst_quality) || videoF == "worst") {
videoF = "wv"
if (audioF == "ba") audioF = "wa"
}else if (defaultFormats.contains(videoF)) {
hasGenericResulutionFormat = videoF.split("_")[0].dropLast(1)
videoF = "bv"
@ -1067,7 +1066,9 @@ class YTDLPUtil(private val context: Context) {
val preferredLanguage = sharedPreferences.getString("audio_language","")!!
StringBuilder().apply {
if (hasGenericResulutionFormat.isNotBlank()) {
if (downloadItem.format.format_id == context.resources.getString(R.string.worst_quality) || downloadItem.format.format_id == "worst") {
append(",+br,+res,+fps")
}else if (hasGenericResulutionFormat.isNotBlank()) {
append(",res:${hasGenericResulutionFormat}")
}
if (sharedPreferences.getBoolean("prefer_smaller_formats", false)) append(",+size")
@ -1145,14 +1146,16 @@ class YTDLPUtil(private val context: Context) {
}
if (downloadItem.extraCommands.isNotBlank() && downloadItem.type != DownloadViewModel.Type.command){
val cache = File(FileUtil.getCachePath(context))
cache.mkdirs()
val conf = File(cache.absolutePath + "/${System.currentTimeMillis()}${UUID.randomUUID()}.txt")
conf.createNewFile()
conf.writeText(downloadItem.extraCommands)
val tmp = mutableListOf<String>()
tmp.addOption("--config-locations", conf.absolutePath)
request.addCommands(tmp)
request.addCommands(downloadItem.extraCommands.split(" ", "\t", "\n"))
//
// val cache = File(FileUtil.getCachePath(context))
// cache.mkdirs()
// val conf = File(cache.absolutePath + "/${System.currentTimeMillis()}${UUID.randomUUID()}.txt")
// conf.createNewFile()
// conf.writeText(downloadItem.extraCommands)
// val tmp = mutableListOf<String>()
// tmp.addOption("--config-locations", conf.absolutePath)
// request.addCommands(tmp)
}
return request

@ -0,0 +1,8 @@
# What's Changed
- Fixed some preferences having wrong description
- Fixed app not matching vp9 formats sometimes
- Fixed app crashing when going landscape on large tablets
- Player Client preference is now reset so its empty by default.
- Made the re-download button always show the download card for error downloads
- Used format sorting for selecting worst format instead of wv or wa
Loading…
Cancel
Save