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;
|
2020-01-06 11:39:01 +01:00
|
|
|
private String url;
|
2020-03-31 19:20:15 +02:00
|
|
|
private String title;
|
2020-02-29 00:57:54 +01:00
|
|
|
private PlayQueue playQueue;
|
2017-04-09 19:34:00 +02:00
|
|
|
|
2020-07-14 19:21:32 +02:00
|
|
|
StackItem(final int serviceId, final String url,
|
|
|
|
final String title, final 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
|
|
|
}
|
|
|
|
|
2020-07-14 19:21:32 +02:00
|
|
|
public void setUrl(final String url) {
|
2020-01-06 11:39:01 +01:00
|
|
|
this.url = url;
|
|
|
|
}
|
|
|
|
|
2020-07-14 19:21:32 +02:00
|
|
|
public void setPlayQueue(final PlayQueue queue) {
|
2020-02-29 00:57:54 +01:00
|
|
|
this.playQueue = queue;
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2020-03-31 19:20:15 +02:00
|
|
|
public void setTitle(final String title) {
|
|
|
|
this.title = title;
|
|
|
|
}
|
|
|
|
|
2017-04-09 19:34:00 +02:00
|
|
|
public String getUrl() {
|
|
|
|
return url;
|
|
|
|
}
|
|
|
|
|
2020-07-14 19:21:32 +02:00
|
|
|
public PlayQueue getPlayQueue() {
|
|
|
|
return playQueue;
|
|
|
|
}
|
2019-12-29 22:15:01 +01:00
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|