Skip to content

Commit

Permalink
support more mime types in internal player
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed Jun 2, 2021
1 parent f631428 commit 46efb34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ android {
targetSdkVersion(AndroidConfig.targetSdk)
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
versionCode = 63
versionName = "0.11.1.1-mi"
versionName = "0.11.1.2-mi"

buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
buildConfigField("String", "COMMIT_SHA", "\"${getGitSha()}\"")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,15 @@ class WatcherActivity : AppCompatActivity() {
source = Injekt.get<AnimeSourceManager>().getOrStub(anime.source)
episodeList = intent.getSerializableExtra("episodeList") as ArrayList<Episode>
uri = EpisodeLoader.getUri(episode, anime, source)
val mime = when (uri.substringAfterLast(".")) {
"mp4" -> MimeTypes.VIDEO_MP4
"mkv" -> MimeTypes.APPLICATION_MATROSKA
"m3u8" -> MimeTypes.APPLICATION_M3U8
else -> MimeTypes.VIDEO_MP4
}
mediaItem = MediaItem.Builder()
.setUri(uri)
.setMimeType(MimeTypes.VIDEO_MP4)
.setMimeType(mime)
.build()
playbackPosition = episode.last_second_seen

Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
android:fillColor="#000"
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z" />
<path
android:fillColor="#3A84C2"
android:fillColor="#2E84BF"
android:pathData="M14.5,7L86.5,7A7,7 0,0 1,93.5 14L93.5,95A7,7 0,0 1,86.5 102L14.5,102A7,7 0,0 1,7.5 95L7.5,14A7,7 0,0 1,14.5 7z" />
<path
android:fillColor="#5AA4E2"
android:fillType="evenOdd"
android:fillColor="#69A3CB"
android:pathData="M7.5,12.01C7.5,9.24 9.74,7 12.5,7L17.5,7L17.5,102L12.5,102C9.74,102 7.5,99.77 7.5,96.99L7.5,12.01Z" />
<path
android:pathData="M54,54m-25,0a25,25 0,1 1,50 0a25,25 0,1 1,-50 0"
Expand Down

0 comments on commit 46efb34

Please sign in to comment.