-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update implementation and refactor Crunchyroll logic
- Loading branch information
Showing
61 changed files
with
4,299 additions
and
592 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -37,3 +37,4 @@ out/ | |
/metrics.json | ||
/.jpb/ | ||
/config/ | ||
/images-cache.shikk |
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
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
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
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/fr/shikkanime/caches/CountryCodeAnimeIdKeyCache.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,26 @@ | ||
package fr.shikkanime.caches | ||
|
||
import fr.shikkanime.entities.enums.CountryCode | ||
|
||
data class CountryCodeAnimeIdKeyCache( | ||
val countryCode: CountryCode, | ||
val animeId: String, | ||
) { | ||
override fun equals(other: Any?): Boolean { | ||
if (this === other) return true | ||
if (javaClass != other?.javaClass) return false | ||
|
||
other as CountryCodeAnimeIdKeyCache | ||
|
||
if (countryCode != other.countryCode) return false | ||
if (animeId != other.animeId) return false | ||
|
||
return true | ||
} | ||
|
||
override fun hashCode(): Int { | ||
var result = countryCode.hashCode() | ||
result = 31 * result + animeId.hashCode() | ||
return result | ||
} | ||
} |
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
43 changes: 0 additions & 43 deletions
43
src/main/kotlin/fr/shikkanime/controllers/api/PlatformController.kt
This file was deleted.
Oops, something went wrong.
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
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
28 changes: 0 additions & 28 deletions
28
src/main/kotlin/fr/shikkanime/converters/platform/PlatformDtoToPlatformConverter.kt
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/main/kotlin/fr/shikkanime/converters/platform/PlatformToPlatformDtoConverter.kt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
src/main/kotlin/fr/shikkanime/entities/enums/CountryCode.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,13 @@ | ||
package fr.shikkanime.entities.enums | ||
|
||
|
||
enum class CountryCode(val locale: String? = null, val voice: String? = null) { | ||
FR("fr-FR", "VF"), | ||
; | ||
|
||
companion object { | ||
fun from(collection: Collection<String>): Set<CountryCode> { | ||
return collection.map { valueOf(it.uppercase()) }.toSet() | ||
} | ||
} | ||
} |
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 fr.shikkanime.entities.enums | ||
|
||
enum class Platform( | ||
val platformName: String, | ||
var url: String, | ||
var image: String | ||
) { | ||
ANIM("Animation Digital Network", "https://animationdigitalnetwork.fr/", "animation_digital_network.png"), | ||
CRUN("Crunchyroll", "https://www.crunchyroll.com/", "crunchyroll.png"), | ||
DISN("Disney+", "https://www.disneyplus.com/", "disneyplus.png"), | ||
; | ||
} |
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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
open class AnimeException(override val message: String? = null) : Exception(message) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/fr/shikkanime/exceptions/AnimeNotSimulcastedException.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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
data class AnimeNotSimulcastedException(override val message: String? = null) : AnimeException(message) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/fr/shikkanime/exceptions/EpisodeAlreadyReleasedException.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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
data class EpisodeAlreadyReleasedException(override val message: String? = null) : EpisodeException(message) |
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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
open class EpisodeException(override val message: String? = null) : Exception(message) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/fr/shikkanime/exceptions/EpisodeNoSubtitlesOrVoiceException.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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
data class EpisodeNoSubtitlesOrVoiceException(override val message: String? = null) : EpisodeException(message) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/fr/shikkanime/exceptions/EpisodeNotAvailableInCountryException.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,3 @@ | ||
package fr.shikkanime.exceptions | ||
|
||
data class EpisodeNotAvailableInCountryException(override val message: String? = null) : EpisodeException(message) |
Oops, something went wrong.