mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
add dummy objects for stream entities
This commit is contained in:
parent
de1b7111cf
commit
78a75c7a1d
5 changed files with 67 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
package de.nicidienase.chaosflix.entities.streaming;
|
package de.nicidienase.chaosflix.entities.streaming;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,6 +11,12 @@ public class Group {
|
||||||
String group;
|
String group;
|
||||||
List<Room> rooms;
|
List<Room> rooms;
|
||||||
|
|
||||||
|
public Group() {}
|
||||||
|
|
||||||
|
public Group(String group) {
|
||||||
|
this.group = group;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGroup() {
|
public String getGroup() {
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
@ -25,4 +32,12 @@ public class Group {
|
||||||
public void setRooms(List<Room> rooms) {
|
public void setRooms(List<Room> rooms) {
|
||||||
this.rooms = rooms;
|
this.rooms = rooms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Group getDummyObject(){
|
||||||
|
Group dummy = new Group();
|
||||||
|
dummy.setGroup("Dummy Group");
|
||||||
|
dummy.setRooms(new ArrayList<>());
|
||||||
|
dummy.getRooms().add(Room.getDummyObject());
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package de.nicidienase.chaosflix.entities.streaming;
|
package de.nicidienase.chaosflix.entities.streaming;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,6 +17,13 @@ public class LiveConference {
|
||||||
String endsAt;
|
String endsAt;
|
||||||
List<Group> groups;
|
List<Group> groups;
|
||||||
|
|
||||||
|
public LiveConference() {}
|
||||||
|
|
||||||
|
public LiveConference(String conference, String description) {
|
||||||
|
this.conference = conference;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
public String getConference() {
|
public String getConference() {
|
||||||
return conference;
|
return conference;
|
||||||
}
|
}
|
||||||
|
@ -79,4 +87,11 @@ public class LiveConference {
|
||||||
public void setGroups(List<Group> groups) {
|
public void setGroups(List<Group> groups) {
|
||||||
this.groups = groups;
|
this.groups = groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static LiveConference getDummyObject(){
|
||||||
|
LiveConference dummyCon = new LiveConference("DummyCon", "Conference McConferenceface");
|
||||||
|
dummyCon.setGroups(new ArrayList<>());
|
||||||
|
dummyCon.getGroups().add(Group.getDummyObject());
|
||||||
|
return dummyCon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package de.nicidienase.chaosflix.entities.streaming;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +18,8 @@ public class Room implements Parcelable {
|
||||||
String display;
|
String display;
|
||||||
List<Stream> streams;
|
List<Stream> streams;
|
||||||
|
|
||||||
|
public Room() {}
|
||||||
|
|
||||||
protected Room(Parcel in) {
|
protected Room(Parcel in) {
|
||||||
slug = in.readString();
|
slug = in.readString();
|
||||||
shedulename = in.readString();
|
shedulename = in.readString();
|
||||||
|
@ -98,4 +101,14 @@ public class Room implements Parcelable {
|
||||||
public void setStreams(List<Stream> streams) {
|
public void setStreams(List<Stream> streams) {
|
||||||
this.streams = streams;
|
this.streams = streams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Room getDummyObject(){
|
||||||
|
Room dummy = new Room();
|
||||||
|
dummy.setStreams(new ArrayList<>());
|
||||||
|
dummy.getStreams().add(Stream.getDummyObject());
|
||||||
|
dummy.setDisplay("Dummy Room");
|
||||||
|
dummy.setSlug("dummy_room");
|
||||||
|
dummy.setShedulename("Dummy Room");
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package de.nicidienase.chaosflix.entities.streaming;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +18,8 @@ public class Stream implements Parcelable {
|
||||||
int[] videoSize;
|
int[] videoSize;
|
||||||
Map<String, StreamUrl> urls;
|
Map<String, StreamUrl> urls;
|
||||||
|
|
||||||
|
public Stream() {}
|
||||||
|
|
||||||
protected Stream(Parcel in) {
|
protected Stream(Parcel in) {
|
||||||
slug = in.readString();
|
slug = in.readString();
|
||||||
display = in.readString();
|
display = in.readString();
|
||||||
|
@ -98,4 +101,17 @@ public class Stream implements Parcelable {
|
||||||
public void setUrls(Map<String, StreamUrl> urls) {
|
public void setUrls(Map<String, StreamUrl> urls) {
|
||||||
this.urls = urls;
|
this.urls = urls;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Stream getDummyObject(){
|
||||||
|
Stream dummy = new Stream();
|
||||||
|
dummy.setDisplay("Dummy");
|
||||||
|
dummy.setSlug("dummy");
|
||||||
|
dummy.setTranslated(false);
|
||||||
|
HashMap<String, StreamUrl> streamMap = new HashMap<>();
|
||||||
|
streamMap.put("dummy",StreamUrl.getDummyObject());
|
||||||
|
dummy.setUrls(streamMap);
|
||||||
|
dummy.setVideoSize(new int[]{1, 1});
|
||||||
|
dummy.setType("dummy");
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,4 +76,12 @@ public class StreamUrl implements Parcelable {
|
||||||
dest.writeString(tech);
|
dest.writeString(tech);
|
||||||
dest.writeString(url);
|
dest.writeString(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static StreamUrl getDummyObject(){
|
||||||
|
StreamUrl dummy = new StreamUrl();
|
||||||
|
dummy.setUrl("https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8");
|
||||||
|
dummy.setTech("dummy");
|
||||||
|
dummy.setDisplay("DummyStream");
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue