Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ SmartTube is a free and open-source media client for Android TVs and TV boxes. I
- HDR compatibility
- View live chat
- Customizable buttons
- Shuffle playlists & channels
- Does not require Google Services
- Helpful international community

Expand Down Expand Up @@ -169,6 +170,11 @@ SmartTube supports playing videos in PiP mode. This needs to be enabled under _S
You can adjust the playback speed pressing the speed-indicator icon (gauge) in the top row of the player. This is remembered across videos. Some speeds may case frame drops, this is a known issue.


### Shuffle Playlists & Channels

You can shuffle any playlist or channel's uploads by long-pressing a video, playlist, or channel card and selecting _Shuffle playlist_ or _Shuffle channel_ from the context menu. SmartTube loads all available videos, shuffles them, and plays them back in a random order. The shuffled list is cached so that launching the same shuffle again starts playback instantly.


### Voice Search

To enable global voice search, an additional app must be installed alongside SmartTube. This _bridge app_ allows the system voice search to open SmartTube instead of the default YouTube app. For this to work, you must uninstall the original YouTube app. We know this sucks, but you can always reinstall it if you change your mind. The _bridge app_ will not show up in your launcher and you cannot launch it directly; it is only used internally by the system's voice search. On some devices, you need to explicitly say "Youtube" when searching (e.g. say "youtube cute cats" instead of just "cute cats").
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ public void removeAllAfterCurrent() {
}
}

/**
* Replace everything after the currently playing track with a new tail.
* Indices 0..mCurrentIndex are untouched. Caller must de-dup beforehand.
*/
public void spliceAfterCurrent(List<Video> newTail) {
removeAllAfterCurrent();
mPlaylist.addAll(newTail);
}

/**
* Trim playlist if one exceeds needed size or current element not last in the list
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,15 @@ private void prepareAndShowDialog() {
appendUnsubscribeButton();
appendMarkAsWatched();
appendTogglePinVideoToSidebarButton();
appendShuffleChannelButton();

mDialogPresenter.showDialog(mVideo.getTitle());
}

private void appendShuffleChannelButton() {
VideoMenuPresenter.instance(getContext()).appendShuffleChannelCardButton(mVideo, mDialogPresenter);
}

private void appendOpenChannelUploadsButton() {
if (mVideo == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ private void prepareAndShowDialogSigned() {
appendToggleHistoryButton();
appendClearHistoryButton();
appendUpdateCheckButton();
appendShufflePlaylistButton();
appendShuffleChannelButton();

for (Long menuItem : MainUIData.instance(getContext()).getMenuItemsOrdered()) {
MenuAction menuAction = mMenuMapping.get(menuItem);
Expand Down Expand Up @@ -131,6 +133,8 @@ private void prepareAndShowDialogUnsigned() {
appendMoveSectionButton();
appendRenameSectionButton();
appendClearHistoryButton();
appendShufflePlaylistButton();
appendShuffleChannelButton();

for (Long menuItem : MainUIData.instance(getContext()).getMenuItemsOrdered()) {
MenuAction menuAction = mMenuMapping.get(menuItem);
Expand Down Expand Up @@ -265,6 +269,14 @@ private void processNextChannel(MediaServiceManager serviceManager, Iterator<Med
}
}

private void appendShufflePlaylistButton() {
VideoMenuPresenter.instance(getContext()).appendShufflePlaylistCardButton(getVideo(), mDialogPresenter);
}

private void appendShuffleChannelButton() {
VideoMenuPresenter.instance(getContext()).appendShuffleChannelCardButton(getVideo(), mDialogPresenter);
}

private void disposeActions() {
//RxUtils.disposeActions(mPlaylistAction);
}
Expand Down
Loading