2017-04-09 19:34:00 +02:00
|
|
|
package org.schabi.newpipe.fragments.detail;
|
|
|
|
|
2019-12-29 22:15:01 +01:00
|
|
|
import org.schabi.newpipe.player.playqueue.PlayQueue;
|
|
|
|
|
2017-04-09 19:34:00 +02:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
2017-09-03 08:04:18 +02:00
|
|
|
class StackItem implements Serializable {
|
2018-08-28 20:02:25 +02:00
|
|
|
private final int serviceId;
|
2017-12-08 15:05:08 +01:00
|
|
|
private String title;
|
2020-01-06 11:39:01 +01:00
|
|
|
private String url;
|
2019-12-29 22:15:01 +01:00
|
|
|
private final PlayQueue playQueue;
|
2017-04-09 19:34:00 +02:00
|
|
|
|
2019-12-29 22:15:01 +01:00
|
|
|
StackItem(int serviceId, String url, String title, PlayQueue playQueue) {
|
2017-09-03 08:04:18 +02:00
|
|
|
this.serviceId = serviceId;
|
2017-04-09 19:34:00 +02:00
|
|
|
this.url = url;
|
2017-09-03 08:04:18 +02:00
|
|
|
this.title = title;
|
2019-12-29 22:15:01 +01:00
|
|
|
this.playQueue = playQueue;
|
2017-04-09 19:34:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
this.title = title;
|
|
|
|
}
|
|
|
|
|
2020-01-06 11:39:01 +01:00
|
|
|
public void setUrl(String url) {
|
|
|
|
this.url = url;
|
|
|
|
}
|
|
|
|
|
2017-09-03 08:04:18 +02:00
|
|
|
public int getServiceId() {
|
|
|
|
return serviceId;
|
|
|
|
}
|
|
|
|
|
2017-04-09 19:34:00 +02:00
|
|
|
public String getTitle() {
|
|
|
|
return title;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
2019-12-29 22:15:01 +01:00
|
|
|
public PlayQueue getPlayQueue() { return playQueue; }
|
|
|
|
|
2017-04-09 19:34:00 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2017-09-03 08:04:18 +02:00
|
|
|
return getServiceId() + ":" + getUrl() + " > " + getTitle();
|
2017-04-09 19:34:00 +02:00
|
|
|
}
|
|
|
|
}
|