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

Commit

Permalink
Merge pull request #469 from a93-39a/master
Browse files Browse the repository at this point in the history
Google Play Music Patch
  • Loading branch information
Austin H authored Aug 9, 2019
2 parents 1f9d29e + 23eaa3a commit 112678d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Before the release of a new version of SLS, it will be available here to test fo
* [Enable/Disable Individual Music App Scrobbles](https://github.com/tgwizard/sls/issues/200) [Similar Issue](https://github.com/tgwizard/sls/issues/367)
* [Blocking Podcast Scrobbles](https://github.com/tgwizard/sls/issues/127)
* Read Notifications to Scrobble Music Also
* Use Android audio focus detection to manage scrobbling.
* Slow overhaul of the app to keep simplicity and allow for dynamic feature/functionality addition.

3. #### Core Feature Requests
Expand All @@ -102,7 +103,7 @@ Before the release of a new version of SLS, it will be available here to test fo
* Sequential storage of all tracks, scrobbled, skipped, hearted, and failed with explanations
* markers in scrobble cache for logged in accounts
* Store scrobbles before user is logged in

## Features

* Scrobbling
Expand All @@ -111,6 +112,8 @@ Before the release of a new version of SLS, it will be available here to test fo
* Caching scrobbles (while offline or through settings)
* Editing scrobble cache
* Auto-correct scrobbles
* Enable/Disable Music Apps
* Themes
* More

### Supported languages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ void readTrackFromBundleData(Track.Builder b, Bundle bundle) {
if (tmp instanceof Long) {
try {
long du = bundle.getLong("duration");
b.setDuration(new BigDecimal(bundle.getLong("duration")).intValueExact());
// TODO: fix google play music track duration by using Android Audio Focus as a Tracking tool for current listening music.
b.setDuration(new BigDecimal(bundle.getLong("duration") /1000).intValueExact());
Log.d(TAG, "Long Integer: " + Long.toString(du));
} catch (Exception e) {
Log.e(TAG, "duration: " + e);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/adam/aslfms/service/NPNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void notifyNowPlaying(Track track, HandshakeResult hInfo)
insecConn.setDoOutput(true);

DataOutputStream outStream = new DataOutputStream(insecConn.getOutputStream());
Log.e(TAG, baseObj.toString());
Log.d(TAG, baseObj.toString());
outStream.write(baseObj.toString().getBytes("UTF-8"));
outStream.flush();
outStream.close();
Expand Down Expand Up @@ -244,7 +244,7 @@ public void notifyNowPlaying(Track track, HandshakeResult hInfo)
conn.setDoOutput(true);

DataOutputStream outStream = new DataOutputStream(conn.getOutputStream());
Log.e(TAG, baseObj.toString());
Log.d(TAG, baseObj.toString());
outStream.write(baseObj.toString().getBytes("UTF-8"));
outStream.flush();
outStream.close();
Expand Down

0 comments on commit 112678d

Please sign in to comment.