Merge pull request #8663 from Isira-Seneviratne/Remove_unnecessary_methods
Remove unnecessary methods.
This commit is contained in:
commit
bfaf074f4e
|
@ -578,17 +578,13 @@ public class ChannelFragment extends BaseListInfoFragment<StreamInfoItem, Channe
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayQueue getPlayQueue() {
|
private PlayQueue getPlayQueue() {
|
||||||
return getPlayQueue(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private PlayQueue getPlayQueue(final int index) {
|
|
||||||
final List<StreamInfoItem> streamItems = infoListAdapter.getItemsList().stream()
|
final List<StreamInfoItem> streamItems = infoListAdapter.getItemsList().stream()
|
||||||
.filter(StreamInfoItem.class::isInstance)
|
.filter(StreamInfoItem.class::isInstance)
|
||||||
.map(StreamInfoItem.class::cast)
|
.map(StreamInfoItem.class::cast)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
return new ChannelPlayQueue(currentInfo.getServiceId(), currentInfo.getUrl(),
|
return new ChannelPlayQueue(currentInfo.getServiceId(), currentInfo.getUrl(),
|
||||||
currentInfo.getNextPage(), streamItems, index);
|
currentInfo.getNextPage(), streamItems, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*//////////////////////////////////////////////////////////////////////////
|
/*//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -82,7 +82,7 @@ abstract class AbstractInfoPlayQueue<T extends ListInfo<StreamInfoItem>>
|
||||||
public void onError(@NonNull final Throwable e) {
|
public void onError(@NonNull final Throwable e) {
|
||||||
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
|
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
|
||||||
isComplete = true;
|
isComplete = true;
|
||||||
append(); // Notify change
|
notifyChange();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ abstract class AbstractInfoPlayQueue<T extends ListInfo<StreamInfoItem>>
|
||||||
public void onError(@NonNull final Throwable e) {
|
public void onError(@NonNull final Throwable e) {
|
||||||
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
|
Log.e(getTag(), "Error fetching more playlist, marking playlist as complete.", e);
|
||||||
isComplete = true;
|
isComplete = true;
|
||||||
append(); // Notify change
|
notifyChange();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,13 +257,10 @@ public abstract class PlayQueue implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends the given {@link PlayQueueItem}s to the current play queue.
|
* Notifies that a change has occurred.
|
||||||
*
|
|
||||||
* @see #append(List items)
|
|
||||||
* @param items {@link PlayQueueItem}s to append
|
|
||||||
*/
|
*/
|
||||||
public synchronized void append(@NonNull final PlayQueueItem... items) {
|
public synchronized void notifyChange() {
|
||||||
append(List.of(items));
|
broadcast(new AppendEvent(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue