Skip to content

Commit

Permalink
Merge pull request #8663 from Isira-Seneviratne/Remove_unnecessary_me…
Browse files Browse the repository at this point in the history
…thods

Remove unnecessary methods.
  • Loading branch information
Stypox authored Jul 23, 2022
2 parents 3281ed2 + 6d1c614 commit bfaf074
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -578,17 +578,13 @@ private void showContentNotSupportedIfNeeded() {
}

private PlayQueue getPlayQueue() {
return getPlayQueue(0);
}

private PlayQueue getPlayQueue(final int index) {
final List<StreamInfoItem> streamItems = infoListAdapter.getItemsList().stream()
.filter(StreamInfoItem.class::isInstance)
.map(StreamInfoItem.class::cast)
.collect(Collectors.toList());

return new ChannelPlayQueue(currentInfo.getServiceId(), currentInfo.getUrl(),
currentInfo.getNextPage(), streamItems, index);
currentInfo.getNextPage(), streamItems, 0);
}

/*//////////////////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void onSuccess(@NonNull final T result) {
public void onError(@NonNull final Throwable e) {
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
isComplete = true;
append(); // Notify change
notifyChange();
}
};
}
Expand Down Expand Up @@ -117,7 +117,7 @@ public void onSuccess(
public void onError(@NonNull final Throwable e) {
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
isComplete = true;
append(); // Notify change
notifyChange();
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,10 @@ public synchronized void offsetIndex(final int offset) {
}

/**
* Appends the given {@link PlayQueueItem}s to the current play queue.
*
* @see #append(List items)
* @param items {@link PlayQueueItem}s to append
* Notifies that a change has occurred.
*/
public synchronized void append(@NonNull final PlayQueueItem... items) {
append(List.of(items));
public synchronized void notifyChange() {
broadcast(new AppendEvent(0));
}

/**
Expand Down

0 comments on commit bfaf074

Please sign in to comment.