Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Fixed #7 and #4 #9

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Created by .ignore support plugin (hsz.mobi)
### Java template
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml

# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml

# Gradle:
.idea/gradle.xml
.idea/libraries

# Mongo Explorer plugin:
.idea/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Linux template
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*
### Android template
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
*.iml

# Keystore files
*.jks
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:2.2.2'
}
}

Expand Down
10 changes: 5 additions & 5 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
minSdkVersion 8
targetSdkVersion 23
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -42,5 +42,5 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:appcompat-v7:25.0.1'
}
14 changes: 7 additions & 7 deletions playmusicexporter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
applicationId "de.arcus.playmusicexporter2"
minSdkVersion 8
targetSdkVersion 23
minSdkVersion 9
targetSdkVersion 25
versionCode 102
versionName '2.4.2'
}
Expand All @@ -45,9 +45,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
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')
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import android.view.MenuItem;

import de.arcus.playmusicexporter2.R;
import de.arcus.playmusicexporter2.activities.MusicTrackListActivity;
import de.arcus.playmusicexporter2.activities.MusicContainerListActivity;
import de.arcus.playmusicexporter2.activities.MusicTrackListActivity;
import de.arcus.playmusicexporter2.fragments.MusicTrackListFragment;
import de.arcus.playmusicexporter2.items.SelectedTrackList;

/**
Expand Down Expand Up @@ -88,6 +89,11 @@ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
MusicTrackListActivity trackDetailActivity = (MusicTrackListActivity)mSelectionList.getActivity();

trackDetailActivity.selectAll();
} else if (mSelectionList.getActivity() instanceof MusicContainerListActivity) {
MusicContainerListActivity trackDetailContainerActivity = (MusicContainerListActivity)mSelectionList.getActivity();
MusicTrackListFragment trackDetailFragment = (MusicTrackListFragment) trackDetailContainerActivity.getSupportFragmentManager()
.findFragmentById(R.id.track_detail_container);
trackDetailFragment.selectAll();
}

return true;
Expand All @@ -97,6 +103,11 @@ public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
MusicTrackListActivity trackDetailActivity = (MusicTrackListActivity)mSelectionList.getActivity();

trackDetailActivity.deselectAll();
} else if (mSelectionList.getActivity() instanceof MusicContainerListActivity) {
MusicContainerListActivity trackDetailContainerActivity = (MusicContainerListActivity)mSelectionList.getActivity();
MusicTrackListFragment trackDetailFragment = (MusicTrackListFragment) trackDetailContainerActivity.getSupportFragmentManager()
.findFragmentById(R.id.track_detail_container);
trackDetailFragment.deselectAll();
}

return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private void loadList() {
musicTrackListFragment.setMusicTrackList(dataSourcePlaylist.getAll());
break;
case Rated:
// Load all reated albums to the list
// Load all created albums to the list
AlbumDataSource dataSourceRatedAlbum = new AlbumDataSource(mPlayMusicManager);
dataSourceRatedAlbum.setOfflineOnly(true);
dataSourceRatedAlbum.setRatedOnly(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void onCreate(Bundle savedInstanceState) {
// Setup the default shared preference
PreferenceManager prefMgr = getPreferenceManager();
prefMgr.setSharedPreferencesName(PlayMusicExporterSettings.DEFAULT_SETTINGS_FILENAME);
prefMgr.setSharedPreferencesMode(MODE_WORLD_READABLE);
prefMgr.setSharedPreferencesMode(MODE_PRIVATE);

// Loads the preference xml
addPreferencesFromResource(R.xml.preferences);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ private void selectTrack(MusicTrack musicTrack, View view, TrackSelectionState s
PlayMusicExporterSettings settings = new PlayMusicExporterSettings(getActivity());

// Default structure
String pathStructure = "{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3";
String pathStructure = "{album-artist} - {title}.mp3";

// Track is exported from a group (playlist or artist)
if (!TextUtils.isEmpty(musicTrack.getContainerName()))
{
pathStructure = "{group}/{group-no=$$.} {title}.mp3";
pathStructure = "{group}/{album-artist} - {title}.mp3";
}

// Build the path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public static String cleanFilename(String filename)
{
// Forbidden chars
filename = filename.replace('\\', '-');
filename = filename.replace('/', '-');
filename = filename.replace(':', '-');
filename = filename.replace('*', '-');
filename = filename.replace('?', '-');
Expand Down
1 change: 1 addition & 0 deletions playmusicexporter/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@
<string name="settings_category_develop">Entwicklung</string>
<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>
</resources>
2 changes: 1 addition & 1 deletion playmusicexporter/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<string name="toast_error_track_not_offline">You can only export offline tracks. Try to download the album offline in Play Music.</string>

<string name="text_okay">Okay</string>
<string name="text_okay">OK</string>

<string name="search">Search&#8230;</string>
<string name="button_export_group">Export all tracks</string>
Expand Down
8 changes: 4 additions & 4 deletions playmusiclib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileSdkVersion 25
buildToolsVersion "25.0.1"

defaultConfig {
minSdkVersion 8
targetSdkVersion 23
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand Down
Binary file not shown.