Feat(exoplayer): optional decoders (#533)
* Change Layout * Add string * Who did this? * Add listener * Made NextLib Conditional * Add Preferences
This commit is contained in:
parent
404d265a2d
commit
f13225e032
6 changed files with 39 additions and 27 deletions
20
.github/workflows/beta.yml
vendored
20
.github/workflows/beta.yml
vendored
|
@ -110,7 +110,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
if: ${{ env.SKIP_BUILD != 'true' && github.repository == 'rebelonion/Dantotsu' }}
|
if: ${{ env.SKIP_BUILD != 'true' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Dantotsu
|
name: Dantotsu
|
||||||
|
@ -118,24 +118,8 @@ jobs:
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
path: "app/build/outputs/apk/google/alpha/app-google-alpha.apk"
|
path: "app/build/outputs/apk/google/alpha/app-google-alpha.apk"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
if: ${{ env.SKIP_BUILD != 'true' && github.repository != 'rebelonion/Dantotsu' }}
|
|
||||||
uses: softprops/action-gh-release@v2.0.6
|
|
||||||
with:
|
|
||||||
files: app/build/outputs/apk/google/alpha/app-google-alpha.apk
|
|
||||||
name: ${{ env.BRANCH }} build ${{ env.VERSION }}
|
|
||||||
tag_name: v${{ env.VERSION }}
|
|
||||||
body: |
|
|
||||||
New Pretester Build ${{ env.VERSION }} released on branch "${{ env.BRANCH }}" :)
|
|
||||||
|
|
||||||
Commits:
|
|
||||||
${{ env.COMMIT_LOG }}
|
|
||||||
prerelease: false
|
|
||||||
make_latest: true
|
|
||||||
generate_release_notes: true
|
|
||||||
fail_on_unmatched_files: true
|
|
||||||
|
|
||||||
- name: Upload APK to Discord and Telegram
|
- name: Upload APK to Discord and Telegram
|
||||||
|
if: ${{ github.repository == 'rebelonion/Dantotsu' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Prepare Discord embed
|
# Prepare Discord embed
|
||||||
|
|
|
@ -1703,8 +1703,12 @@ class ExoplayerView : AppCompatActivity(), Player.Listener, SessionAvailabilityL
|
||||||
|
|
||||||
hideSystemBars()
|
hideSystemBars()
|
||||||
|
|
||||||
val decoder = DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
|
val useExtensionDecoder = PrefManager.getVal<Boolean>(PrefName.UseAdditionalCodec)
|
||||||
|
val decoder = if (useExtensionDecoder) {
|
||||||
|
DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER
|
||||||
|
} else {
|
||||||
|
DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF
|
||||||
|
}
|
||||||
val renderersFactory = NextRenderersFactory(this)
|
val renderersFactory = NextRenderersFactory(this)
|
||||||
.setEnableDecoderFallback(true)
|
.setEnableDecoderFallback(true)
|
||||||
.setExtensionRendererMode(decoder)
|
.setExtensionRendererMode(decoder)
|
||||||
|
|
|
@ -277,6 +277,11 @@ class PlayerSettingsActivity : AppCompatActivity() {
|
||||||
PrefManager.setVal(PrefName.RotationPlayer, isChecked)
|
PrefManager.setVal(PrefName.RotationPlayer, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.playerSettingsAdditionalCodec.isChecked = PrefManager.getVal(PrefName.UseAdditionalCodec)
|
||||||
|
binding.playerSettingsAdditionalCodec.setOnCheckedChangeListener { _, isChecked ->
|
||||||
|
PrefManager.setVal(PrefName.UseAdditionalCodec, isChecked)
|
||||||
|
}
|
||||||
|
|
||||||
val resizeModes = arrayOf("Original", "Zoom", "Stretch")
|
val resizeModes = arrayOf("Original", "Zoom", "Stretch")
|
||||||
binding.playerResizeMode.setOnClickListener {
|
binding.playerResizeMode.setOnClickListener {
|
||||||
customAlertDialog().apply {
|
customAlertDialog().apply {
|
||||||
|
|
|
@ -128,6 +128,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
||||||
Pip(Pref(Location.Player, Boolean::class, true)),
|
Pip(Pref(Location.Player, Boolean::class, true)),
|
||||||
RotationPlayer(Pref(Location.Player, Boolean::class, true)),
|
RotationPlayer(Pref(Location.Player, Boolean::class, true)),
|
||||||
TorrentEnabled(Pref(Location.Player, Boolean::class, false)),
|
TorrentEnabled(Pref(Location.Player, Boolean::class, false)),
|
||||||
|
UseAdditionalCodec(Pref(Location.Player, Boolean::class, true)),
|
||||||
|
|
||||||
//Reader
|
//Reader
|
||||||
ShowSource(Pref(Location.Reader, Boolean::class, true)),
|
ShowSource(Pref(Location.Reader, Boolean::class, true)),
|
||||||
|
@ -199,8 +200,6 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
||||||
RefreshStatus(Pref(Location.Irrelevant, Boolean::class, false)),
|
RefreshStatus(Pref(Location.Irrelevant, Boolean::class, false)),
|
||||||
rpcEnabled(Pref(Location.Irrelevant, Boolean::class, true)),
|
rpcEnabled(Pref(Location.Irrelevant, Boolean::class, true)),
|
||||||
|
|
||||||
//testing
|
|
||||||
|
|
||||||
//Protected
|
//Protected
|
||||||
DiscordToken(Pref(Location.Protected, String::class, "")),
|
DiscordToken(Pref(Location.Protected, String::class, "")),
|
||||||
DiscordId(Pref(Location.Protected, String::class, "")),
|
DiscordId(Pref(Location.Protected, String::class, "")),
|
||||||
|
|
|
@ -1232,6 +1232,27 @@
|
||||||
|
|
||||||
</com.google.android.material.materialswitch.MaterialSwitch>
|
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/playerSettingsAdditionalCodec"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:drawableStart="@drawable/ic_round_high_quality_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:paddingHorizontal="32dp"
|
||||||
|
android:text="@string/use_additional_codec"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="@color/bg_opp"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track">
|
||||||
|
|
||||||
|
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1073,7 +1073,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
||||||
<string name="private_mode">Private</string>
|
<string name="private_mode">Private</string>
|
||||||
<string name="omega_cursed">you have been Ǫ̴̺̙͎̤̫͓̮̰̿͝M̴͇̤͗́̾̈́̑̍̿̈͌͝Ȅ̴̡̨̛͉̣̙̩̲̣̤̟̪̣̎͗̎̆̒̉͆̆̕ͅͅǴ̸̯̬̗̠̙͛͐̀̈͋̀̈̽́̎̿͘͘͝ͅĀ̶̧̲̀ͅ ̴̢̟͕̜̓̾̓C̶̬̜̰̘̝̱̫͓͙̭̈́͐͋̓̏̈̍̓̀̌̾̚Ư̸̛̤̱̈́͆̽͊͛̐̓́̑͘̕̕͝R̸̨̨͈̬̱̺͕̪̪̘͕͎̂͛́̅̆̓̀͝ͅS̴̨̨̛̩̭̗̹̰̭̥͉̮̝̠̓̔͆̂͊͆̀̈́̅̕͘̚͝È̴̢̛̝͈̳͉͈͒͒̒̄̏̈̈́D̸̢̡̨̜̞̩̼̫̹̗̮͛̀̈̋̾̇̕̕͜ͅ</string>
|
<string name="omega_cursed">you have been Ǫ̴̺̙͎̤̫͓̮̰̿͝M̴͇̤͗́̾̈́̑̍̿̈͌͝Ȅ̴̡̨̛͉̣̙̩̲̣̤̟̪̣̎͗̎̆̒̉͆̆̕ͅͅǴ̸̯̬̗̠̙͛͐̀̈͋̀̈̽́̎̿͘͘͝ͅĀ̶̧̲̀ͅ ̴̢̟͕̜̓̾̓C̶̬̜̰̘̝̱̫͓͙̭̈́͐͋̓̏̈̍̓̀̌̾̚Ư̸̛̤̱̈́͆̽͊͛̐̓́̑͘̕̕͝R̸̨̨͈̬̱̺͕̪̪̘͕͎̂͛́̅̆̓̀͝ͅS̴̨̨̛̩̭̗̹̰̭̥͉̮̝̠̓̔͆̂͊͆̀̈́̅̕͘̚͝È̴̢̛̝͈̳͉͈͒͒̒̄̏̈̈́D̸̢̡̨̜̞̩̼̫̹̗̮͛̀̈̋̾̇̕̕͜ͅ</string>
|
||||||
<string name="omega_freed">you have been freed</string>
|
<string name="omega_freed">you have been freed</string>
|
||||||
|
|
||||||
<string name="subtitle_langauge">Subtitle Langauge</string>
|
<string name="subtitle_langauge">Subtitle Langauge</string>
|
||||||
<string name="socks5">SOCKS5</string>
|
<string name="socks5">SOCKS5</string>
|
||||||
<string name="host">Host</string>
|
<string name="host">Host</string>
|
||||||
|
@ -1085,6 +1084,6 @@ Non quae tempore quo provident laudantium qui illo dolor vel quia dolor et exerc
|
||||||
<string name="proxy_setup_desc">Configure your Socks5 Proxy</string>
|
<string name="proxy_setup_desc">Configure your Socks5 Proxy</string>
|
||||||
<string name="clear_stored_episode">Clear Stored Episode Data</string>
|
<string name="clear_stored_episode">Clear Stored Episode Data</string>
|
||||||
<string name="clear_stored_chapter">Clear Stored Chapter Data</string>
|
<string name="clear_stored_chapter">Clear Stored Chapter Data</string>
|
||||||
|
<string name="use_additional_codec">Additional Codec Support</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue