Skip to content

Commit

Permalink
Beta 0.54
Browse files Browse the repository at this point in the history
  • Loading branch information
shkcodes committed Aug 1, 2018
1 parent 49f7d5e commit 8c365be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@ android {
applicationId "com.shkmishra.lyrically"
minSdkVersion 21
targetSdkVersion 23
versionCode 15
versionName "0.53"
versionCode 16
versionName "0.54"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}

dependencies {
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/com/shkmishra/lyrically/LyricsService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class LyricsService : Service() {


val showLyrics = Intent(this, ShowLyrics::class.java)
showLyrics?.putExtra("messenger", Messenger(handler))
showLyrics.putExtra("messenger", Messenger(handler))
pendingIntent = PendingIntent.getService(this, 1, showLyrics, PendingIntent.FLAG_UPDATE_CURRENT)


Expand Down Expand Up @@ -297,6 +297,7 @@ class LyricsService : Service() {

//####
private fun handleIntent(intent: Intent) {
if (asyncJob != null && asyncJob!!.isActive) asyncJob?.cancel()
try {
// check if the song was changed by comparing the current artist and title with those received from the broadcast
if (!artist.equals(intent.getStringExtra("artist"), ignoreCase = true) || !track.equals(intent.getStringExtra("track"), ignoreCase = true)) {
Expand Down Expand Up @@ -332,7 +333,6 @@ class LyricsService : Service() {
lyricsTV.visibility = View.INVISIBLE
artistU = artist.replace(" ".toRegex(), "+")
trackU = track.replace(" ".toRegex(), "+")
if (asyncJob != null && asyncJob!!.isActive) asyncJob?.cancel()
fetchLyricsAsync()
break
}
Expand All @@ -351,13 +351,11 @@ class LyricsService : Service() {
} else {
artistU = artist.replace(" ".toRegex(), "+")
trackU = track.replace(" ".toRegex(), "+")
if (asyncJob != null && asyncJob!!.isActive) asyncJob?.cancel()
fetchLyricsAsync()
}
} else {
artistU = artist.replace(" ".toRegex(), "+")
trackU = track.replace(" ".toRegex(), "+")
if (asyncJob != null && asyncJob!!.isActive) asyncJob?.cancel()
fetchLyricsAsync()
}
}
Expand Down

0 comments on commit 8c365be

Please sign in to comment.