Fail-fast for service id == -1
This commit is contained in:
parent
69302fcbd0
commit
89b11ff71c
6 changed files with 26 additions and 4 deletions
|
|
@ -65,6 +65,7 @@ import org.schabi.newpipe.player.PopupVideoPlayer;
|
|||
import org.schabi.newpipe.player.old.PlayVideoActivity;
|
||||
import org.schabi.newpipe.report.ErrorActivity;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
import org.schabi.newpipe.util.InfoCache;
|
||||
import org.schabi.newpipe.util.ListHelper;
|
||||
|
|
@ -110,7 +111,7 @@ public class VideoDetailFragment extends BaseStateFragment<StreamInfo> implement
|
|||
private boolean wasRelatedStreamsExpanded = false;
|
||||
|
||||
@State
|
||||
protected int serviceId = -1;
|
||||
protected int serviceId = Constants.NO_SERVICE_ID;
|
||||
@State
|
||||
protected String name;
|
||||
@State
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import android.view.View;
|
|||
|
||||
import org.schabi.newpipe.extractor.ListExtractor;
|
||||
import org.schabi.newpipe.extractor.ListInfo;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
|
||||
import java.util.Queue;
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ import io.reactivex.schedulers.Schedulers;
|
|||
public abstract class BaseListInfoFragment<I extends ListInfo> extends BaseListFragment<I, ListExtractor.NextItemsResult> {
|
||||
|
||||
@State
|
||||
protected int serviceId = -1;
|
||||
protected int serviceId = Constants.NO_SERVICE_ID;
|
||||
@State
|
||||
protected String name;
|
||||
@State
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import org.schabi.newpipe.extractor.search.SearchResult;
|
|||
import org.schabi.newpipe.fragments.list.BaseListFragment;
|
||||
import org.schabi.newpipe.history.HistoryListener;
|
||||
import org.schabi.newpipe.report.UserAction;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.StateSaver;
|
||||
|
|
@ -86,7 +87,7 @@ public class SearchFragment extends BaseListFragment<SearchResult, ListExtractor
|
|||
private SearchEngine.Filter filter = SearchEngine.Filter.ANY;
|
||||
|
||||
@State
|
||||
protected int serviceId = -1;
|
||||
protected int serviceId = Constants.NO_SERVICE_ID;
|
||||
@State
|
||||
protected String searchQuery = "";
|
||||
@State
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue