#### 2022-12-15 V7.0.6

- *.[新增]新增支持歌手头像从歌曲文件中获取。
This commit is contained in:
紫林软件 2022-12-15 22:28:53 +08:00
parent 3d55b0914c
commit 230bcba860
7 changed files with 37 additions and 16 deletions

View File

@ -5,15 +5,15 @@
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="JDK" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>

View File

@ -46,5 +46,10 @@
<option name="name" value="maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/jcenter" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:/$USER_HOME$/.m2/repository/" />
</remote-repository>
</component>
</project>

View File

@ -4,6 +4,9 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" filepath="$PROJECT_DIR$/HappyPlayer5-happy_player6.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.androidTest.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.main.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/HappyPlayer5-happy_player6.app.unitTest.iml" />
</modules>
</component>
</project>

View File

@ -1,3 +1,7 @@
#### 2022-12-15 V7.0.6
- *.[新增]新增支持歌手头像从歌曲文件中获取。
#### 2022-02-13 V7.0.5
- *.[改进]启动软件时自动播放歌曲。

View File

@ -8,8 +8,8 @@ android {
applicationId "com.zlm.hp"
minSdkVersion 21
targetSdkVersion 29
versionCode 11
versionName "V7.0.5"
versionCode 12
versionName "V7.0.6"
/**添加多 dex分包支持*/
multiDexEnabled true
useLibrary 'org.apache.http.legacy'

View File

@ -6,6 +6,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable;
import android.media.MediaMetadataRetriever;
import android.os.Build;
import android.os.Bundle;
import android.os.Message;
@ -439,7 +440,15 @@ public class MainActivity extends BaseActivity {
mMusicSeekBar.setMax((int) initAudioInfo.getDuration());
mMusicSeekBar.setProgress((int) initAudioInfo.getPlayProgress());
mMusicSeekBar.setSecondaryProgress(0);
MediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();
mediaMetadataRetriever.setDataSource(initAudioInfo.getFilePath());
byte[] cover = mediaMetadataRetriever.getEmbeddedPicture();
if(cover!=null) {
Bitmap singer_bitmap = BitmapFactory.decodeByteArray(cover, 0, cover.length);
mArtistImageView.setImageDrawable(new BitmapDrawable(singer_bitmap));
mArtistImageView.setTag(initAudioInfo.getFilePath().hashCode()+"");
}
else {
//加载歌手头像
ImageUtil.loadSingerImage(mContext, mArtistImageView, initAudioInfo.getSingerName(), mConfigInfo.isWifi(), 400, 400, new AsyncHandlerTask(mUIHandler, mWorkerHandler), new ImageUtil.ImageLoadCallBack() {
@Override
@ -449,7 +458,7 @@ public class MainActivity extends BaseActivity {
// }
}
});
}
//加载歌词
String keyWords = initAudioInfo.getTitle();
LyricsManager.newInstance(mContext).loadLyrics(initAudioInfo.getFilePath(),keyWords, keyWords, initAudioInfo.getDuration() + "", initAudioInfo.getHash(), mConfigInfo.isWifi(), new AsyncHandlerTask(mUIHandler, mWorkerHandler), null);

View File

@ -1,6 +1,6 @@
#Sat Sep 26 12:04:29 CST 2020
distributionBase=GRADLE_USER_HOME
distributionUrl=file:///E:/\u6211\u7684\u4EE3\u7801/android/gradle\u5305/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME