mirror of
https://github.com/playmusicexporter/playmusicexporter
synced 2024-04-29 09:16:42 +00:00
Rewrote Settings, added automated export, changed package.
This commit is contained in:
parent
7c9086a912
commit
4b9b04290e
|
@ -1,6 +0,0 @@
|
|||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="myName" value="MIT" />
|
||||
<option name="notice" value="Copyright (c) &#36;today.year David Schulte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." />
|
||||
</copyright>
|
||||
</component>
|
|
@ -1,7 +1,3 @@
|
|||
<component name="CopyrightManager">
|
||||
<settings default="MIT">
|
||||
<module2copyright>
|
||||
<element module="All" copyright="MIT" />
|
||||
</module2copyright>
|
||||
</settings>
|
||||
<settings default="" />
|
||||
</component>
|
|
@ -1,7 +0,0 @@
|
|||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="david">
|
||||
<words>
|
||||
<w>simpel</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
|
@ -3,9 +3,9 @@
|
|||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="distributionType" value="LOCAL" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.14.1" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
@ -14,6 +14,7 @@
|
|||
<option value="$PROJECT_DIR$/playmusiclib" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="appcompat-v7-23.1.0">
|
||||
<ANNOTATIONS>
|
||||
<root url="jar://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/annotations.zip!/" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/res" />
|
||||
<root url="jar://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/jars/classes.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/23.1.0/appcompat-v7-23.1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,12 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="appcompat-v7-23.1.1">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/res" />
|
||||
<root url="jar://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars/classes.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,12 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="design-23.1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars/classes.jar!/" />
|
||||
<root url="file://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/design/23.1.1/res" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/design/23.1.1/design-23.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,9 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="mp3agic-0.8.4-SNAPSHOT">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/playmusiclib/libs/mp3agic-0.8.4-SNAPSHOT.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</component>
|
|
@ -1,12 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="recyclerview-v7-23.1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars/classes.jar!/" />
|
||||
<root url="file://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/res" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/recyclerview-v7/23.1.1/recyclerview-v7-23.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="support-annotations-23.1.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.0/support-annotations-23.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.0/support-annotations-23.1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,11 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="support-annotations-23.1.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-annotations/23.1.1/support-annotations-23.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,16 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="support-v4-23.1.0">
|
||||
<ANNOTATIONS>
|
||||
<root url="jar://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/annotations.zip!/" />
|
||||
</ANNOTATIONS>
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars/classes.jar!/" />
|
||||
<root url="file://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/res" />
|
||||
<root url="jar://$PROJECT_DIR$/framework/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars/libs/internal_impl-23.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/23.1.0/support-v4-23.1.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -1,13 +0,0 @@
|
|||
<component name="libraryTable">
|
||||
<library name="support-v4-23.1.1">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/res" />
|
||||
<root url="jar://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/classes.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/playmusicexporter/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars/libs/internal_impl-23.1.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/23.1.1/support-v4-23.1.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
|
@ -27,5 +27,20 @@
|
|||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -15,7 +15,7 @@ This project uses the [mp3agic library](https://github.com/mpatric/mp3agic) by [
|
|||
### Notice
|
||||
|
||||
The project will be rewritten and the complete source will be a available soon.
|
||||
The android package id is currently <em>"de.arcus.playmusicexporter2"</em>. This will be replaced by the old id <em>"de.arcus.playmusicexporter"</em> when the new code is done.
|
||||
The android package id is currently <em>"re.jcg.playmusicexporter"</em>. This will be replaced by the old id <em>"de.arcus.playmusicexporter"</em> when the new code is done.
|
||||
|
||||
You can get the <em>old</em> working version [here](https://www.david-schulte.de/en/play-music-exporter-updater/)!
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ apply plugin: 'com.android.library'
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.1"
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
|
@ -42,5 +42,5 @@ android {
|
|||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:appcompat-v7:25.1.0'
|
||||
}
|
||||
|
|
|
@ -12,10 +12,7 @@
|
|||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
|
@ -29,19 +26,21 @@
|
|||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
|
@ -51,6 +50,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
|
@ -58,6 +66,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
|
@ -65,34 +82,46 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/typedefs.txt" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-fragment-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="animated-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-ui-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-media-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
|
||||
</component>
|
||||
</module>
|
26
gradle/wrapper/gradle-wrapper.properties
vendored
26
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,28 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2015 David Schulte
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
|
||||
#Wed Apr 10 15:27:10 PDT 2013
|
||||
#Fri Nov 25 23:05:46 CET 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||
|
|
|
@ -26,14 +26,15 @@ apply plugin: 'com.android.application'
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.1"
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "de.arcus.playmusicexporter2"
|
||||
minSdkVersion 9
|
||||
applicationId "re.jcg.playmusicexporter"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 102
|
||||
versionName '2.4.2'
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -45,9 +46,10 @@ android {
|
|||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:25.0.1'
|
||||
compile 'com.android.support:support-v4:25.0.1'
|
||||
compile 'com.android.support:design:25.0.1'
|
||||
compile project(':framework')
|
||||
compile project(':playmusiclib')
|
||||
compile 'com.android.support:appcompat-v7:25.1.0'
|
||||
compile 'com.android.support:support-v4:25.1.0'
|
||||
compile 'com.android.support:design:25.1.0'
|
||||
compile 'com.android.support:support-vector-drawable:25.1.0'
|
||||
}
|
||||
|
|
|
@ -12,10 +12,7 @@
|
|||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
|
@ -28,19 +25,21 @@
|
|||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
|
@ -50,6 +49,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
|
@ -57,6 +65,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
|
@ -64,40 +81,53 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-compat/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-ui/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-core-utils/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-fragment/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-media-compat/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/transition/25.1.0/jars" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="design-23.1.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="design-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="transition-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-fragment-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="animated-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-ui-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-media-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="recyclerview-v7-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
|
||||
<orderEntry type="module" module-name="playmusiclib" exported="" />
|
||||
<orderEntry type="module" module-name="framework" exported="" />
|
||||
<orderEntry type="library" exported="" name="mp3agic-0.8.4" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2;
|
||||
package re.jcg.playmusicexporter;
|
||||
|
||||
import android.app.Application;
|
||||
import android.test.ApplicationTestCase;
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2015 David Schulte
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -19,48 +18,57 @@
|
|||
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
~ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.arcus.playmusicexporter2" >
|
||||
package="re.jcg.playmusicexporter">
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme" >
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activities.MusicContainerListActivity"
|
||||
android:label="@string/app_name" >
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".activities.MusicTrackListActivity"
|
||||
android:label="@string/title_track_detail"
|
||||
android:parentActivityName=".activities.MusicContainerListActivity" >
|
||||
android:parentActivityName=".activities.MusicContainerListActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activities.MusicContainerListActivity" />
|
||||
</activity>
|
||||
|
||||
<service android:name=".services.ExportService" />
|
||||
<service android:name=".services.ExportAllService" />
|
||||
<service android:name=".services.ExportAllJob"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
||||
|
||||
<meta-data
|
||||
android:name="crashhandler.email"
|
||||
android:value="mail@janchristiangruenhage.de" />
|
||||
<meta-data
|
||||
android:name="crashhandler.supporturl"
|
||||
android:value="https://jcg.re/" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
android:label="@string/title_settings"
|
||||
android:parentActivityName=".activities.MusicContainerListActivity" >
|
||||
android:parentActivityName=".activities.MusicContainerListActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".activities.MusicContainerListActivity" />
|
||||
android:value="re.jcg.playmusicexporter.activities.MusicContainerListActivity" />
|
||||
</activity>
|
||||
<service android:name="de.arcus.playmusicexporter2.services.ExportService"/>
|
||||
|
||||
<meta-data android:name="crashhandler.email" android:value="mail@david-schulte.de" />
|
||||
<meta-data android:name="crashhandler.supporturl" android:value="http://www.david-schulte.de/" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
</manifest>
|
|
@ -1,177 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2015 David Schulte
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.format.DateFormat;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import de.arcus.framework.activities.DirectoryBrowserActivity;
|
||||
import de.arcus.framework.logger.Logger;
|
||||
import de.arcus.framework.utils.FileTools;
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.settings.PlayMusicExporterSettings;
|
||||
|
||||
/**
|
||||
* The preference activity
|
||||
*/
|
||||
public class SettingsActivity extends PreferenceActivity {
|
||||
private final static int REQUEST_EXPORT_PATH = 1;
|
||||
|
||||
// App settings
|
||||
private PlayMusicExporterSettings mSettings;
|
||||
|
||||
// Preferences
|
||||
private Preference mPrefExportPath;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
// Create the settings
|
||||
mSettings = new PlayMusicExporterSettings(this);
|
||||
|
||||
// Setup the default shared preference
|
||||
PreferenceManager prefMgr = getPreferenceManager();
|
||||
prefMgr.setSharedPreferencesName(PlayMusicExporterSettings.DEFAULT_SETTINGS_FILENAME);
|
||||
prefMgr.setSharedPreferencesMode(MODE_PRIVATE);
|
||||
|
||||
// Loads the preference xml
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
|
||||
// The export path preference
|
||||
mPrefExportPath = findPreference("preference_export_path");
|
||||
mPrefExportPath.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
// Current path
|
||||
Uri currentPath = mSettings.getUri(PlayMusicExporterSettings.PREF_EXPORT_URI, Uri.EMPTY);
|
||||
|
||||
// Starts the directory browser activity
|
||||
Intent intent = DirectoryBrowserActivity.openDirectoryBrowser(getApplicationContext(), currentPath, getString(R.string.settings_export_path));
|
||||
startActivityForResult(intent, REQUEST_EXPORT_PATH);
|
||||
|
||||
// We wait for the activity result
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Build date
|
||||
Preference prefBuildDate = findPreference("preference_build_date");
|
||||
|
||||
// Hack to get the build date
|
||||
try {
|
||||
ApplicationInfo applicationInfo = getPackageManager().getApplicationInfo(getPackageName(), 0);
|
||||
ZipFile zipFile = new ZipFile(applicationInfo.sourceDir);
|
||||
ZipEntry dexFile = zipFile.getEntry("classes.dex");
|
||||
long time = dexFile.getTime();
|
||||
|
||||
prefBuildDate.setSummary(DateFormat.format("yyyy-MM-dd HH:mm:ss", new Date(time)).toString());
|
||||
|
||||
} catch (Exception e) {
|
||||
// Failed
|
||||
}
|
||||
|
||||
updatePrefExportPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the entry for the export path
|
||||
*/
|
||||
private void updatePrefExportPath() {
|
||||
// Get the path from the settings
|
||||
Uri selectedPath = mSettings.getUri(PlayMusicExporterSettings.PREF_EXPORT_URI, Uri.EMPTY);
|
||||
|
||||
// Get all storage
|
||||
String[] storage = FileTools.getStorages();
|
||||
String[] storageValues = new String[storage.length + 1];
|
||||
for(int i=0; i<storage.length; i++) {
|
||||
String path = storage[i] + "/Music";
|
||||
storageValues[i] = path;
|
||||
}
|
||||
|
||||
// If the path is not set, we use the first default value.
|
||||
// This should not happen, because we set the default value in the
|
||||
// PlayMusicExporterSettings constructor, but i want to be sure.
|
||||
if (selectedPath == Uri.EMPTY && storageValues.length > 0) {
|
||||
selectedPath = Uri.fromFile(new File(storageValues[0]));
|
||||
}
|
||||
|
||||
String label;
|
||||
|
||||
if (selectedPath.toString().startsWith("file://")) {
|
||||
// Simple path
|
||||
label = selectedPath.getPath();
|
||||
} else {
|
||||
// Uri TODO: Add a nice readable label
|
||||
label = selectedPath.getPath();
|
||||
}
|
||||
|
||||
mPrefExportPath.setSummary(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns from a result activity
|
||||
* @param requestCode The request code
|
||||
* @param resultCode The result code
|
||||
* @param data The data
|
||||
*/
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
// Result is ok
|
||||
if (resultCode == RESULT_OK) {
|
||||
// Export path was changed
|
||||
if (requestCode == REQUEST_EXPORT_PATH) {
|
||||
// TODO
|
||||
Uri uri = data.getData();
|
||||
|
||||
Logger.getInstance().logInfo("Uri", uri.toString());
|
||||
|
||||
// Saves the permission
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) {
|
||||
getContentResolver().takePersistableUriPermission(uri,
|
||||
Intent.FLAG_GRANT_READ_URI_PERMISSION |
|
||||
Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||
}
|
||||
|
||||
mSettings.setUri(PlayMusicExporterSettings.PREF_EXPORT_URI, uri);
|
||||
|
||||
// Update the label
|
||||
updatePrefExportPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.actionmode;
|
||||
package re.jcg.playmusicexporter.actionmode;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.view.ActionMode;
|
||||
|
@ -28,11 +28,11 @@ import android.view.Menu;
|
|||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.activities.MusicContainerListActivity;
|
||||
import de.arcus.playmusicexporter2.activities.MusicTrackListActivity;
|
||||
import de.arcus.playmusicexporter2.fragments.MusicTrackListFragment;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrackList;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.activities.MusicContainerListActivity;
|
||||
import re.jcg.playmusicexporter.activities.MusicTrackListActivity;
|
||||
import re.jcg.playmusicexporter.fragments.MusicTrackListFragment;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrackList;
|
||||
|
||||
/**
|
||||
* Action mode for selected tracks
|
|
@ -0,0 +1,109 @@
|
|||
package re.jcg.playmusicexporter.activities;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.annotation.LayoutRes;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
/**
|
||||
* A {@link android.preference.PreferenceActivity} which implements and proxies the necessary calls
|
||||
* to be used with AppCompat.
|
||||
*/
|
||||
public abstract class AppCompatPreferenceActivity extends PreferenceActivity {
|
||||
|
||||
private AppCompatDelegate mDelegate;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getDelegate().installViewFactory();
|
||||
getDelegate().onCreate(savedInstanceState);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostCreate(Bundle savedInstanceState) {
|
||||
super.onPostCreate(savedInstanceState);
|
||||
getDelegate().onPostCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
public ActionBar getSupportActionBar() {
|
||||
return getDelegate().getSupportActionBar();
|
||||
}
|
||||
|
||||
public void setSupportActionBar(@Nullable Toolbar toolbar) {
|
||||
getDelegate().setSupportActionBar(toolbar);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuInflater getMenuInflater() {
|
||||
return getDelegate().getMenuInflater();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(@LayoutRes int layoutResID) {
|
||||
getDelegate().setContentView(layoutResID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
getDelegate().setContentView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().setContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addContentView(View view, ViewGroup.LayoutParams params) {
|
||||
getDelegate().addContentView(view, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostResume() {
|
||||
super.onPostResume();
|
||||
getDelegate().onPostResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onTitleChanged(CharSequence title, int color) {
|
||||
super.onTitleChanged(title, color);
|
||||
getDelegate().setTitle(title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
getDelegate().onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
getDelegate().onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
getDelegate().onDestroy();
|
||||
}
|
||||
|
||||
public void invalidateOptionsMenu() {
|
||||
getDelegate().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
private AppCompatDelegate getDelegate() {
|
||||
if (mDelegate == null) {
|
||||
mDelegate = AppCompatDelegate.create(this, null);
|
||||
}
|
||||
return mDelegate;
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.activities;
|
||||
package re.jcg.playmusicexporter.activities;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -44,11 +44,11 @@ import android.widget.EditText;
|
|||
|
||||
import de.arcus.framework.logger.Logger;
|
||||
import de.arcus.framework.crashhandler.CrashHandler;
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.fragments.MusicTrackListFragment;
|
||||
import de.arcus.playmusicexporter2.fragments.MusicContainerListFragment;
|
||||
import de.arcus.playmusicexporter2.fragments.NavigationDrawerFragment;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrackList;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.fragments.MusicTrackListFragment;
|
||||
import re.jcg.playmusicexporter.fragments.MusicContainerListFragment;
|
||||
import re.jcg.playmusicexporter.fragments.NavigationDrawerFragment;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrackList;
|
||||
import de.arcus.playmusiclib.PlayMusicManager;
|
||||
import de.arcus.playmusiclib.datasources.AlbumDataSource;
|
||||
import de.arcus.playmusiclib.datasources.ArtistDataSource;
|
||||
|
@ -106,7 +106,7 @@ public class MusicContainerListActivity extends AppCompatActivity
|
|||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_track_list);
|
||||
|
||||
// Adds the crash handler to this class
|
||||
//Adds the crash handler to this class
|
||||
CrashHandler.addCrashHandler(this);
|
||||
|
||||
Logger.getInstance().logVerbose("Activity", "onCreate(" + this.getLocalClassName() + ")");
|
||||
|
@ -186,7 +186,6 @@ public class MusicContainerListActivity extends AppCompatActivity
|
|||
builder.show();
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.activities;
|
||||
package re.jcg.playmusicexporter.activities;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -30,9 +30,9 @@ import android.support.v7.app.AppCompatActivity;
|
|||
import android.view.MenuItem;
|
||||
|
||||
import de.arcus.framework.crashhandler.CrashHandler;
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.fragments.MusicTrackListFragment;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrackList;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.fragments.MusicTrackListFragment;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrackList;
|
||||
import de.arcus.playmusiclib.PlayMusicManager;
|
||||
import de.arcus.playmusiclib.items.MusicTrackList;
|
||||
|
|
@ -0,0 +1,276 @@
|
|||
package re.jcg.playmusicexporter.activities;
|
||||
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.Ringtone;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.ListPreference;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.preference.RingtonePreference;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.support.v4.app.NavUtils;
|
||||
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.services.ExportAllService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static android.os.Build.VERSION_CODES.LOLLIPOP;
|
||||
|
||||
/**
|
||||
* A {@link PreferenceActivity} that presents a set of application settings. On
|
||||
* handset devices, settings are presented as a single list. On tablets,
|
||||
* settings are split by category, with category headers shown to the left of
|
||||
* the list of settings.
|
||||
* <p>
|
||||
* See <a href="http://developer.android.com/design/patterns/settings.html">
|
||||
* Android Design: Settings</a> for design guidelines and the <a
|
||||
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
|
||||
* API Guide</a> for more information on developing a Settings UI.
|
||||
*/
|
||||
public class SettingsActivity extends AppCompatPreferenceActivity {
|
||||
private static final String TAG = "MusicExporter_Settings";
|
||||
private static final int OPEN_DOCUMENT_TREE_REQUEST_CODE = 0;
|
||||
/**
|
||||
* A preference value change listener that updates the preference's summary
|
||||
* to reflect its new value.
|
||||
*/
|
||||
private static Preference.OnPreferenceChangeListener sBindPreferenceSummaryToValueListener = new Preference.OnPreferenceChangeListener() {
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object value) {
|
||||
String stringValue = value.toString();
|
||||
|
||||
if (preference instanceof ListPreference) {
|
||||
// For list preferences, look up the correct display value in
|
||||
// the preference's 'entries' list.
|
||||
ListPreference listPreference = (ListPreference) preference;
|
||||
int index = listPreference.findIndexOfValue(stringValue);
|
||||
|
||||
// Set the summary to reflect the new value.
|
||||
preference.setSummary(
|
||||
index >= 0
|
||||
? listPreference.getEntries()[index]
|
||||
: null);
|
||||
|
||||
} else {
|
||||
// For all other preferences, set the summary to the value's
|
||||
// simple string representation.
|
||||
preference.setSummary(stringValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Helper method to determine if the device has an extra-large screen. For
|
||||
* example, 10" tablets are extra-large.
|
||||
*/
|
||||
private static boolean isXLargeTablet(Context context) {
|
||||
return (context.getResources().getConfiguration().screenLayout
|
||||
& Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Binds a preference's summary to its value. More specifically, when the
|
||||
* preference's value is changed, its summary (line of text below the
|
||||
* preference title) is updated to reflect the value. The summary is also
|
||||
* immediately updated upon calling this method. The exact display format is
|
||||
* dependent on the type of preference.
|
||||
*
|
||||
* @see #sBindPreferenceSummaryToValueListener
|
||||
*/
|
||||
private static void bindPreferenceSummaryToValue(Preference preference) {
|
||||
// Set the listener to watch for value changes.
|
||||
preference.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
|
||||
|
||||
// Trigger the listener immediately with the preference's
|
||||
// current value.
|
||||
sBindPreferenceSummaryToValueListener.onPreferenceChange(preference,
|
||||
PreferenceManager
|
||||
.getDefaultSharedPreferences(preference.getContext())
|
||||
.getString(preference.getKey(), ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setupActionBar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the {@link android.app.ActionBar}, if the API is available.
|
||||
*/
|
||||
private void setupActionBar() {
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
// Show the Up button in the action bar.
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
if (!super.onMenuItemSelected(featureId, item)) {
|
||||
NavUtils.navigateUpFromSameTask(this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return super.onMenuItemSelected(featureId, item);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean onIsMultiPane() {
|
||||
return isXLargeTablet(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
||||
public void onBuildHeaders(List<Header> target) {
|
||||
loadHeadersFromResource(R.xml.pref_headers, target);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method stops fragment injection in malicious applications.
|
||||
* Make sure to deny any unknown fragments here.
|
||||
*/
|
||||
protected boolean isValidFragment(String fragmentName) {
|
||||
return PreferenceFragment.class.getName().equals(fragmentName)
|
||||
|| ExportPreferenceFragment.class.getName().equals(fragmentName)
|
||||
|| AutomationPreferenceFragment.class.getName().equals(fragmentName)
|
||||
|| AboutPreferenceFragment.class.getName().equals(fragmentName)
|
||||
|| DebugPreferenceFragment.class.getName().equals(fragmentName);
|
||||
}
|
||||
|
||||
public static class ExportPreferenceFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.pref_export);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
|
||||
findPreference("preference_export_path").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
startActivityForResult(new Intent("android.intent.action.OPEN_DOCUMENT_TREE"), OPEN_DOCUMENT_TREE_REQUEST_CODE);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
|
||||
switch (requestCode) {
|
||||
case OPEN_DOCUMENT_TREE_REQUEST_CODE:
|
||||
if (resultCode == RESULT_OK) {
|
||||
Uri treeUri = resultData.getData();
|
||||
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit().putString("preference_export_tree_uri", treeUri.toString()).apply();
|
||||
getActivity().getContentResolver().takePersistableUriPermission(treeUri,
|
||||
Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
|
||||
Log.i(TAG, "Selected " + treeUri.toString());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Log.i(TAG, "Received activityResult with unknown requestCode");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AutomationPreferenceFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.pref_automation);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AboutPreferenceFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.pref_about);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class DebugPreferenceFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.pref_debug);
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
findPreference("debug_trigger_export_all").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
|
||||
@Override
|
||||
public boolean onPreferenceClick(Preference preference) {
|
||||
Log.i(TAG, "Debug Trigger Export All Click registered.");
|
||||
ExportAllService.startExport(getActivity());
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
if (id == android.R.id.home) {
|
||||
startActivity(new Intent(getActivity(), SettingsActivity.class));
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.adapter;
|
||||
package re.jcg.playmusicexporter.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -32,8 +32,8 @@ import android.widget.TextView;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.utils.ArtworkViewLoader;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.utils.ArtworkViewLoader;
|
||||
import de.arcus.playmusiclib.items.MusicTrackList;
|
||||
|
||||
/**
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.adapter;
|
||||
package re.jcg.playmusicexporter.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
|
@ -34,10 +34,10 @@ import android.widget.TextView;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrack;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrackList;
|
||||
import de.arcus.playmusicexporter2.utils.ArtworkViewLoader;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrack;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrackList;
|
||||
import re.jcg.playmusicexporter.utils.ArtworkViewLoader;
|
||||
import de.arcus.playmusiclib.items.MusicTrack;
|
||||
|
||||
/**
|
|
@ -20,9 +20,9 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.fragments;
|
||||
package re.jcg.playmusicexporter.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ListFragment;
|
||||
import android.view.View;
|
||||
|
@ -32,7 +32,7 @@ import android.widget.ListView;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.arcus.playmusicexporter2.adapter.MusicContainerListAdapter;
|
||||
import re.jcg.playmusicexporter.adapter.MusicContainerListAdapter;
|
||||
import de.arcus.playmusiclib.items.MusicTrackList;
|
||||
|
||||
/**
|
||||
|
@ -145,17 +145,17 @@ public class MusicContainerListFragment extends ListFragment {
|
|||
setActivatedPosition(savedInstanceState.getInt(STATE_ACTIVATED_POSITION));
|
||||
}
|
||||
}
|
||||
|
||||
// DEPRECATED
|
||||
@Override
|
||||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
|
||||
// Activities containing this fragment must implement its callbacks.
|
||||
if (!(activity instanceof Callbacks)) {
|
||||
if (!(context instanceof Callbacks)) {
|
||||
throw new IllegalStateException("Activity must implement fragment's callbacks.");
|
||||
}
|
||||
|
||||
mCallbacks = (Callbacks) activity;
|
||||
mCallbacks = (Callbacks) context;
|
||||
}
|
||||
|
||||
@Override
|
|
@ -20,10 +20,12 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.fragments;
|
||||
package re.jcg.playmusicexporter.fragments;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.text.TextUtils;
|
||||
|
@ -36,15 +38,15 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.activities.MusicContainerListActivity;
|
||||
import de.arcus.playmusicexporter2.activities.MusicTrackListActivity;
|
||||
import de.arcus.playmusicexporter2.adapter.MusicTrackListAdapter;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrack;
|
||||
import de.arcus.playmusicexporter2.items.SelectedTrackList;
|
||||
import de.arcus.playmusicexporter2.settings.PlayMusicExporterSettings;
|
||||
import de.arcus.playmusicexporter2.utils.ArtworkViewLoader;
|
||||
import de.arcus.playmusicexporter2.utils.MusicPathBuilder;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.activities.MusicContainerListActivity;
|
||||
import re.jcg.playmusicexporter.activities.MusicTrackListActivity;
|
||||
import re.jcg.playmusicexporter.adapter.MusicTrackListAdapter;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrack;
|
||||
import re.jcg.playmusicexporter.items.SelectedTrackList;
|
||||
import re.jcg.playmusicexporter.settings.PlayMusicExporterSettings;
|
||||
import re.jcg.playmusicexporter.utils.ArtworkViewLoader;
|
||||
import re.jcg.playmusicexporter.utils.MusicPathBuilder;
|
||||
import de.arcus.playmusiclib.PlayMusicManager;
|
||||
import de.arcus.playmusiclib.items.MusicTrack;
|
||||
import de.arcus.playmusiclib.items.MusicTrackList;
|
||||
|
@ -241,23 +243,21 @@ public class MusicTrackListFragment extends Fragment {
|
|||
// Track is available
|
||||
if (musicTrack.isOfflineAvailable()) {
|
||||
|
||||
// Gets the settings
|
||||
PlayMusicExporterSettings settings = new PlayMusicExporterSettings(getActivity());
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
|
||||
// Default structure
|
||||
String pathStructure = "{album-artist} - {title}.mp3";
|
||||
String pathStructure = preferences.getString("preference_structure_alba", "{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3");
|
||||
|
||||
// Track is exported from a group (playlist or artist)
|
||||
if (!TextUtils.isEmpty(musicTrack.getContainerName()))
|
||||
{
|
||||
pathStructure = "{group}/{album-artist} - {title}.mp3";
|
||||
if (!TextUtils.isEmpty(musicTrack.getContainerName())) {
|
||||
pathStructure = preferences.getString("preference_structure_groups", "{group}/{group-no=$$.} {artist} - {title}.mp3");
|
||||
}
|
||||
|
||||
// Build the path
|
||||
String path = MusicPathBuilder.Build(musicTrack, pathStructure);
|
||||
|
||||
// Gets the root uri
|
||||
Uri uri = settings.getUri(PlayMusicExporterSettings.PREF_EXPORT_URI, Uri.EMPTY);
|
||||
Uri uri = Uri.parse(preferences.getString("preference_export_tree_uri", Uri.EMPTY.toString()));
|
||||
|
||||
|
||||
// Prevent the closing
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.fragments;
|
||||
package re.jcg.playmusicexporter.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
@ -42,9 +42,9 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.activities.SettingsActivity;
|
||||
import de.arcus.playmusicexporter2.settings.PlayMusicExporterSettings;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.activities.SettingsActivity;
|
||||
import re.jcg.playmusicexporter.settings.PlayMusicExporterSettings;
|
||||
|
||||
/**
|
||||
* Fragment used for managing interactions for and presentation of a navigation drawer.
|
|
@ -20,13 +20,13 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.items;
|
||||
package re.jcg.playmusicexporter.items;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
||||
import de.arcus.playmusicexporter2.services.ExportService;
|
||||
import re.jcg.playmusicexporter.services.ExportService;
|
||||
|
||||
/**
|
||||
* The selected track
|
|
@ -20,14 +20,14 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.items;
|
||||
package re.jcg.playmusicexporter.items;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.view.ActionMode;
|
||||
|
||||
import de.arcus.framework.utils.SelectionList;
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import de.arcus.playmusicexporter2.actionmode.ActionModeTitle;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import re.jcg.playmusicexporter.actionmode.ActionModeTitle;
|
||||
|
||||
/**
|
||||
* The selection manager for music tracks
|
|
@ -0,0 +1,60 @@
|
|||
package re.jcg.playmusicexporter.services;
|
||||
|
||||
import android.app.job.JobInfo;
|
||||
import android.app.job.JobParameters;
|
||||
import android.app.job.JobScheduler;
|
||||
import android.app.job.JobService;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.RequiresApi;
|
||||
import android.util.Log;
|
||||
|
||||
public class ExportAllJob extends JobService {
|
||||
public static final String TAG = "AutoGPME_ExportJob";
|
||||
|
||||
|
||||
public static void scheduleExport(final Context pContext) {
|
||||
SharedPreferences lPreferences = PreferenceManager.getDefaultSharedPreferences(pContext);
|
||||
lPreferences.registerOnSharedPreferenceChangeListener(new SharedPreferences.OnSharedPreferenceChangeListener() {
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
scheduleExport(pContext);
|
||||
Log.i(TAG, "Preference changed: " + key);
|
||||
}
|
||||
});
|
||||
|
||||
long lInterval = Long.parseLong(lPreferences.getString("settings_export_frequency", "86400000"));
|
||||
boolean lRequireUnmeteredNetwork = lPreferences.getBoolean("settings_export_", false);
|
||||
boolean lRequireCharging = lPreferences.getBoolean("settings", true);
|
||||
|
||||
JobScheduler lJobScheduler = (JobScheduler) pContext.getSystemService(JOB_SCHEDULER_SERVICE);
|
||||
if (lInterval == -1) {
|
||||
lJobScheduler.cancel(42);
|
||||
} else {
|
||||
ComponentName lComponentName = new ComponentName(pContext, ExportAllJob.class);
|
||||
JobInfo.Builder lBuilder = new JobInfo.Builder(42, lComponentName);
|
||||
lBuilder.setPeriodic(lInterval);
|
||||
lBuilder.setPersisted(true);
|
||||
if (lRequireUnmeteredNetwork)
|
||||
lBuilder.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED);
|
||||
lBuilder.setRequiresCharging(lRequireCharging);
|
||||
lJobScheduler.schedule(lBuilder.build());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onStartJob(JobParameters params) {
|
||||
Log.i(TAG, "Started Job: " + params.toString());
|
||||
ExportAllService.startExport(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onStopJob(JobParameters params) {
|
||||
Log.i(TAG, "Stopped Job: " + params.toString());
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package re.jcg.playmusicexporter.services;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.provider.DocumentFile;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import re.jcg.playmusicexporter.utils.MusicPathBuilder;
|
||||
import de.arcus.playmusiclib.PlayMusicManager;
|
||||
import de.arcus.playmusiclib.datasources.AlbumDataSource;
|
||||
import de.arcus.playmusiclib.exceptions.CouldNotOpenDatabaseException;
|
||||
import de.arcus.playmusiclib.exceptions.NoSuperUserException;
|
||||
import de.arcus.playmusiclib.exceptions.PlayMusicNotFoundException;
|
||||
import de.arcus.playmusiclib.items.Album;
|
||||
import de.arcus.playmusiclib.items.MusicTrack;
|
||||
|
||||
|
||||
public class ExportAllService extends IntentService {
|
||||
public static final String TAG = "AutoGPME_ExportService";
|
||||
public static final String ACTION_EXPORT = "re.jcg.playmusicexporter.action.EXPORT";
|
||||
public static final String ACTION_SET_EXPORT_JOB = "re.jcg.playmusicexporter.action.SET_EXPORT_JOB";
|
||||
|
||||
public static void startExport(Context pContext) {
|
||||
Intent lIntent = new Intent(pContext, ExportAllService.class);
|
||||
lIntent.setAction(ACTION_EXPORT);
|
||||
pContext.startService(lIntent);
|
||||
Log.i(TAG, "Intent sent!");
|
||||
}
|
||||
|
||||
public ExportAllService() {
|
||||
super("AutoGPME-ExportService");
|
||||
}
|
||||
|
||||
protected void onHandleIntent(Intent intent) {
|
||||
Log.i(TAG, "Received intent: " + intent.getAction());
|
||||
switch (intent.getAction()) {
|
||||
case ACTION_EXPORT:
|
||||
export();
|
||||
break;
|
||||
case ACTION_SET_EXPORT_JOB:
|
||||
ExportAllJob.scheduleExport(this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void export() {
|
||||
SharedPreferences lPreferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
PlayMusicManager lPlayMusicManager = new PlayMusicManager(this);
|
||||
|
||||
try {
|
||||
lPlayMusicManager.startUp();
|
||||
} catch (PlayMusicNotFoundException | NoSuperUserException | CouldNotOpenDatabaseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String lStringUri = lPreferences.getString("preference_export_tree_uri", null);
|
||||
String lExportStructure = lPreferences.getString("preference_structure_alba", "{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3");
|
||||
Log.i(TAG, lStringUri);
|
||||
Uri lUri = Uri.parse(lStringUri);
|
||||
AlbumDataSource lAlbumDataSource = new AlbumDataSource(lPlayMusicManager);
|
||||
lAlbumDataSource.setOfflineOnly(true);
|
||||
List<Album> lAlba = lAlbumDataSource.getAll();
|
||||
for (Album lAlbum : lAlba) {
|
||||
for (MusicTrack lTrack : lAlbum.getMusicTrackList()) {
|
||||
if (lTrack.isOfflineAvailable()) {
|
||||
String lPath = MusicPathBuilder.Build(lTrack, lExportStructure);
|
||||
if (!isAlreadyThere(lUri, lPath)) {
|
||||
if (lPlayMusicManager.exportMusicTrack(lTrack, lUri, lPath)) {
|
||||
Log.i(TAG, "Exported Music Track: " + getStringForTrack(lTrack));
|
||||
} else {
|
||||
Log.i(TAG, "Failed to export Music Track: " + getStringForTrack(lTrack));
|
||||
}
|
||||
} else {
|
||||
Log.i(TAG, lPath + " already exists.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAlreadyThere(Uri pUri, String pPath) {
|
||||
DocumentFile lDocumentFile = DocumentFile.fromTreeUri(this, pUri);
|
||||
for (String lDisplayName: pPath.split("/")) {
|
||||
if (lDocumentFile.findFile(lDisplayName) != null) {
|
||||
lDocumentFile = lDocumentFile.findFile(lDisplayName);
|
||||
} else {
|
||||
Log.i(TAG, pPath + " does not exist yet.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private String getStringForTrack(MusicTrack pTrack) {
|
||||
return pTrack.getAlbumArtist() + " - " + pTrack.getAlbum() + " - " + pTrack.getTitle();
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.services;
|
||||
package re.jcg.playmusicexporter.services;
|
||||
|
||||
import android.app.IntentService;
|
||||
import android.app.Notification;
|
||||
|
@ -31,7 +31,7 @@ import android.os.Bundle;
|
|||
import android.support.v4.app.NotificationCompat;
|
||||
|
||||
import de.arcus.framework.logger.Logger;
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import de.arcus.playmusiclib.PlayMusicManager;
|
||||
import de.arcus.playmusiclib.datasources.MusicTrackDataSource;
|
||||
import de.arcus.playmusiclib.items.MusicTrack;
|
|
@ -20,54 +20,73 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.settings;
|
||||
package re.jcg.playmusicexporter.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import de.arcus.framework.settings.AppSettings;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
|
||||
/**
|
||||
* Helper class to read and write app settings without to care about to open and close an editor
|
||||
*/
|
||||
public class PlayMusicExporterSettings extends AppSettings {
|
||||
private static PlayMusicExporterSettings settings;
|
||||
/**
|
||||
* The default settings file
|
||||
*/
|
||||
public static final String DEFAULT_SETTINGS_FILENAME = "play_music_exporter";
|
||||
|
||||
// Preference constants
|
||||
public static final String PREF_ID3 = "pref_id3";
|
||||
public static final String PREF_ID3_ARTWORK_SIZE = "pref_id3_artwork_size";
|
||||
private static final String PREF_ID3 = "pref_id3";
|
||||
private static final String PREF_ID3_ARTWORK_SIZE = "pref_id3_artwork_size";
|
||||
public static final String PREF_EXPORT_URI = "pref_export_uri";
|
||||
public static final String PREF_STRUCTURE_ALBUMS = "pref_structure_albums";
|
||||
public static final String PREF_STRUCTURE_GROUPS = "pref_structure_groups";
|
||||
private static final String PREF_STRUCTURE_ALBA = "pref_structure_albua";
|
||||
private static final String PREF_STRUCTURE_GROUPS = "pref_structure_groups";
|
||||
public static final String PREF_DRAWER_LEARNED = "pref_drawer_learned";
|
||||
public static final String PREF_DRAWER_SELECTED_TYPE = "pref_drawer_selected_type";
|
||||
|
||||
public PlayMusicExporterSettings(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance of PlayMusicExporterSettings that access to the default settings file
|
||||
* @param context Context of the app
|
||||
*/
|
||||
public PlayMusicExporterSettings(Context context) {
|
||||
super(context, DEFAULT_SETTINGS_FILENAME);
|
||||
public static void init(Context context) {
|
||||
settings = new PlayMusicExporterSettings(context);
|
||||
|
||||
// Init the default values
|
||||
|
||||
// ID3 settings
|
||||
if (!contains(PREF_ID3))
|
||||
setString(PREF_ID3, "id3_with_cover");
|
||||
if (!settings.contains(PREF_ID3))
|
||||
settings.setString(PREF_ID3, "id3_with_cover");
|
||||
|
||||
// ID3 artwork settings
|
||||
if (!contains(PREF_ID3_ARTWORK_SIZE))
|
||||
setInt(PREF_ID3_ARTWORK_SIZE, 512);
|
||||
if (!settings.contains(PREF_ID3_ARTWORK_SIZE))
|
||||
settings.setInt(PREF_ID3_ARTWORK_SIZE, 1024);
|
||||
|
||||
// Export path
|
||||
if (!contains(PREF_EXPORT_URI))
|
||||
setUri(PREF_EXPORT_URI, Uri.fromFile(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)));
|
||||
if (!settings.contains(PREF_EXPORT_URI))
|
||||
settings.setUri(PREF_EXPORT_URI, Uri.fromFile(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC)));
|
||||
|
||||
// Alba export structure
|
||||
if (!settings.contains(PREF_STRUCTURE_ALBA))
|
||||
settings.setString(PREF_STRUCTURE_ALBA, context.getString(R.string.settings_export_structure_alba_default_value));
|
||||
|
||||
// Groups export structure
|
||||
if (!settings.contains(PREF_STRUCTURE_GROUPS))
|
||||
settings.setString(PREF_STRUCTURE_GROUPS, context.getString(R.string.settings_export_structure_groups_default_value));
|
||||
|
||||
// Drawer learned
|
||||
if (!settings.contains(PREF_DRAWER_LEARNED))
|
||||
settings.setBoolean(PREF_DRAWER_LEARNED, false);
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
|
|
@ -20,14 +20,14 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.utils;
|
||||
package re.jcg.playmusicexporter.utils;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import de.arcus.playmusicexporter2.R;
|
||||
import re.jcg.playmusicexporter.R;
|
||||
import de.arcus.playmusiclib.ArtworkLoader;
|
||||
import de.arcus.playmusiclib.ArtworkLoaderCallback;
|
||||
import de.arcus.playmusiclib.items.ArtworkEntry;
|
|
@ -20,7 +20,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package de.arcus.playmusicexporter2.utils;
|
||||
package re.jcg.playmusicexporter.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zm1,15h-2v-6h2v6zm0,-8h-2V7h2v2z" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M11.5,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.9,2 2,2zm6.5,-6v-5.5c0,-3.07 -2.13,-5.64 -5,-6.32V3.5c0,-0.83 -0.67,-1.5 -1.5,-1.5S10,2.67 10,3.5v0.68c-2.87,0.68 -5,3.25 -5,6.32V16l-2,2v1h17v-1l-2,-2z" />
|
||||
</vector>
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01,-.25 1.97,-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0,-4.42,-3.58,-8,-8,-8zm0 14c-3.31 0,-6,-2.69,-6,-6 0,-1.01.25,-1.97.7,-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4,-4,-4,-4v3z" />
|
||||
</vector>
|
|
@ -33,7 +33,7 @@
|
|||
<!-- As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions. -->
|
||||
<fragment android:id="@+id/fragment_main"
|
||||
android:name="de.arcus.playmusicexporter2.fragments.MusicContainerListFragment"
|
||||
android:name="re.jcg.playmusicexporter.fragments.MusicContainerListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".TrackListActivity"
|
||||
|
@ -50,7 +50,7 @@
|
|||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:name="de.arcus.playmusicexporter2.fragments.NavigationDrawerFragment"
|
||||
android:name="re.jcg.playmusicexporter.fragments.NavigationDrawerFragment"
|
||||
tools:layout="@layout/fragment_navigation_drawer" />
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
http://developer.android.com/training/multiscreen/screensizes.html#TaskUseAliasFilters
|
||||
-->
|
||||
<fragment android:id="@+id/fragment_main"
|
||||
android:name="de.arcus.playmusicexporter2.fragments.MusicContainerListFragment" android:layout_width="0dp"
|
||||
android:name="re.jcg.playmusicexporter.fragments.MusicContainerListFragment" android:layout_width="0dp"
|
||||
android:layout_height="match_parent" android:layout_weight="1.5"
|
||||
tools:layout="@android:layout/list_content" />
|
||||
|
||||
|
@ -65,6 +65,6 @@
|
|||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:name="de.arcus.playmusicexporter2.fragments.NavigationDrawerFragment"
|
||||
android:name="re.jcg.playmusicexporter.fragments.NavigationDrawerFragment"
|
||||
tools:layout="@layout/fragment_navigation_drawer" />
|
||||
</android.support.v4.widget.DrawerLayout>
|
11
playmusicexporter/src/main/res/values-de/array.xml
Normal file
11
playmusicexporter/src/main/res/values-de/array.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="settings_export_frequency_value_names">
|
||||
<item>Alle 6 Hours</item>
|
||||
<item>Alle 12 Stunden</item>
|
||||
<item>Alle Tag</item>
|
||||
<item>Alle 2 Tage</item>
|
||||
<item>Jede Woche</item>
|
||||
<item>Nie</item>
|
||||
</string-array>
|
||||
</resources>
|
|
@ -36,10 +36,7 @@
|
|||
<string name="settings_category_export">Export-Einstellungen</string>
|
||||
<string name="settings_category_extra">Extras</string>
|
||||
<string name="settings_category_thanks">Dank an</string>
|
||||
<string name="settings_donation_summery">Spende über PayPal</string>
|
||||
<string name="settings_donation_title">Unterstützt mich</string>
|
||||
<string name="settings_export_path">Speicherort</string>
|
||||
<string name="settings_export_structure_albums">Verzeichnisbaum für Alben</string>
|
||||
<string name="settings_export_structure_groups">Verzeichnisbaum für Playlists</string>
|
||||
<string name="settings_export_id3">MP3 Metadaten</string>
|
||||
<string name="settings_export_id3_disabled">Ohne Metadaten</string>
|
||||
|
@ -67,4 +64,19 @@
|
|||
<string name="dialog_storage_access_denied_title">Daten-Zugriff verweigert</string>
|
||||
<string name="dialog_storage_access_denied">Der PlayMusicExpoerter benötigt Schreibrechte auf der SD-Karte. Dies ist Teil des Marshmallow-Fix.\n\nBitte starten Sie die App neu und erlauben Sie die Berechtigung.</string>
|
||||
<string name="text_okay">OK</string>
|
||||
<string name="pref_header_about">Über</string>
|
||||
<string name="pref_header_automation">Automatisierung</string>
|
||||
<string name="pref_header_export">Export</string>
|
||||
<string name="settings_category_about_original_developer">Über den ursprünglichen Entwickler</string>
|
||||
<string name="settings_category_export_location">Export Speicherort</string>
|
||||
<string name="settings_category_metadata">Metadaten</string>
|
||||
<string name="settings_donation_old_summery">Spende an David Schulte via PayPal</string>
|
||||
<string name="settings_donation_old_title">Unterstützt den ursprünglichen Entwickler</string>
|
||||
<string name="settings_export_structure_alba">Verzeichnisbaum für Alben</string>
|
||||
<string name="settings_export_subdirectory_structure_album">Setze den Verzeichnisbaum</string>
|
||||
<string name="settings_export_subdirectory_structure_album_example">Beispiel: Beatles/Help!/13. Yesterday.mp3</string>
|
||||
<string name="settings_export_subdirectory_structure_dialog_message">"Nutze / für einen neuen Order. Available Tags: - {album-artist} - {album} - {artist} - {title} - {disc=CD $} - {no=$$.} - {year} - {genre} "</string>
|
||||
<string name="settings_export_subdirectory_structure_group">Setze den Verzeichnisbaum</string>
|
||||
<string name="settings_export_subdirectory_structure_group_example">Beispiel: Great Songs/4. Beatles - Yesterday.mp3</string>
|
||||
<string name="settings_version_number">Versionsnummer</string>
|
||||
</resources>
|
43
playmusicexporter/src/main/res/values/array.xml
Normal file
43
playmusicexporter/src/main/res/values/array.xml
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="settings_export_frequency_value_names">
|
||||
<item>Every 6 Hours</item>
|
||||
<item>Every 12 Hours</item>
|
||||
<item>Every Day</item>
|
||||
<item>Every 2 Days</item>
|
||||
<item>Every Week</item>
|
||||
<item>Never</item>
|
||||
</string-array>
|
||||
<string-array name="settings_export_frequency_values" translatable="false">
|
||||
<item>2160000</item>
|
||||
<item>43200000</item>
|
||||
<item>86400000</item>
|
||||
<item>172800000</item>
|
||||
<item>604800000</item>
|
||||
<item>-1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="settings_export_id3_artwork_size_value_names" translatable="false">
|
||||
<item>128x128px</item>
|
||||
<item>256x256px</item>
|
||||
<item>512x512px</item>
|
||||
<item>1024x1024px</item>
|
||||
</string-array>
|
||||
<string-array name="settings_export_id3_artwork_size_values" translatable="false">
|
||||
<item>128</item>
|
||||
<item>256</item>
|
||||
<item>512</item>
|
||||
<item>1024</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="settings_export_id3_value_names" translatable="false">
|
||||
<item>@string/settings_export_id3_with_cover</item>
|
||||
<item>@string/settings_export_id3_without_cover</item>
|
||||
<item>@string/settings_export_id3_disabled</item>
|
||||
</string-array>
|
||||
<string-array name="settings_export_id3_values" translatable="false">
|
||||
<item>id3_with_cover</item>
|
||||
<item>id3_without_cover</item>
|
||||
<item>id3_disabled</item>
|
||||
</string-array>
|
||||
</resources>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2015 David Schulte
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
@ -62,65 +61,57 @@
|
|||
|
||||
<string name="settings_category_export">Export settings</string>
|
||||
<string name="settings_category_extra">Extras</string>
|
||||
<string name="settings_category_about_original_developer">About the original developer</string>
|
||||
<string name="settings_category_about_me">About me</string>
|
||||
<string name="settings_category_thanks">Thanks to</string>
|
||||
<string name="settings_category_develop">Develop</string>
|
||||
<string name="settings_category_develop">About this version</string>
|
||||
<string name="settings_category_debug">Debug</string>
|
||||
|
||||
<string name="settings_version_number">Version Number</string>
|
||||
<string name="settings_build_date">Build date</string>
|
||||
|
||||
<string name="settings_category_export_location">Export Location</string>
|
||||
<string name="settings_export_path">Export Base Path</string>
|
||||
<string name="settings_export_subdirectory_structure_dialog_message">Use / for a new folder \n Available Tags: \n - {album-artist} \n - {album} \n - {artist} \n - {title} \n - {disc=CD $} \n - {no=$$.} \n - {year} \n - {genre} \n</string>
|
||||
|
||||
<string name="settings_export_structure_alba">Subdirectory structure for albums</string>
|
||||
<string name="settings_export_subdirectory_structure_album">Set your subdirectory structure</string>
|
||||
<string name="settings_export_subdirectory_structure_album_example">Example: Beatles/Help!/13. Yesterday.mp3</string>
|
||||
|
||||
<string name="settings_export_path">Location</string>
|
||||
<string name="settings_export_structure_albums">Subdirectory structure for albums</string>
|
||||
<string name="settings_export_structure_groups">Subdirectory structure for playlists</string>
|
||||
<string name="settings_export_subdirectory_structure_group">Set your subdirectory structure</string>
|
||||
<string name="settings_export_subdirectory_structure_group_example">Example: Great Songs/4. Beatles - Yesterday.mp3</string>
|
||||
|
||||
<string name="settings_export_id3">MP3 metadata</string>
|
||||
<string name="settings_export_id3">ID3 Tags</string>
|
||||
<string name="settings_export_id3_with_cover">Metadata with cover</string>
|
||||
<string name="settings_export_id3_without_cover">Metadata without cover</string>
|
||||
<string name="settings_export_id3_disabled">No metadata</string>
|
||||
|
||||
<string name="settings_category_metadata">Metadata</string>
|
||||
<string name="settings_export_id3_artwork_size">Maximum artwork size</string>
|
||||
<string name="settings_export_id3_artwork_size_summary">If the artwork original size is larger than this setting the app will size down the artwork to this size.</string>
|
||||
<string name="settings_export_id3_artwork_size_128px" translatable="false">128x128px</string>
|
||||
<string name="settings_export_id3_artwork_size_256px" translatable="false">256x256px</string>
|
||||
<string name="settings_export_id3_artwork_size_512px" translatable="false">512x512px</string>
|
||||
<string name="settings_export_id3_artwork_size_1024px" translatable="false">1024x1024px</string>
|
||||
|
||||
<string-array name="settings_export_id3_artwork_size_value_names" translatable="false">
|
||||
<item>@string/settings_export_id3_artwork_size_128px</item>
|
||||
<item>@string/settings_export_id3_artwork_size_256px</item>
|
||||
<item>@string/settings_export_id3_artwork_size_512px</item>
|
||||
<item>@string/settings_export_id3_artwork_size_1024px</item>
|
||||
</string-array>
|
||||
<string-array name="settings_export_id3_artwork_size_values" translatable="false">
|
||||
<item>128</item>
|
||||
<item>256</item>
|
||||
<item>512</item>
|
||||
<item>1024</item>
|
||||
</string-array>
|
||||
|
||||
<string name="settings_export_path_custom">Custom path</string>
|
||||
<string-array name="settings_export_id3_value_names">
|
||||
<item>@string/settings_export_id3_with_cover</item>
|
||||
<item>@string/settings_export_id3_without_cover</item>
|
||||
<item>@string/settings_export_id3_disabled</item>
|
||||
</string-array>
|
||||
<string-array name="settings_export_id3_values" translatable="false">
|
||||
<item>id3_with_cover</item>
|
||||
<item>id3_without_cover</item>
|
||||
<item>id3_disabled</item>
|
||||
</string-array>
|
||||
|
||||
<string name="settings_open_old_homepage_title" translatable="false">David-Schulte.de</string>
|
||||
<string name="settings_open_old_homepage_url" translatable="false"><![CDATA[http://www.david-schulte.de/]]></string>
|
||||
|
||||
|
||||
<string name="settings_open_homepage_title" translatable="false">David-Schulte.de</string>
|
||||
<string name="settings_open_homepage_url" translatable="false"><![CDATA[http://www.david-schulte.de/]]></string>
|
||||
<string name="settings_open_homepage_title" translatable="false">jcg.re</string>
|
||||
<string name="settings_open_homepage_url" translatable="false"><![CDATA[https://jcg.re/]]></string>
|
||||
|
||||
<string name="settings_mp3agic_title" translatable="false">Mp3agic ID3 Libary</string>
|
||||
<string name="settings_mp3agic_summery" translatable="false">Michael Patricios © 2006–2013</string>
|
||||
<string name="settings_mp3agic_url" translatable="false"><![CDATA[https://github.com/mpatric/mp3agic]]></string>
|
||||
|
||||
<string name="settings_donation_title">Support me</string>
|
||||
<string name="settings_donation_summery">Donate to me via PayPal</string>
|
||||
<string name="settings_donation_url" translatable="false"><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A2VD24Z5E32RU]]></string>
|
||||
|
||||
<string name="settings_build_date">Build date</string>
|
||||
<string name="settings_donation_old_title">Support the original developer</string>
|
||||
<string name="settings_donation_old_summery">Donate to David Schulte via PayPal</string>
|
||||
<string name="settings_donation_old_url" translatable="false"><![CDATA[https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A2VD24Z5E32RU]]></string>
|
||||
|
||||
<string name="action_mode_track_selection">%d tracks selected</string>
|
||||
<string name="pref_header_export">Export</string>
|
||||
<string name="pref_header_automation">Automation</string>
|
||||
<string name="pref_header_about">About</string>
|
||||
<string name="settings_export_structure_alba_default_value" translatable="false">{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3</string>
|
||||
<string name="settings_export_structure_groups_default_value" translatable="false">{group}/{group-no=$$.} {artist} - {title}.mp3</string>
|
||||
<string name="debug_trigger_export_all_title">Trigger ExportAllService now</string>
|
||||
</resources>
|
||||
|
|
60
playmusicexporter/src/main/res/xml/pref_about.xml
Normal file
60
playmusicexporter/src/main/res/xml/pref_about.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- Thanks to -->
|
||||
<PreferenceCategory android:title="@string/settings_category_thanks">
|
||||
<!-- Mp3agic -->
|
||||
<Preference
|
||||
android:summary="@string/settings_mp3agic_summery"
|
||||
android:title="@string/settings_mp3agic_title">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_mp3agic_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- About David Schulte -->
|
||||
<PreferenceCategory android:title="@string/settings_category_about_me">
|
||||
<!-- Homepage -->
|
||||
<Preference
|
||||
android:summary="@string/settings_open_homepage_url"
|
||||
android:title="@string/settings_open_homepage_title">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_open_homepage_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- About David Schulte -->
|
||||
<PreferenceCategory android:title="@string/settings_category_about_original_developer">
|
||||
<!-- Homepage -->
|
||||
<Preference
|
||||
android:summary="@string/settings_open_old_homepage_url"
|
||||
android:title="@string/settings_open_old_homepage_title">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_open_old_homepage_url" />
|
||||
</Preference>
|
||||
|
||||
<!-- Donation -->
|
||||
<Preference
|
||||
android:summary="@string/settings_donation_old_summery"
|
||||
android:title="@string/settings_donation_old_title">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_donation_old_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- Develop -->
|
||||
<PreferenceCategory android:title="@string/settings_category_develop">
|
||||
<!-- Version number-->
|
||||
<Preference
|
||||
android:summary="3.0.0"
|
||||
android:title="@string/settings_version_number" />
|
||||
<!-- Build date-->
|
||||
<Preference
|
||||
android:summary="29.11.2016"
|
||||
android:title="@string/settings_build_date" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
23
playmusicexporter/src/main/res/xml/pref_automation.xml
Normal file
23
playmusicexporter/src/main/res/xml/pref_automation.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference
|
||||
android:title="System Requirements"
|
||||
android:summary="Automated export requires Android 5.0 Lollipop, so enabling this on lower Android versions won't do anything."/>
|
||||
<PreferenceCategory android:title="Automation Settings">
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="preference_automatic_export_enabled"
|
||||
android:title="Enable Automatic Export" />
|
||||
<ListPreference
|
||||
android:entries="@array/settings_export_frequency_value_names"
|
||||
android:entryValues="@array/settings_export_frequency_values"
|
||||
android:key="preference_automatic_export_frequency"
|
||||
android:title="Export Interval" />
|
||||
<CheckBoxPreference
|
||||
android:key="preference_automatic_export_require_charging"
|
||||
android:title="Require Charging?" />
|
||||
<CheckBoxPreference
|
||||
android:key="preference_automatic_export_require_unmetered"
|
||||
android:title="Require Unmetered Network?" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
6
playmusicexporter/src/main/res/xml/pref_debug.xml
Normal file
6
playmusicexporter/src/main/res/xml/pref_debug.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/settings_category_debug">
|
||||
<Preference android:title="@string/debug_trigger_export_all_title"
|
||||
android:key="debug_trigger_export_all"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
47
playmusicexporter/src/main/res/xml/pref_export.xml
Normal file
47
playmusicexporter/src/main/res/xml/pref_export.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<PreferenceCategory android:title="@string/settings_category_export_location">
|
||||
<Preference
|
||||
android:key="preference_export_path"
|
||||
android:title="@string/settings_export_path">
|
||||
</Preference>
|
||||
|
||||
<!-- Path structure for albums -->
|
||||
<EditTextPreference
|
||||
android:defaultValue="@string/settings_export_structure_alba_default_value"
|
||||
android:dialogMessage="@string/settings_export_subdirectory_structure_dialog_message"
|
||||
android:dialogTitle="@string/settings_export_subdirectory_structure_album"
|
||||
android:hint="@string/settings_export_structure_alba_default_value"
|
||||
android:key="preference_structure_alba"
|
||||
android:summary="@string/settings_export_subdirectory_structure_album_example"
|
||||
android:title="@string/settings_export_structure_alba" />
|
||||
|
||||
<!-- Path structure for groups -->
|
||||
<EditTextPreference
|
||||
android:defaultValue="@string/settings_export_structure_groups_default_value"
|
||||
android:dialogMessage="@string/settings_export_subdirectory_structure_dialog_message"
|
||||
android:dialogTitle="@string/settings_export_subdirectory_structure_group"
|
||||
android:hint="@string/settings_export_structure_groups_default_value"
|
||||
android:key="preference_structure_groups"
|
||||
android:summary="@string/settings_export_subdirectory_structure_group_example"
|
||||
android:title="@string/settings_export_structure_groups" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/settings_category_metadata">
|
||||
<!-- ID3 settings -->
|
||||
<ListPreference
|
||||
android:defaultValue="id3_with_cover"
|
||||
android:entries="@array/settings_export_id3_value_names"
|
||||
android:entryValues="@array/settings_export_id3_values"
|
||||
android:key="preference_id3"
|
||||
android:title="@string/settings_export_id3" />
|
||||
|
||||
<!-- ID3 artwork size -->
|
||||
<ListPreference
|
||||
android:defaultValue="512"
|
||||
android:entries="@array/settings_export_id3_artwork_size_value_names"
|
||||
android:entryValues="@array/settings_export_id3_artwork_size_values"
|
||||
android:key="preference_id3_artwork_size"
|
||||
android:summary="@string/settings_export_id3_artwork_size_summary"
|
||||
android:title="@string/settings_export_id3_artwork_size" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
24
playmusicexporter/src/main/res/xml/pref_headers.xml
Normal file
24
playmusicexporter/src/main/res/xml/pref_headers.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- These settings headers are only used on tablets. -->
|
||||
|
||||
<header
|
||||
android:fragment="re.jcg.playmusicexporter.activities.SettingsActivity$ExportPreferenceFragment"
|
||||
android:icon="@drawable/ic_notifications_black_24dp"
|
||||
android:title="@string/pref_header_export" />
|
||||
|
||||
<header
|
||||
android:fragment="re.jcg.playmusicexporter.activities.SettingsActivity$AutomationPreferenceFragment"
|
||||
android:icon="@drawable/ic_sync_black_24dp"
|
||||
android:title="@string/pref_header_automation" />
|
||||
|
||||
<header
|
||||
android:fragment="re.jcg.playmusicexporter.activities.SettingsActivity$AboutPreferenceFragment"
|
||||
android:icon="@drawable/ic_info_black_24dp"
|
||||
android:title="@string/pref_header_about" />
|
||||
<header
|
||||
android:fragment="re.jcg.playmusicexporter.activities.SettingsActivity$DebugPreferenceFragment"
|
||||
android:icon="@drawable/ic_action_settings"
|
||||
android:title="Debug" />
|
||||
|
||||
</preference-headers>
|
|
@ -1,92 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2015 David Schulte
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
~ of this software and associated documentation files (the "Software"), to deal
|
||||
~ in the Software without restriction, including without limitation the rights
|
||||
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
~ copies of the Software, and to permit persons to whom the Software is
|
||||
~ furnished to do so, subject to the following conditions:
|
||||
~
|
||||
~ The above copyright notice and this permission notice shall be included in
|
||||
~ all copies or substantial portions of the Software.
|
||||
~
|
||||
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
~ THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Export settings -->
|
||||
<PreferenceCategory android:title="@string/settings_category_export">
|
||||
<!-- Export path -->
|
||||
<Preference android:title="@string/settings_export_path"
|
||||
android:key="preference_export_path"/>
|
||||
|
||||
<!-- Path structure for albums -->
|
||||
<Preference android:title="@string/settings_export_structure_albums"
|
||||
android:key="preference_structure_albums"
|
||||
/>
|
||||
|
||||
<!-- Path structure for groups -->
|
||||
<Preference android:title="@string/settings_export_structure_groups"
|
||||
android:key="preference_structure_groups"
|
||||
/>
|
||||
|
||||
<!-- ID3 settings -->
|
||||
<ListPreference android:title="@string/settings_export_id3"
|
||||
android:key="preference_id3"
|
||||
android:defaultValue="id3_with_cover"
|
||||
android:entries="@array/settings_export_id3_value_names"
|
||||
android:entryValues="@array/settings_export_id3_values"
|
||||
/>
|
||||
|
||||
<!-- ID3 artwork size -->
|
||||
<ListPreference android:title="@string/settings_export_id3_artwork_size"
|
||||
android:key="preference_id3_artwork_size"
|
||||
android:summary="@string/settings_export_id3_artwork_size_summary"
|
||||
android:defaultValue="512"
|
||||
android:entries="@array/settings_export_id3_artwork_size_value_names"
|
||||
android:entryValues="@array/settings_export_id3_artwork_size_values"
|
||||
/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- Thanks to -->
|
||||
<PreferenceCategory android:title="@string/settings_category_thanks">
|
||||
<!-- Mp3agic -->
|
||||
<Preference android:title="@string/settings_mp3agic_title"
|
||||
android:summary="@string/settings_mp3agic_summery">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_mp3agic_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- About me -->
|
||||
<PreferenceCategory android:title="@string/settings_category_about_me">
|
||||
<!-- Homepage -->
|
||||
<Preference android:title="@string/settings_open_homepage_title"
|
||||
android:summary="@string/settings_open_homepage_url">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_open_homepage_url" />
|
||||
</Preference>
|
||||
|
||||
<!-- Donation -->
|
||||
<Preference android:title="@string/settings_donation_title"
|
||||
android:summary="@string/settings_donation_summery">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="@string/settings_donation_url" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- Develop -->
|
||||
<PreferenceCategory android:title="@string/settings_category_develop">
|
||||
<!-- Build date-->
|
||||
<Preference android:key="preference_build_date" android:title="@string/settings_build_date"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
|
@ -24,7 +24,7 @@ apply plugin: 'com.android.library'
|
|||
|
||||
android {
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion "25.0.1"
|
||||
buildToolsVersion "25.0.2"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 9
|
||||
|
|
|
@ -12,10 +12,7 @@
|
|||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" />
|
||||
<afterSyncTasks>
|
||||
<task>generateDebugAndroidTestSources</task>
|
||||
<task>generateDebugSources</task>
|
||||
</afterSyncTasks>
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
|
@ -29,19 +26,21 @@
|
|||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
|
@ -51,6 +50,15 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||
|
@ -58,6 +66,7 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||
|
@ -65,32 +74,47 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/typedefs.txt" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="mp3agic-0.8.4-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-23.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="mp3agic-0.8.4" level="project" />
|
||||
<orderEntry type="module" module-name="framework" exported="" />
|
||||
<orderEntry type="library" exported="" name="support-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-fragment-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="animated-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-ui-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-media-compat-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-vector-drawable-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in a new issue