Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'indev' - v. 1.3.1 (bugfixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhaudiquet committed Dec 23, 2018
2 parents 6c7c77e + 0acb30d commit 1657f7b
Show file tree
Hide file tree
Showing 25 changed files with 2,628 additions and 2,424 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
3 changes: 3 additions & 0 deletions .idea/dictionaries/valentin.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions README.md
Expand Up @@ -32,13 +32,11 @@ Used to quickly search for songs, artists or albums in the library. 2 search mo

## Releases

[Latest Release (v 1.3)](https://github.com/Valou3433/blade-player/releases/download/v1.3/blade-1.3.apk)
[Latest Release (v 1.3.1)](https://github.com/Valou3433/blade-player/releases/download/v1.3.1/blade-1.3.1.apk)

[Mirror](http://valou3433.fr/blade/blade-1.3.apk)
[Mirror](http://valou3433.fr/blade/blade-1.3.1.apk)

- added song linkmanager
- added animation and red theme
- fixed bugs on search, mediasession, tag editor
- multiple bugfixes
<hr>

Link to all [Blade-Player Releases](https://github.com/Valou3433/blade-player/releases)
Expand All @@ -48,12 +46,9 @@ Link to all [Blade-Player Releases](https://github.com/Valou3433/blade-player/re
## Informations

Read Blade [Privacy Policy](https://github.com/Valou3433/blade-player/blob/master/Privacy.md)
Read Blade [License](https://github.com/Valou3433/blade-player/blob/master/LICENSE)
[License](https://github.com/Valou3433/blade-player/blob/master/LICENSE)
[FAQ](https://github.com/Valou3433/blade-player/blob/master/FAQ.md)

## License



## Contributors
- Valou3433 is the main developer
Expand Down
26 changes: 12 additions & 14 deletions app/build.gradle
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "v.blade"
minSdkVersion 16
targetSdkVersion 27
versionCode 12
versionName "1.3"
versionCode 13
versionName "1.3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
Expand All @@ -25,26 +25,24 @@ android {

dependencies {
implementation project(':libraries:drag-sort-listview:library')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

//tags library
implementation 'net.jthink:jaudiotagger:2.2.3'

//spotify
implementation 'com.spotify.android:auth:1.0.0-alpha' //auth
implementation 'com.github.kaaes:spotify-web-api-android:0.4.1' //web api access
implementation 'com.spotify.sdk:spotify-player-24-noconnect-2.20b@aar' //playback (play sdk)

implementation 'com.spotify.android:auth:1.0.0-alpha'
//auth
implementation 'com.github.kaaes:spotify-web-api-android:0.4.1'
//web api access
implementation 'com.spotify.sdk:spotify-player-24-noconnect-2.20b@aar'
//playback (play sdk)
//deezer
implementation 'com.deezer.sdk:deezer-sdk-0.11.2@aar'

//acra
implementation "ch.acra:acra-http:5.1.3"
implementation "ch.acra:acra-toast:5.1.3"

implementation 'ch.acra:acra-http:5.1.3'
implementation 'ch.acra:acra-toast:5.1.3'
//compat libs
implementation 'com.android.support:support-compat:27.1.1'
implementation 'com.android.support:preference-v7:27.1.1'
Expand Down
Binary file not shown.
36 changes: 20 additions & 16 deletions app/src/main/java/v/blade/library/LibraryService.java
Expand Up @@ -7,6 +7,7 @@
import android.net.Uri;
import android.os.Looper;
import android.util.Log;
import v.blade.library.sources.Source;
import v.blade.ui.settings.SettingsActivity;

import java.io.*;
Expand All @@ -22,7 +23,7 @@ public class LibraryService
{
private static final boolean LOG_REGISTER_SONG = false;
private static final int BETTER_SOURCES_MAX = 20; //stop better sources after 20 registered songs (avoid query limit)
static final String CACHE_SEPARATOR = "##";
public static final String CACHE_SEPARATOR = "##";

/* user preferences */
public static boolean configured = false;
Expand All @@ -41,7 +42,7 @@ public class LibraryService
private static final List<Song> handles = Collections.synchronizedList(new ArrayList<Song>());
private static final List<Album> albumHandles = Collections.synchronizedList(new ArrayList<Album>());
private static final List<Artist> artistHandles = Collections.synchronizedList(new ArrayList<Artist>());
static HashMap<String, ArrayList<Song>> songsByName = new HashMap<>();
public static HashMap<String, ArrayList<Song>> songsByName = new HashMap<>();

//song linkss
public static final HashMap<Song, List<Song>> songLinks = new HashMap<>();
Expand All @@ -59,7 +60,7 @@ public interface UserLibraryCallback{void onLibraryChange();}
public static List<Song> getSongs() {return songs;}
public static List<Playlist> getPlaylists() {return playlists;}

static Context appContext;
public static Context appContext;

/* synchronization notification management */
public static volatile boolean synchronization;
Expand Down Expand Up @@ -681,10 +682,10 @@ public int compare(LibraryObject o1, LibraryObject o2)
return trfinal;
}

static Song getSongHandle(String name, String album, String artist, long duration, SongSources.SongSource source, int track, int year)
public static Song getSongHandle(String name, String album, String artist, long duration, SongSources.SongSource source, int track, int year)
{
//if song is already registered, return song from library
ArrayList<Song> snames = songsByName.get(name.toLowerCase()); //TODO : fix sync problems
ArrayList<Song> snames = songsByName.get(name.toLowerCase()); //TODO : fix sync problems : UPDATE : checksync ?
if(snames != null)
{
//check if the song is already registered
Expand All @@ -703,18 +704,21 @@ static Song getSongHandle(String name, String album, String artist, long duratio
}
}
}
for(Song s : handles)
if(s.getTitle().equalsIgnoreCase(name) && s.getArtist().getName().equalsIgnoreCase(artist) && s.getAlbum().getName().equalsIgnoreCase(album))
{
if(source != null)
synchronized(handles)
{
for(Song s : handles)
if(s.getTitle().equalsIgnoreCase(name) && s.getArtist().getName().equalsIgnoreCase(artist) && s.getAlbum().getName().equalsIgnoreCase(album))
{
s.getSources().addSource(source);
s.getAlbum().getSources().addSource(source);
s.getArtist().getSources().addSource(source);
if(source != null)
{
s.getSources().addSource(source);
s.getAlbum().getSources().addSource(source);
s.getArtist().getSources().addSource(source);
}
if(LOG_REGISTER_SONG) System.out.println("[HANDLE] Found handled song : " + s.getTitle() + " - " + s.getAlbum().getName() + " - " + s.getArtist().getName() + " - SOURCE " + source.getSource());
return s;
}
if(LOG_REGISTER_SONG) System.out.println("[HANDLE] Found handled song : " + s.getTitle() + " - " + s.getAlbum().getName() + " - " + s.getArtist().getName() + " - SOURCE " + source.getSource());
return s;
}
}

if(source == null) return null;

Expand Down Expand Up @@ -751,7 +755,7 @@ static Song getSongHandle(String name, String album, String artist, long duratio
return s;
}

static void loadArt(LibraryObject obj, String path, boolean local)
public static void loadArt(LibraryObject obj, String path, boolean local)
{
if(local)
{
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/v/blade/library/SongSources.java
@@ -1,5 +1,7 @@
package v.blade.library;

import v.blade.library.sources.Source;

public class SongSources
{
public static class SongSource
Expand Down

0 comments on commit 1657f7b

Please sign in to comment.