new release

This commit is contained in:
Page Asgardius 2024-08-20 10:05:53 -07:00
parent 2434b38117
commit 3dcc9912d3
6 changed files with 20 additions and 62 deletions

View file

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DesignSurface"> <component name="DesignSurface">
<option name="filePathToZoomLevelMap"> <option name="filePathToZoomLevelMap">

View file

@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3managermk2" applicationId "asgardius.page.s3managermk2"
minSdk 21 minSdk 21
targetSdk 34 targetSdk 34
versionCode 1 versionCode 2
versionName "0.11.0" versionName "0.11.1"
setProperty("archivesBaseName", "s3-manager-$versionName") setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -43,7 +43,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation"com.otaliastudios:zoomlayout:1.9.0" implementation"com.otaliastudios:zoomlayout:1.9.0"
// BEGIN AWS DEPENDENCIES // 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-s3:$aws_version"
implementation ("com.amazonaws:aws-android-sdk-mobile-client:$aws_version") { transitive = true } implementation ("com.amazonaws:aws-android-sdk-mobile-client:$aws_version") { transitive = true }
// END AWS DEPENDENCIES // END AWS DEPENDENCIES

View file

@ -9,7 +9,7 @@
<H3>Created by Page Asgardius</H3> <H3>Created by Page Asgardius</H3>
<H3>Libraries used in this app</H3> <H3>Libraries used in this app</H3>
<ul> <ul>
<li>Amazon Web Services SDK 2.73.0</li> <li>Amazon Web Services SDK 2.76.1</li>
<li>ExoPlayer 2.19.1</li> <li>ExoPlayer 2.19.1</li>
<li>ZoomLayout 1.9.0</li> <li>ZoomLayout 1.9.0</li>
<li>Adwaita Icon Theme for GNOME 43</li> <li>Adwaita Icon Theme for GNOME 43</li>

View file

@ -163,19 +163,8 @@ public class VideoPlayer extends AppCompatActivity {
playerNotificationManager.setPlayer(player); playerNotificationManager.setPlayer(player);
if (isplaylist) { if (isplaylist) {
for (int i = 0; i < queue.size(); i++) { for (int i = 0; i < queue.size(); i++) {
if (names.get(i).endsWith(".m3u8")) { MediaItem mediaItem = MediaItem.fromUri(Share.URLify(queue.get(i)));
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(queue.get(i))); player.addMediaItem(mediaItem);
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(Share.URLify(queue.get(i))));
player.addMediaSource(mediaSource);
}
} }
getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex())); getSupportActionBar().setTitle(names.get(player.getCurrentMediaItemIndex()));
player.prepare(); player.prepare();
@ -185,19 +174,8 @@ public class VideoPlayer extends AppCompatActivity {
System.out.println("Playing m3u file"); System.out.println("Playing m3u file");
} }
} else { } else {
if (title.endsWith(".m3u8")) { MediaItem mediaItem = MediaItem.fromUri(Share.URLify(videoURL));
MediaItem mediaItem = MediaItem.fromUri(Share.URLify(videoURL)); player.setMediaItem(mediaItem);
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(Share.URLify(videoURL)));
player.setMediaSource(mediaSource);
}
player.prepare(); player.prepare();
} }
// Start the playback. // Start the playback.
@ -389,36 +367,14 @@ public class VideoPlayer extends AppCompatActivity {
if (isplaylist) { if (isplaylist) {
player.clearMediaItems(); player.clearMediaItems();
for (int i = 0; i < queue.size(); i++) { for (int i = 0; i < queue.size(); i++) {
if (names.get(i).endsWith(".m3u8")) { MediaItem mediaItem = MediaItem.fromUri(queue.get(i));
MediaItem mediaItem = MediaItem.fromUri(queue.get(i)); player.addMediaItem(mediaItem);
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);
}
} }
player.prepare(); player.prepare();
player.seekTo(names.indexOf(title), 0); player.seekTo(names.indexOf(title), 0);
} else { } else {
if (title.endsWith(".m3u8")) { MediaItem mediaItem = MediaItem.fromUri(videoURL);
MediaItem mediaItem = MediaItem.fromUri(videoURL); player.setMediaItem(mediaItem);
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);
}
player.prepare(); player.prepare();
} }
// Start the playback. // Start the playback.

View file

@ -20,7 +20,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/videocache" android:text="@string/videocache"
android:textAlignment="center" android:textAlignment="center"
android:textSize="25sp"/> android:textSize="25sp"
android:visibility="gone" />
<EditText <EditText
android:id="@+id/videocache" android:id="@+id/videocache"
@ -29,13 +30,15 @@
android:focusable="true" android:focusable="true"
android:hint="@string/videocache" android:hint="@string/videocache"
android:inputType="number" android:inputType="number"
android:textColorHint="?attr/colorOnSecondary"/> android:textColorHint="?attr/colorOnSecondary"
android:visibility="gone" />
<Button <Button
android:id="@+id/clearcache" android:id="@+id/clearcache"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="70dp" android:layout_height="70dp"
android:text="@string/clearcache" /> android:text="@string/clearcache"
android:visibility="gone" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins { plugins {
id 'com.android.application' version '8.5.1' apply false id 'com.android.application' version '8.5.2' apply false
id 'com.android.library' version '8.5.1' apply false id 'com.android.library' version '8.5.2' apply false
} }
task clean(type: Delete) { task clean(type: Delete) {