-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: copy dummy items to core module
- Loading branch information
1 parent
6ed7b5e
commit df206ce
Showing
7 changed files
with
248 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Collections.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.CollectionType | ||
import dev.jdtech.jellyfin.models.FindroidCollection | ||
import dev.jdtech.jellyfin.models.FindroidImages | ||
import java.util.UUID | ||
|
||
private val dummyMoviesCollection = FindroidCollection( | ||
id = UUID.randomUUID(), | ||
name = "Movies", | ||
type = CollectionType.Movies, | ||
images = FindroidImages(), | ||
) | ||
|
||
private val dummyShowsCollection = FindroidCollection( | ||
id = UUID.randomUUID(), | ||
name = "Shows", | ||
type = CollectionType.TvShows, | ||
images = FindroidImages(), | ||
) | ||
|
||
val dummyCollections = listOf( | ||
dummyMoviesCollection, | ||
dummyShowsCollection, | ||
) |
68 changes: 68 additions & 0 deletions
68
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Episodes.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.EpisodeItem | ||
import dev.jdtech.jellyfin.models.FindroidEpisode | ||
import dev.jdtech.jellyfin.models.FindroidImages | ||
import dev.jdtech.jellyfin.models.FindroidMediaStream | ||
import dev.jdtech.jellyfin.models.FindroidSource | ||
import dev.jdtech.jellyfin.models.FindroidSourceType | ||
import org.jellyfin.sdk.model.api.MediaStreamType | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
val dummyEpisode = FindroidEpisode( | ||
id = UUID.randomUUID(), | ||
name = "Mother and Children", | ||
originalTitle = null, | ||
overview = "Stories are lies meant to entertain, and idols lie to fans eager to believe. This is Ai’s story. It is a lie, but it is also true.", | ||
indexNumber = 1, | ||
indexNumberEnd = null, | ||
parentIndexNumber = 1, | ||
sources = listOf( | ||
FindroidSource( | ||
id = "", | ||
name = "", | ||
type = FindroidSourceType.REMOTE, | ||
path = "", | ||
size = 0L, | ||
mediaStreams = listOf( | ||
FindroidMediaStream( | ||
title = "", | ||
displayTitle = "", | ||
language = "en", | ||
type = MediaStreamType.VIDEO, | ||
codec = "hevc", | ||
isExternal = false, | ||
path = "", | ||
channelLayout = null, | ||
videoRangeType = null, | ||
height = 1080, | ||
width = 1920, | ||
videoDoViTitle = null, | ||
), | ||
), | ||
), | ||
), | ||
played = true, | ||
favorite = true, | ||
canPlay = true, | ||
canDownload = true, | ||
runtimeTicks = 20L, | ||
playbackPositionTicks = 0L, | ||
premiereDate = LocalDateTime.parse("2019-02-14T00:00:00"), | ||
seriesName = "Oshi no Ko", | ||
seriesId = UUID.randomUUID(), | ||
seasonId = UUID.randomUUID(), | ||
communityRating = 9.2f, | ||
images = FindroidImages(), | ||
chapters = null, | ||
trickplayInfo = null, | ||
) | ||
|
||
val dummyEpisodes = listOf( | ||
dummyEpisode, | ||
) | ||
|
||
val dummyEpisodeItems = listOf( | ||
EpisodeItem.Episode(dummyEpisode), | ||
) |
27 changes: 27 additions & 0 deletions
27
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/HomeItems.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.CollectionType | ||
import dev.jdtech.jellyfin.models.HomeItem | ||
import dev.jdtech.jellyfin.models.HomeSection | ||
import dev.jdtech.jellyfin.models.UiText | ||
import dev.jdtech.jellyfin.models.View | ||
import java.util.UUID | ||
|
||
val dummyHomeSection = HomeItem.Section( | ||
HomeSection( | ||
id = UUID.randomUUID(), | ||
name = UiText.DynamicString("Continue watching"), | ||
items = dummyMovies + dummyEpisodes, | ||
), | ||
) | ||
|
||
val dummyHomeView = HomeItem.ViewItem( | ||
View( | ||
id = UUID.randomUUID(), | ||
name = "Movies", | ||
items = dummyMovies, | ||
type = CollectionType.Movies, | ||
), | ||
) | ||
|
||
val dummyHomeItems = listOf(dummyHomeSection, dummyHomeView) |
64 changes: 64 additions & 0 deletions
64
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Movies.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.FindroidImages | ||
import dev.jdtech.jellyfin.models.FindroidMediaStream | ||
import dev.jdtech.jellyfin.models.FindroidMovie | ||
import dev.jdtech.jellyfin.models.FindroidSource | ||
import dev.jdtech.jellyfin.models.FindroidSourceType | ||
import org.jellyfin.sdk.model.api.MediaStreamType | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
val dummyMovie = FindroidMovie( | ||
id = UUID.randomUUID(), | ||
name = "Alita: Battle Angel", | ||
originalTitle = null, | ||
overview = "When Alita awakens with no memory of who she is in a future world she does not recognize, she is taken in by Ido, a compassionate doctor who realizes that somewhere in this abandoned cyborg shell is the heart and soul of a young woman with an extraordinary past.", | ||
sources = listOf( | ||
FindroidSource( | ||
id = "", | ||
name = "", | ||
type = FindroidSourceType.REMOTE, | ||
path = "", | ||
size = 0L, | ||
mediaStreams = listOf( | ||
FindroidMediaStream( | ||
title = "", | ||
displayTitle = "", | ||
language = "en", | ||
type = MediaStreamType.VIDEO, | ||
codec = "hevc", | ||
isExternal = false, | ||
path = "", | ||
channelLayout = null, | ||
videoRangeType = null, | ||
height = 1080, | ||
width = 1920, | ||
videoDoViTitle = null, | ||
), | ||
), | ||
), | ||
), | ||
played = false, | ||
favorite = true, | ||
canPlay = true, | ||
canDownload = true, | ||
runtimeTicks = 20L, | ||
playbackPositionTicks = 15L, | ||
premiereDate = LocalDateTime.parse("2019-02-14T00:00:00"), | ||
people = emptyList(), | ||
genres = listOf("Action", "Sience Fiction", "Adventure"), | ||
communityRating = 7.2f, | ||
officialRating = "PG-13", | ||
status = "Ended", | ||
productionYear = 2019, | ||
endDate = null, | ||
trailer = "https://www.youtube.com/watch?v=puKWa8hrvA8", | ||
images = FindroidImages(), | ||
chapters = null, | ||
trickplayInfo = null, | ||
) | ||
|
||
val dummyMovies = listOf( | ||
dummyMovie, | ||
) |
22 changes: 22 additions & 0 deletions
22
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Servers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.DiscoveredServer | ||
import dev.jdtech.jellyfin.models.Server | ||
import java.util.UUID | ||
|
||
val dummyDiscoveredServer = DiscoveredServer( | ||
id = "", | ||
name = "Demo server", | ||
address = "https://demo.jellyfin.org/stable", | ||
) | ||
|
||
val dummyDiscoveredServers = listOf(dummyDiscoveredServer) | ||
|
||
val dummyServer = Server( | ||
id = "", | ||
name = "Demo server", | ||
currentServerAddressId = UUID.randomUUID(), | ||
currentUserId = UUID.randomUUID(), | ||
) | ||
|
||
val dummyServers = listOf(dummyServer) |
30 changes: 30 additions & 0 deletions
30
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Show.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.FindroidImages | ||
import dev.jdtech.jellyfin.models.FindroidShow | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
val dummyShow = FindroidShow( | ||
id = UUID.randomUUID(), | ||
name = "Attack on Titan", | ||
originalTitle = null, | ||
overview = "After his hometown is destroyed and his mother is killed, young Eren Yeager vows to cleanse the earth of the giant humanoid Titans that have brought humanity to the brink of extinction.", | ||
sources = emptyList(), | ||
played = false, | ||
favorite = false, | ||
canPlay = true, | ||
canDownload = false, | ||
runtimeTicks = 0L, | ||
communityRating = 8.8f, | ||
endDate = LocalDateTime.parse("2023-11-04T00:00:00"), | ||
genres = listOf("Action", "Sience Fiction", "Adventure"), | ||
images = FindroidImages(), | ||
officialRating = "TV-MA", | ||
people = emptyList(), | ||
productionYear = 2013, | ||
seasons = emptyList(), | ||
status = "Ended", | ||
trailer = null, | ||
unplayedItemCount = 20, | ||
) |
12 changes: 12 additions & 0 deletions
12
core/src/main/java/dev/jdtech/jellyfin/core/presentation/dummy/Users.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package dev.jdtech.jellyfin.core.presentation.dummy | ||
|
||
import dev.jdtech.jellyfin.models.User | ||
import java.util.UUID | ||
|
||
val dummyUser = User( | ||
id = UUID.randomUUID(), | ||
name = "Username", | ||
serverId = "", | ||
) | ||
|
||
val dummyUsers = listOf(dummyUser) |