pull/1131/head
deniscerri 4 months ago
parent df7fe579aa
commit 4c36640950
No known key found for this signature in database
GPG Key ID: 95C43D517D830350

@ -463,6 +463,50 @@
</intent-filter>
</activity-alias>
<activity-alias
android:name=".ThemedIcon"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_launcher_themed"
android:roundIcon="@mipmap/ic_launcher_round_themed"
android:configChanges="locale"
android:launchMode="singleTask"
android:targetActivity=".MainActivity"
android:windowSoftInputMode="adjustPan">
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/txt" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".ThemedDarkIcon"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_launcher_themed_dark"
android:roundIcon="@mipmap/ic_launcher_round_themed_dark"
android:configChanges="locale"
android:launchMode="singleTask"
android:targetActivity=".MainActivity"
android:windowSoftInputMode="adjustPan">
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/txt" />
</intent-filter>
</activity-alias>
<activity
android:name=".ui.more.cookies.WebViewActivity"
android:configChanges="locale"

@ -49,12 +49,16 @@ class IconsSheetAdapter(val host: SettingHost) : RecyclerView.Adapter<IconsSheet
object Default : AppIcon(R.string.auto, R.mipmap.ic_launcher, "default")
object DefaultLight : AppIcon(R.string.light, R.mipmap.ic_launcher_light, "Light")
object DefaultDark : AppIcon(R.string.dark, R.mipmap.ic_launcher_dark, "Dark")
object Themed : AppIcon(R.string.Theme, R.mipmap.ic_launcher_themed, "Themed")
object ThemedDark : AppIcon(R.string.Theme, R.mipmap.ic_launcher_themed_dark, "ThemedDark")
}
val availableIcons = listOf(
AppIcon.Default,
AppIcon.DefaultLight,
AppIcon.DefaultDark
AppIcon.DefaultDark,
AppIcon.Themed,
AppIcon.ThemedDark,
)
}
}

@ -62,12 +62,16 @@ object ThemeUtil {
object Default : AppIcon(R.mipmap.ic_launcher, "Default")
object Light : AppIcon(R.mipmap.ic_launcher_light, "LightIcon")
object Dark : AppIcon(R.mipmap.ic_launcher_dark, "DarkIcon")
object Themed : AppIcon(R.mipmap.ic_launcher_themed, "ThemedIcon")
object ThemedDark : AppIcon(R.mipmap.ic_launcher_themed_dark, "ThemedDarkIcon")
}
private val availableIcons = listOf(
AppIcon.Default,
AppIcon.Light,
AppIcon.Dark
AppIcon.Dark,
AppIcon.Themed,
AppIcon.ThemedDark
)
fun recreateMain() {
@ -188,6 +192,22 @@ object ThemeUtil {
PackageManager.DONT_KILL_APP
)
}
"Themed" -> {
//set themed icon
activity.packageManager.setComponentEnabledSetting(
ComponentName(activity.packageName, "com.deniscerri.ytdl.ThemedIcon"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP
)
}
"ThemedDark" -> {
//set themed icon
activity.packageManager.setComponentEnabledSetting(
ComponentName(activity.packageName, "com.deniscerri.ytdl.ThemedDarkIcon"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP
)
}
// or "System"
else -> {
//set dynamic icon

@ -1258,8 +1258,12 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
var cont = ""
val outputContainer = downloadItem.container
if(outputContainer.isNotEmpty() && outputContainer != "Default" && outputContainer != context.getString(
R.string.defaultValue) && supportedContainers.contains(outputContainer)){
if(
outputContainer.isNotEmpty() &&
outputContainer != "Default" &&
outputContainer != context.getString(R.string.defaultValue) &&
supportedContainers.contains(outputContainer)
){
cont = outputContainer
val cantRecode = listOf("avi")
@ -1313,7 +1317,7 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
val preferredCodec = sharedPreferences.getString("video_codec", "")
val vCodecPrefIndex = context.getStringArray(R.array.video_codec_values).indexOf(preferredCodec)
var vCodecPref = context.getStringArray(R.array.video_codec_values_ytdlp)[vCodecPrefIndex]
val vCodecPref = context.getStringArray(R.array.video_codec_values_ytdlp)[vCodecPrefIndex]
if (downloadItem.videoPreferences.compatibilityMode) {
request.addOption("--recode-video", "mp4")
@ -1455,8 +1459,10 @@ class YTDLPUtil(private val context: Context, private val commandTemplateDao: Co
}
}
"container" -> {
if (cont.isNotBlank()) formatSorting.add("vext:$cont")
if (acont.isNotBlank()) formatSorting.add("aext:$acont")
if (!downloadItem.videoPreferences.compatibilityMode) {
if (cont.isNotBlank()) formatSorting.add("vext:$cont")
if (acont.isNotBlank()) formatSorting.add("aext:$acont")
}
}
}
}

@ -0,0 +1,15 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:gravity="fill_horizontal|fill_vertical"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:name="path"
android:pathData="M 73.977 46.512 C 75.734 48.222 76.781 50.662 76.872 53.315 C 76.945 55.412 77 57.629 77 59.482 C 77 61.335 76.945 63.552 76.872 65.649 C 76.718 70.133 73.835 74.006 69.404 74.78 C 65.706 75.426 60.571 76 54 76 C 47.429 76 42.294 75.426 38.596 74.78 C 34.165 74.006 31.282 70.133 31.128 65.649 C 31.055 63.552 31 61.335 31 59.482 C 31 57.629 31.055 55.412 31.128 53.315 C 31.282 48.831 34.165 44.957 38.596 44.183 C 41.576 43.663 45.489 43.189 50.335 43.025 C 51.232 37.348 56.145 33 62.083 33 C 68.658 33 73.977 38.331 73.977 44.895 L 73.977 46.512 Z M 52.345 42.976 C 52.886 42.968 53.438 42.963 54 42.963 L 54.086 42.963 C 53.495 42.964 52.915 42.969 52.347 42.978 C 52.224 43.601 52.16 44.244 52.16 44.902 L 52.16 51.756 L 48.489 51.76 C 46.26 51.763 44.867 54.174 45.98 56.106 L 51.541 65.764 C 52.656 67.699 55.448 67.701 56.565 65.767 L 62.15 56.095 C 63.267 54.161 61.869 51.744 59.636 51.747 L 55.803 51.752 L 55.803 44.902 L 55.803 44.895 L 55.782 44.895 C 55.782 41.413 58.603 38.59 62.083 38.59 C 65.26 38.59 67.888 40.943 68.322 44.003 C 68.695 44.062 69.056 44.122 69.404 44.183 C 70.345 44.347 71.216 44.651 72.006 45.071 L 72.006 44.895 C 72.006 39.412 67.563 34.967 62.083 34.967 C 57.259 34.967 53.239 38.411 52.345 42.976 Z M 66.248 43.705 C 65.731 41.885 64.058 40.557 62.083 40.557 C 60.356 40.557 58.86 41.571 58.166 43.043 C 61.248 43.162 63.941 43.407 66.248 43.705 Z"
android:fillColor="?attr/colorPrimaryDark"
android:strokeWidth="1"
android:fillType="evenOdd"/>
</vector>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background_light"/>
<foreground android:drawable="@drawable/ic_launcher_foreground_themed"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground_themed"/>
</adaptive-icon>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background_dark"/>
<foreground android:drawable="@drawable/ic_launcher_foreground_themed"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground_themed"/>
</adaptive-icon>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background_light"/>
<foreground android:drawable="@drawable/ic_launcher_foreground_themed"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground_themed"/>
</adaptive-icon>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background_dark"/>
<foreground android:drawable="@drawable/ic_launcher_foreground_themed"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground_themed"/>
</adaptive-icon>
Loading…
Cancel
Save