Merge branch 'dev' into refactor

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta 2025-12-13 16:09:55 +08:00
commit 0fc2d4c948
5 changed files with 22 additions and 9 deletions

View File

@ -304,10 +304,6 @@ dependencies {
implementation(libs.google.exoplayer.smoothstreaming)
implementation(libs.google.exoplayer.ui)
// Metadata generator for service descriptors
compileOnly(libs.google.autoservice.annotations)
ksp(libs.google.autoservice.compiler)
// Manager for complex RecyclerView layouts
implementation(libs.lisawray.groupie.core)
implementation(libs.lisawray.groupie.viewbinding)
@ -322,6 +318,8 @@ dependencies {
// Crash reporting
implementation(libs.acra.core)
compileOnly(libs.google.autoservice.annotations)
ksp(libs.zacsweers.autoservice.compiler)
// Properly restarting
implementation(libs.jakewharton.phoenix)

View File

@ -35,7 +35,7 @@ abstract class StreamHistoryDAO : BasicDAO<StreamHistoryEntity> {
abstract val historySortedById: Flowable<MutableList<StreamHistoryEntry>>
@Query("SELECT * FROM stream_history WHERE stream_id = :streamId ORDER BY access_date DESC LIMIT 1")
abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity
abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity?
@Query("DELETE FROM stream_history WHERE stream_id = :streamId")
abstract fun deleteStreamHistory(streamId: Long): Int

View File

@ -1730,12 +1730,13 @@ class VideoDetailFragment :
}
override fun onFullscreenToggleButtonClicked() {
// On Android TV screen rotation is not supported
// In tablet user experience will be better if screen will not be rotated
// from landscape to portrait every time.
// Just turn on fullscreen mode in landscape orientation
// or portrait & unlocked global orientation
val isLandscape = DeviceUtils.isLandscape(requireContext())
if (DeviceUtils.isTablet(activity) &&
if (DeviceUtils.isTv(activity) || DeviceUtils.isTablet(activity) &&
(!PlayerHelper.globalScreenOrientationLocked(activity) || isLandscape)
) {
player!!.UIs().get(MainPlayerUi::class)?.toggleFullscreen()

View File

@ -13,6 +13,9 @@ import androidx.annotation.StringRes;
import org.schabi.newpipe.R;
import org.schabi.newpipe.database.stream.model.StreamEntity;
import org.schabi.newpipe.download.DownloadDialog;
import org.schabi.newpipe.error.ErrorInfo;
import org.schabi.newpipe.error.ErrorUtil;
import org.schabi.newpipe.error.UserAction;
import org.schabi.newpipe.local.dialog.PlaylistAppendDialog;
import org.schabi.newpipe.local.dialog.PlaylistDialog;
import org.schabi.newpipe.local.history.HistoryRecordManager;
@ -133,6 +136,16 @@ public enum StreamDialogDefaultEntry {
MARK_AS_WATCHED(R.string.mark_as_watched, (fragment, item) ->
new HistoryRecordManager(fragment.getContext())
.markAsWatched(item)
.doOnError(error -> {
ErrorUtil.showSnackbar(
fragment.requireContext(),
new ErrorInfo(
error,
UserAction.OPEN_INFO_ITEM_DIALOG,
"Got an error when trying to mark as watched"
)
);
})
.onErrorComplete()
.observeOn(AndroidSchedulers.mainThread())
.subscribe()

View File

@ -9,7 +9,8 @@ acra = "5.13.1"
agp = "8.13.1"
appcompat = "1.7.1"
assertj = "3.27.6"
autoservice = "1.1.1"
autoservice-google = "1.1.1"
autoservice-zacsweers = "1.2.0"
bridge = "v2.0.2"
cardview = "1.0.0"
checkstyle = "12.1.2"
@ -114,8 +115,7 @@ evernote-statesaver-core = { module = "com.evernote:android-state", version.ref
facebook-stetho-core = { module = "com.facebook.stetho:stetho", version.ref = "stetho" }
facebook-stetho-okhttp3 = { module = "com.facebook.stetho:stetho-okhttp3", version.ref = "stetho" }
google-android-material = { module = "com.google.android.material:material", version.ref = "material" }
google-autoservice-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoservice" }
google-autoservice-compiler = { module = "com.google.auto.service:auto-service", version.ref = "autoservice" }
google-autoservice-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoservice-google" }
google-exoplayer-core = { module = "com.google.android.exoplayer:exoplayer-core", version.ref = "exoplayer" }
google-exoplayer-dash = { module = "com.google.android.exoplayer:exoplayer-dash", version.ref = "exoplayer" }
google-exoplayer-database = { module = "com.google.android.exoplayer:exoplayer-database", version.ref = "exoplayer" }
@ -152,6 +152,7 @@ squareup-leakcanary-core = { module = "com.squareup.leakcanary:leakcanary-androi
squareup-leakcanary-plumber = { module = "com.squareup.leakcanary:plumber-android", version.ref = "leakcanary" }
squareup-leakcanary-watcher = { module = "com.squareup.leakcanary:leakcanary-object-watcher-android", version.ref = "leakcanary" }
squareup-okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
zacsweers-autoservice-compiler = { module = "dev.zacsweers.autoservice:auto-service-ksp", version.ref = "autoservice-zacsweers" }
[plugins]
about-libraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "about-libraries" }