|
|
@@ -654,7 +654,7 @@ export struct LocalMusic {
|
|
|
this.isShowTitleBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_TITLTBAR, true)
|
|
|
this.isShowAllBar = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_ALLBAR, true)
|
|
|
this.twoFingerType = PreferencesUtil.getNumberSync(SettingPage.TWO_FINGER_TYPE, 3)
|
|
|
- this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, false)
|
|
|
+ this.isCoverTop = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP, true)
|
|
|
this.isCircleBtn = PreferencesUtil.getBooleanSync(SettingPage.IS_CIRCLE_BTN, true)
|
|
|
this.isShowPlayPageBack = PreferencesUtil.getBooleanSync(SettingPage.IS_SHOW_PLAYPAGE_BACK, true)
|
|
|
this.isCoverTopBig = PreferencesUtil.getBooleanSync(SettingPage.IS_COVER_TOP_BIG, false)
|
|
|
@@ -667,8 +667,8 @@ export struct LocalMusic {
|
|
|
this.openSkipSongAnimate = PreferencesUtil.getBooleanSync(SettingPage.OPEN_SKIPSONG_ANIMATE, true)
|
|
|
this.volumeSmall = PreferencesUtil.getBooleanSync('volumeSmall', false)
|
|
|
this.autoParseMusicName = PreferencesUtil.getBooleanSync('autoParseMusicName', true)
|
|
|
-
|
|
|
-
|
|
|
+ this.isShowFileName = PreferencesUtil.getBooleanSync('isShowFileName', false)
|
|
|
+ this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
|
if(this.volumeSmall){
|
|
|
this.volume = 0.5
|
|
|
}else{
|
|
|
@@ -2604,10 +2604,10 @@ export struct LocalMusic {
|
|
|
|
|
|
Column() {
|
|
|
Column() {
|
|
|
- Text(item.name)
|
|
|
+ Text(this.isShowFileName?item.fileName :item.name)
|
|
|
.fontSize(this.twoFingerType == 1 ? 12 : this.twoFingerType == 2 ? 15 : 18)
|
|
|
.maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.animation({
|
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
|
@@ -2665,19 +2665,22 @@ export struct LocalMusic {
|
|
|
.backgroundColor('#FFC107')
|
|
|
}
|
|
|
.padding({ top: 8 })
|
|
|
- Text(StrUtil.isEmpty(item.artist) ? item.cTime : item.artist + ' ' + item?.album)
|
|
|
+ Text(StrUtil.isEmpty(item.artist) ? item.duration : item.artist + ' ' + item?.album)
|
|
|
.fontSize(this.twoFingerType == 1 ? 11 : this.twoFingerType == 2 ? 12 : 14)
|
|
|
.padding({ top: 8 ,right:25})
|
|
|
+ .visibility(this.isShowFileName?Visibility.None:Visibility.Visible)
|
|
|
.maxLines(1)
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
.margin({ left: this.twoFingerType == 3 ? 6 : 8 })
|
|
|
Blank()
|
|
|
- Text(item.size)
|
|
|
+ Text(this.isShowFileName?item.duration:item.size)
|
|
|
.fontSize(this.twoFingerType == 1 ? 11 : this.twoFingerType == 2 ? 12 : 14)
|
|
|
.padding({ top: 8 })
|
|
|
.maxLines(1)
|
|
|
- .visibility(StrUtil.isEmpty(item.artist) ? Visibility.Visible : Visibility.None)
|
|
|
+ .visibility(this.isShowFileName?Visibility.Visible:StrUtil.isEmpty(item.artist)
|
|
|
+ ? Visibility.Visible : Visibility.None)
|
|
|
.fontColor(this.currentSong?.filePath === item.filePath ? this.themeColor :
|
|
|
$r('app.color.text_color'))
|
|
|
.margin({ left: 10 })
|
|
|
@@ -3673,7 +3676,7 @@ export struct LocalMusic {
|
|
|
.fontSize(this.columns == 4 ||this.columns==3? 12 : this.columns == 2 ? 15 : 18)
|
|
|
.maxLines(1)
|
|
|
.fontWeight(FontWeight.Bold)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.animation({
|
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
|
@@ -3724,7 +3727,7 @@ export struct LocalMusic {
|
|
|
Text(StrUtil.isEmpty(item.artist) ? item.duration: item.artist)
|
|
|
.fontSize(this.columns == 4 ||this.columns==3? 10 : this.columns == 2 ? 12 : 13)
|
|
|
.maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.margin({ top: 2})
|
|
|
.visibility(item.type == CommonConstants.TYPE_IS_ARTIST
|
|
|
|| item.type == CommonConstants.TYPE_IS_ALBUM
|
|
|
@@ -4090,11 +4093,11 @@ export struct LocalMusic {
|
|
|
right: this.currentBreakpoint !== BreakpointTypeEnum.SM ? 40 : 20
|
|
|
})
|
|
|
Column() {
|
|
|
- Text(item.name.startsWith('.') ? item.name.replace(/\./g, '') : item.name)
|
|
|
+ Text(this.isShowFileName?item.fileName :item.name.startsWith('.') ? item.name.replace(/\./g, '') : item.name)
|
|
|
.fontSize(this.twoFingerType == 1 ? 12 : this.twoFingerType == 2 ? 15 : 18)
|
|
|
.maxLines(1)
|
|
|
.fontWeight(FontWeight.Bold)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.animation({
|
|
|
duration: 555,
|
|
|
curve: 'Linear',
|
|
|
@@ -4142,10 +4145,10 @@ export struct LocalMusic {
|
|
|
.margin({ top: 2 ,right:6})
|
|
|
.visibility((this.modeType == 3 && !this.isCanBack)||(this.modeType == 2 && !this.isCanBack)
|
|
|
||(this.modeType == 0&&item.type==CommonConstants.TYPE_IS_DIR)? Visibility.None : Visibility.Visible)
|
|
|
- Text(StrUtil.isEmpty(item.artist) ? item.duration: item.artist)
|
|
|
+ Text(this.isShowFileName?item.duration:StrUtil.isEmpty(item.artist) ? item.duration: item.artist)
|
|
|
.fontSize(this.twoFingerType == 1 ? 10 : this.twoFingerType == 2 ? 12 : 13)
|
|
|
.maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
+ .textOverflow({ overflow: this.isLongNameRoLL?TextOverflow.MARQUEE:TextOverflow.Ellipsis })//超长滚动
|
|
|
.margin({ top: 2})
|
|
|
.visibility(item.type == CommonConstants.TYPE_IS_ARTIST
|
|
|
|| item.type == CommonConstants.TYPE_IS_ALBUM
|
|
|
@@ -7334,9 +7337,9 @@ export struct LocalMusic {
|
|
|
.margin({ bottom: 8 })
|
|
|
|
|
|
}
|
|
|
- // .backgroundImage(this.imageLabelBg)
|
|
|
- .backgroundImage(this.isPuraWP() && this.currentSwiperIndex === 0 ?
|
|
|
- (StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover) : this.imageLabelBg)
|
|
|
+ .backgroundImage(StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover)
|
|
|
+ // .backgroundImage(this.isPuraWP() && this.currentSwiperIndex === 0 ?
|
|
|
+ // (StrUtil.isEmpty(this.cover) ? this.imageLabel : this.cover) : this.imageLabelBg)
|
|
|
.backgroundImageSize(this.isPuraWP() ? { width: '100%' } : { height: '150%', width: '100%' })
|
|
|
// .backgroundImagePosition(Alignment.Center)
|
|
|
.animation({
|
|
|
@@ -7405,6 +7408,8 @@ export struct LocalMusic {
|
|
|
@State volume: number = 0.5;
|
|
|
@State volumeSmall: boolean = false
|
|
|
@State autoParseMusicName: boolean = true
|
|
|
+ @State isShowFileName: boolean = false
|
|
|
+ @State isLongNameRoLL: boolean = true//长歌名滚动
|
|
|
|
|
|
@State volumeShow: boolean = PlayConstants.VOLUME_SHOW;
|
|
|
@State bright: number = PlayConstants.BRIGHT;
|
|
|
@@ -7864,7 +7869,6 @@ export struct LocalMusic {
|
|
|
let bg = Utility.getMusisBg()
|
|
|
this.imageLabel = bg
|
|
|
|
|
|
-
|
|
|
ColorConversion.setSysBarLightBackground(true);
|
|
|
this.context.resourceManager.getMediaContent(bg)
|
|
|
.then((value: Uint8Array) => {
|
|
|
@@ -10881,7 +10885,21 @@ export struct LocalMusic {
|
|
|
// 判断是否播放到结束时间
|
|
|
if (this.isOpenJump && duration > this.jumpEndTime * 1000) {
|
|
|
if (position >= duration - this.jumpEndTime * 1000) {
|
|
|
- this.playNext()
|
|
|
+ if(this.playType == 1){//跳过尾部如果是单曲循环就选择单曲循环
|
|
|
+ this.CONTROL_PlayStatus = PlayStatus.INIT
|
|
|
+ that.startPlayOrResumePlay();
|
|
|
+ }else if (this.playType == 2) { //2:正常播放,单曲播完
|
|
|
+
|
|
|
+ that.showRePlay();
|
|
|
+ that.currentTime = that.stringForTime(this.mIjkMediaPlayer.getDuration());
|
|
|
+ that.progressValue = this.PROGRESS_MAX_VALUE;
|
|
|
+ that.slideEnable = false;
|
|
|
+ that.stop();
|
|
|
+ // ToastUtil.showToast('开始重新播放')
|
|
|
+ }else{
|
|
|
+ this.playNext()
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|