mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Generate podcast channel/episode models
This commit is contained in:
parent
93e08ef514
commit
3e58ec928e
2 changed files with 329 additions and 0 deletions
|
|
@ -0,0 +1,113 @@
|
||||||
|
package com.cappielloantonio.play.model;
|
||||||
|
|
||||||
|
import com.cappielloantonio.play.util.MappingUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class PodcastChannel {
|
||||||
|
protected String id;
|
||||||
|
protected String url;
|
||||||
|
protected String title;
|
||||||
|
protected String description;
|
||||||
|
protected String coverArtId;
|
||||||
|
protected String originalImageUrl;
|
||||||
|
protected String status;
|
||||||
|
protected String errorMessage;
|
||||||
|
protected List<PodcastEpisode> episodes;
|
||||||
|
|
||||||
|
public PodcastChannel(com.cappielloantonio.play.subsonic.models.PodcastChannel podcastChannel) {
|
||||||
|
this.id = podcastChannel.getId();
|
||||||
|
this.url = podcastChannel.getUrl();
|
||||||
|
this.title = podcastChannel.getTitle();
|
||||||
|
this.description = podcastChannel.getDescription();
|
||||||
|
this.coverArtId = podcastChannel.getCoverArtId();
|
||||||
|
this.originalImageUrl = podcastChannel.getOriginalImageUrl();
|
||||||
|
this.status = podcastChannel.getStatus();
|
||||||
|
this.errorMessage = podcastChannel.getErrorMessage();
|
||||||
|
this.episodes = MappingUtil.mapPodcastEpisode(podcastChannel.getEpisodes());
|
||||||
|
}
|
||||||
|
|
||||||
|
public PodcastChannel(String id, String url, String title, String description, String coverArtId, String originalImageUrl, String status, String errorMessage, List<PodcastEpisode> episodes) {
|
||||||
|
this.id = id;
|
||||||
|
this.url = url;
|
||||||
|
this.title = title;
|
||||||
|
this.description = description;
|
||||||
|
this.coverArtId = coverArtId;
|
||||||
|
this.originalImageUrl = originalImageUrl;
|
||||||
|
this.status = status;
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
this.episodes = episodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoverArtId() {
|
||||||
|
return coverArtId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCoverArtId(String coverArtId) {
|
||||||
|
this.coverArtId = coverArtId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOriginalImageUrl() {
|
||||||
|
return originalImageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalImageUrl(String originalImageUrl) {
|
||||||
|
this.originalImageUrl = originalImageUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PodcastEpisode> getEpisodes() {
|
||||||
|
return episodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEpisodes(List<PodcastEpisode> episodes) {
|
||||||
|
this.episodes = episodes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,216 @@
|
||||||
|
package com.cappielloantonio.play.model;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class PodcastEpisode {
|
||||||
|
protected String id;
|
||||||
|
protected String title;
|
||||||
|
protected String album;
|
||||||
|
protected String artist;
|
||||||
|
protected Integer track;
|
||||||
|
protected Integer year;
|
||||||
|
protected String genre;
|
||||||
|
protected String coverArtId;
|
||||||
|
protected Integer duration;
|
||||||
|
protected String path;
|
||||||
|
protected Date starred;
|
||||||
|
protected String albumId;
|
||||||
|
protected String artistId;
|
||||||
|
protected String type;
|
||||||
|
protected String streamId;
|
||||||
|
protected String channelId;
|
||||||
|
protected String description;
|
||||||
|
protected String status;
|
||||||
|
protected Date publishDate;
|
||||||
|
|
||||||
|
public PodcastEpisode(com.cappielloantonio.play.subsonic.models.PodcastEpisode podcastEpisode) {
|
||||||
|
this.id = podcastEpisode.getId();
|
||||||
|
this.title = podcastEpisode.getTitle();
|
||||||
|
this.album = podcastEpisode.getAlbum();
|
||||||
|
this.artist = podcastEpisode.getArtist();
|
||||||
|
this.track = podcastEpisode.getTrack();
|
||||||
|
this.year = podcastEpisode.getYear();
|
||||||
|
this.coverArtId = podcastEpisode.getCoverArtId();
|
||||||
|
this.duration = podcastEpisode.getDuration();
|
||||||
|
this.starred = podcastEpisode.getStarred();
|
||||||
|
this.streamId = podcastEpisode.getStreamId();
|
||||||
|
this.channelId = podcastEpisode.getChannelId();
|
||||||
|
this.description = podcastEpisode.getDescription();
|
||||||
|
this.status = podcastEpisode.getStatus();
|
||||||
|
this.publishDate = podcastEpisode.getPublishDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public PodcastEpisode(String id, String title, String album, String artist, Integer track, Integer year, String genre, String coverArtId, Integer duration, String path, Date starred, String albumId, String artistId, String type, String streamId, String channelId, String description, String status, Date publishDate) {
|
||||||
|
this.id = id;
|
||||||
|
this.title = title;
|
||||||
|
this.album = album;
|
||||||
|
this.artist = artist;
|
||||||
|
this.track = track;
|
||||||
|
this.year = year;
|
||||||
|
this.genre = genre;
|
||||||
|
this.coverArtId = coverArtId;
|
||||||
|
this.duration = duration;
|
||||||
|
this.path = path;
|
||||||
|
this.starred = starred;
|
||||||
|
this.albumId = albumId;
|
||||||
|
this.artistId = artistId;
|
||||||
|
this.type = type;
|
||||||
|
this.streamId = streamId;
|
||||||
|
this.channelId = channelId;
|
||||||
|
this.description = description;
|
||||||
|
this.status = status;
|
||||||
|
this.publishDate = publishDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlbum() {
|
||||||
|
return album;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlbum(String album) {
|
||||||
|
this.album = album;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArtist() {
|
||||||
|
return artist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArtist(String artist) {
|
||||||
|
this.artist = artist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTrack() {
|
||||||
|
return track;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrack(Integer track) {
|
||||||
|
this.track = track;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getYear() {
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYear(Integer year) {
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGenre() {
|
||||||
|
return genre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenre(String genre) {
|
||||||
|
this.genre = genre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoverArtId() {
|
||||||
|
return coverArtId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCoverArtId(String coverArtId) {
|
||||||
|
this.coverArtId = coverArtId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDuration(Integer duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPath() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPath(String path) {
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStarred() {
|
||||||
|
return starred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStarred(Date starred) {
|
||||||
|
this.starred = starred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlbumId() {
|
||||||
|
return albumId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlbumId(String albumId) {
|
||||||
|
this.albumId = albumId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getArtistId() {
|
||||||
|
return artistId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArtistId(String artistId) {
|
||||||
|
this.artistId = artistId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStreamId() {
|
||||||
|
return streamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStreamId(String streamId) {
|
||||||
|
this.streamId = streamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChannelId() {
|
||||||
|
return channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChannelId(String channelId) {
|
||||||
|
this.channelId = channelId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getPublishDate() {
|
||||||
|
return publishDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublishDate(Date publishDate) {
|
||||||
|
this.publishDate = publishDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue