diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index c570d92..bdc6283 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -38,7 +38,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.PixelPlayer" - android:usesCleartextTraffic="false" + android:usesCleartextTraffic="true" android:networkSecurityConfig="@xml/network_security_config" tools:targetApi="31"> Subsonic / Navidrome Connect to your self-hosted music server Supports Navidrome, Airsonic, Gonic, Ampache and other servers compatible with the Subsonic API. - https://music.example.com - Use the full https:// base address of your server. + http://192.168.1.100:4533 + Use the full server URL, including http:// for local servers or https:// for remote servers. This is your Subsonic or Navidrome account name. App password also works if your server supports it. App password also works if your server supports it. - Prefill https:// + Prefill http:// Compatible with Navidrome, Gonic, Airsonic, and other Subsonic-compatible servers Navidrome Subsonic @@ -38,7 +38,6 @@ Full URL of your Jellyfin server, including port. Your Jellyfin account username. Your Jellyfin account password. - Prefill http:// Connects to Jellyfin servers for streaming your music library Jellyfin diff --git a/app/src/test/java/com/lostf1sh/pixelplayeross/data/navidrome/model/NavidromeCredentialsTest.kt b/app/src/test/java/com/lostf1sh/pixelplayeross/data/navidrome/model/NavidromeCredentialsTest.kt index 9bbd19c..601f01b 100644 --- a/app/src/test/java/com/lostf1sh/pixelplayeross/data/navidrome/model/NavidromeCredentialsTest.kt +++ b/app/src/test/java/com/lostf1sh/pixelplayeross/data/navidrome/model/NavidromeCredentialsTest.kt @@ -19,15 +19,30 @@ class NavidromeCredentialsTest { } @Test - fun `connectionValidationError rejects insecure http urls`() { + fun `connectionValidationError accepts http urls for local network addresses`() { val credentials = NavidromeCredentials( serverUrl = "http://192.168.1.20:4533", username = "user", password = "pass" ) + assertNull(credentials.connectionValidationError()) + assertEquals( + "http://192.168.1.20:4533", + credentials.normalizedServerUrl + ) + } + + @Test + fun `connectionValidationError rejects http urls for public hosts`() { + val credentials = NavidromeCredentials( + serverUrl = "http://music.example.com", + username = "user", + password = "pass" + ) + assertEquals( - "Use an https:// server URL for Navidrome/Subsonic.", + "Use https:// for remote Navidrome/Subsonic servers. HTTP is only allowed for local network addresses.", credentials.connectionValidationError() ) }