diff --git a/app/build.gradle b/app/build.gradle
index 30ff9bf..89a35f0 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3musicmk2"
minSdk 21
targetSdk 34
- versionCode 1
- versionName "0.3.0"
+ versionCode 2
+ versionName "0.3.1"
setProperty("archivesBaseName", "s3-music-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -43,7 +43,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation"com.otaliastudios:zoomlayout:1.9.0"
// BEGIN AWS DEPENDENCIES
- def aws_version = "2.76.0"
+ def aws_version = "2.76.1"
implementation "com.amazonaws:aws-android-sdk-s3:$aws_version"
implementation ("com.amazonaws:aws-android-sdk-mobile-client:$aws_version") { transitive = true }
// END AWS DEPENDENCIES
diff --git a/app/src/main/assets/about.htm b/app/src/main/assets/about.htm
index f27a6b2..b3c8d46 100644
--- a/app/src/main/assets/about.htm
+++ b/app/src/main/assets/about.htm
@@ -9,7 +9,7 @@
Created by Page Asgardius
Libraries used in this app
- - Amazon Web Services SDK 2.73.0
+ - Amazon Web Services SDK 2.76.1
- ExoPlayer 2.19.1
- Adwaita Icon Theme for GNOME 43
- Font Awesome icons
diff --git a/app/src/main/java/asgardius/page/s3musicmk2/VideoPlayer.java b/app/src/main/java/asgardius/page/s3musicmk2/VideoPlayer.java
index c8fbf2a..96371ed 100644
--- a/app/src/main/java/asgardius/page/s3musicmk2/VideoPlayer.java
+++ b/app/src/main/java/asgardius/page/s3musicmk2/VideoPlayer.java
@@ -212,19 +212,8 @@ public class VideoPlayer extends AppCompatActivity {
playerNotificationManager.setPlayer(player);
if (isplaylist) {
for (int i = 0; i < queue.size(); i++) {
- if (names.get(i).endsWith(".m3u8")) {
- MediaItem mediaItem = MediaItem.fromUri(URLify(queue.get(i)));
- player.addMediaItem(mediaItem);
- } else {
- mediaSource = new ProgressiveMediaSource.Factory(
- new CacheDataSource.Factory()
- .setCache(simpleCache)
- .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
- .setUserAgent("S3 Manager"))
- .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
- ).createMediaSource(MediaItem.fromUri(URLify(queue.get(i))));
- player.addMediaSource(mediaSource);
- }
+ MediaItem mediaItem = MediaItem.fromUri(URLify(queue.get(i)));
+ player.addMediaItem(mediaItem);
}
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
player.prepare();
@@ -234,19 +223,8 @@ public class VideoPlayer extends AppCompatActivity {
System.out.println("Playing m3u file");
}
} else {
- if (title.endsWith(".m3u8")) {
- MediaItem mediaItem = MediaItem.fromUri(URLify(videoURL));
- player.setMediaItem(mediaItem);
- } else {
- mediaSource = new ProgressiveMediaSource.Factory(
- new CacheDataSource.Factory()
- .setCache(simpleCache)
- .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
- .setUserAgent("S3 Manager"))
- .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
- ).createMediaSource(MediaItem.fromUri(URLify(videoURL)));
- player.setMediaSource(mediaSource);
- }
+ MediaItem mediaItem = MediaItem.fromUri(URLify(videoURL));
+ player.setMediaItem(mediaItem);
player.prepare();
}
// Start the playback.
@@ -380,36 +358,14 @@ public class VideoPlayer extends AppCompatActivity {
if (isplaylist) {
player.clearMediaItems();
for (int i = 0; i < queue.size(); i++) {
- if (names.get(i).endsWith(".m3u8")) {
- MediaItem mediaItem = MediaItem.fromUri(queue.get(i));
- player.addMediaItem(mediaItem);
- } else {
- mediaSource = new ProgressiveMediaSource.Factory(
- new CacheDataSource.Factory()
- .setCache(simpleCache)
- .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
- .setUserAgent("S3 Manager"))
- .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
- ).createMediaSource(MediaItem.fromUri(Uri.parse(queue.get(i))));
- player.addMediaSource(mediaSource);
- }
+ MediaItem mediaItem = MediaItem.fromUri(queue.get(i));
+ player.addMediaItem(mediaItem);
}
player.prepare();
player.seekTo(names.indexOf(title), 0);
} else {
- if (title.endsWith(".m3u8")) {
- MediaItem mediaItem = MediaItem.fromUri(videoURL);
- player.setMediaItem(mediaItem);
- } else {
- mediaSource = new ProgressiveMediaSource.Factory(
- new CacheDataSource.Factory()
- .setCache(simpleCache)
- .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory()
- .setUserAgent("S3 Manager"))
- .setFlags(CacheDataSource.FLAG_IGNORE_CACHE_ON_ERROR)
- ).createMediaSource(MediaItem.fromUri(Uri.parse(videoURL)));
- player.setMediaSource(mediaSource);
- }
+ MediaItem mediaItem = MediaItem.fromUri(videoURL);
+ player.setMediaItem(mediaItem);
player.prepare();
}
// Start the playback.
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 4413e37..7077589 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -20,7 +20,8 @@
android:layout_height="wrap_content"
android:text="@string/videocache"
android:textAlignment="center"
- android:textSize="25sp"/>
+ android:textSize="25sp"
+ android:visibility="gone" />
+ android:textColorHint="?attr/colorOnSecondary"
+ android:visibility="gone" />
+ android:text="@string/clearcache"
+ android:visibility="gone" />