Skip to content

Commit

Permalink
Merge pull request #84 from tobexyz/feat/issue82
Browse files Browse the repository at this point in the history
Feat/issue82
  • Loading branch information
tobexyz authored Oct 8, 2023
2 parents a6b0fb2 + 8d3924f commit c9b1716
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 23 deletions.
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
org.gradle.jvmargs=-Xmx2048M
android.enableJetifier=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
3 changes: 2 additions & 1 deletion yaacc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.1.2'

}
}
Expand Down Expand Up @@ -72,5 +72,6 @@ android {
testOptions {
unitTests.returnDefaultValues = true
}
namespace 'de.yaacc'

}
1 change: 0 additions & 1 deletion yaacc/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.yaacc"
android:versionCode="40100"
android:versionName="4.1.0-SNAPSHOT">

Expand Down
41 changes: 21 additions & 20 deletions yaacc/src/main/java/de/yaacc/browser/ContentListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,29 +98,30 @@ private void init(Bundle savedInstanceState, View contentlistView) {
contentList = contentlistView.findViewById(R.id.contentList);
contentList.setLayoutManager(new LinearLayoutManager(getActivity()));
upnpClient.addUpnpClientListener(this);
Thread thread = new Thread(() -> {
if (upnpClient.getReceiverDevices() != null) {
currentReceivers.setText(upnpClient.getReceiverDevices().stream().map(it -> it.getDetails().getFriendlyName()).collect(Collectors.joining("; ")));
}
if (upnpClient.getProviderDevice() != null) {
currentProvider.setText(upnpClient.getProviderDevice().getDetails().getFriendlyName());
if (savedInstanceState == null || savedInstanceState.getSerializable(CONTENT_LIST_NAVIGATOR) == null) {
showMainFolder();
} else {
navigator = (Navigator) savedInstanceState.getSerializable(CONTENT_LIST_NAVIGATOR);
if (navigator.getCurrentPosition() != null && upnpClient.getProviderDevice() != null && upnpClient.getProviderDevice().getIdentity().getUdn().getIdentifierString().equals(navigator.getCurrentPosition().getDeviceId())) {
populateItemList(true);
} else {
if (getActivity() != null) {
getActivity().runOnUiThread(() -> {

if (upnpClient.getReceiverDevices() != null) {
currentReceivers.setText(upnpClient.getReceiverDevices().stream().map(it -> it.getDetails().getFriendlyName()).collect(Collectors.joining("; ")));
}
if (upnpClient.getProviderDevice() != null) {
currentProvider.setText(upnpClient.getProviderDevice().getDetails().getFriendlyName());
if (savedInstanceState == null || savedInstanceState.getSerializable(CONTENT_LIST_NAVIGATOR) == null) {
showMainFolder();
} else {
navigator = (Navigator) savedInstanceState.getSerializable(CONTENT_LIST_NAVIGATOR);
if (navigator.getCurrentPosition() != null && upnpClient.getProviderDevice() != null && upnpClient.getProviderDevice().getIdentity().getUdn().getIdentifierString().equals(navigator.getCurrentPosition().getDeviceId())) {
populateItemList(true);
} else {
showMainFolder();
}
}

} else {
clearItemList();
}
} else {

clearItemList();
}
});
thread.start();
});
}
;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ private void checkIfReceivedShareIntent(Intent receivedIntent) {
player.play();
}
}
setCurrentTab(BrowserTabs.PLAYER);
}
}

Expand Down

0 comments on commit c9b1716

Please sign in to comment.