Skip to content

Latest commit

 

History

History
141 lines (108 loc) · 4.05 KB

File metadata and controls

141 lines (108 loc) · 4.05 KB

Yutup Android Auto Modifications

This file documents the modifications made for the Android Auto interface. These modifications must be re-applied when the developer releases an update.


Overview

These modifications:

  1. Add a "Feed" category to the Android Auto main menu
  2. Filter Feed content (excludes upcoming/coming soon content)
  3. Change application name to "Q-Tube"
  4. Remove donation menu from About page

Modified Files

1. app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserCommon.kt

Changes:

  • Added ID_FEED constant

Added code (line 11):

internal const val ID_FEED = "feed"

2. app/src/main/java/org/schabi/newpipe/player/mediabrowser/MediaBrowserImpl.kt

A. Import Changes

Added imports:

import org.schabi.newpipe.local.feed.FeedDatabaseManager

B. Class Field Changes

Added field:

private val feedDatabaseManager = FeedDatabaseManager(context)

C. populateFeed() Method

New code:

private fun populateFeed(): Single<List<MediaBrowserCompat.MediaItem>> {
    return feedDatabaseManager.getStreams(
        FeedGroupEntity.GROUP_ALL_ID,
        false,  // includePlayedStreams
        false,  // includePartiallyPlayedStreams
        false   // includeFutureStreams - false to exclude upcoming/coming soon content
    ).toSingle().map { streamWithStateList ->
        streamWithStateList.map { streamWithState ->
            createStreamMediaItem(
                streamWithState.stream.uid,
                streamWithState.stream.title,
                streamWithState.stream.uploader,
                streamWithState.stream.thumbnailUrl,
                streamWithState.stream.url,
                streamWithState.stream.serviceId
            )
        }
    }
}

Note: This change filters "upcoming/coming soon" content, just like the phone app.

D. Root Menu Items

New code:

if (path.isEmpty()) {
    return Single.just(
        listOf(
            createRootMediaItem(
                ID_FEED,
                context.resources.getString(R.string.fragment_feed_title),
                R.drawable.ic_subscriptions
            ),
            createRootMediaItem(
                ID_BOOKMARKS,
                context.resources.getString(R.string.tab_bookmarks_short),
                R.drawable.ic_bookmark_white
            ),
            createRootMediaItem(
                ID_HISTORY,
                context.resources.getString(R.string.action_history),
                R.drawable.ic_history_white
            )
        )
    )
}

Change Summary

File Change Type Description
MediaBrowserCommon.kt Addition ID_FEED constant
MediaBrowserImpl.kt Import FeedDatabaseManager import
MediaBrowserImpl.kt Field feedDatabaseManager instance
MediaBrowserImpl.kt Method populateFeed() - Filtering using FeedDatabaseManager
MediaBrowserImpl.kt Menu Feed, Bookmarks, History - Subscriptions removed
build.gradle.kts Modification Application name changed to "Q-Tube"
strings.xml Global Rebranded all "Tubular/NewPipe/Yutup" occurrences to "Q-Tube"
Source Code Global Updated class titles and metadata to "Q-Tube"
fragment_about.xml Removal Donation section removed
AboutActivity.kt Removal Donation link code removed

APK Building

To build the APK after making the changes:

./gradlew assembleDebug

Built APK: app/build/outputs/apk/debug/app-debug.apk


Notes

  1. Feed Filtering: The includeFutureStreams=false parameter prevents upcoming (not yet released) content from being displayed. This is consistent behavior with the phone app.

  2. Menu Structure: In Android Auto, the following menus are available:

    • Feed: Videos from subscriptions (filtered)
    • Bookmarks: Saved playlists
    • History: Watch history
  3. Subscriptions: This menu was removed because loading channel content over the network was problematic. Feed already shows videos from subscriptions.