Bläddra i källkod

1.5.3新版本发布调整一些界面

onecold 11 månader sedan
förälder
incheckning
d3378661ca
3 ändrade filer med 41 tillägg och 35 borttagningar
  1. 2 2
      AppScope/app.json5
  2. 38 32
      entry/src/main/ets/view/LocalMusic.ets
  3. 1 1
      lib/src/main/ets/parse/LyricParser.ts

+ 2 - 2
AppScope/app.json5

@@ -2,8 +2,8 @@
   "app": {
     "bundleName": "com.xgplayer.ttmusic.hm",
     "vendor": "example",
-    "versionCode": 20250819,
-    "versionName": "1.5.2",
+    "versionCode": 20250823,
+    "versionName": "1.5.3",
     "icon": "$media:app_icon",
     "label": "$string:app_name",
     "multiAppMode": {

+ 38 - 32
entry/src/main/ets/view/LocalMusic.ets

@@ -3448,18 +3448,18 @@ export struct LocalMusic {
             preview: MenuPreviewMode.IMAGE,
             previewAnimationOptions: { scale: [0.8, 1.0] },
           })
-        // .bindContextMenu(this.MenuBuilder(item, index, item.filePath), ResponseType.RightClick,
-        //   {
-        //     preview: MenuPreviewMode.IMAGE,
-        //     previewAnimationOptions: { scale: [0.8, 1.0] },
-        //   })
+        .bindContextMenu(this.MenuBuilder(item, index, item.filePath), ResponseType.RightClick,
+          {
+            preview: MenuPreviewMode.IMAGE,
+            previewAnimationOptions: { scale: [0.8, 1.0] },
+          })
         .transition(TransitionEffect.asymmetric(TransitionEffect.scale({ x: 0.8, y: 0.8 }).animation({ duration: 500 }),
           TransitionEffect.scale({ x: 0, y: 0 })))
         .clickEffect({ level: ClickEffectLevel.LIGHT })
         .scale({ x: this.scaleItem === index ? 1.02 : 1, y: this.scaleItem === index ? 1.02 : 1 })
         .zIndex(this.dragItem === index ? 1 : 0)
         .translate(this.dragItem === index ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 })
-        .hitTestBehavior(this.isDraggable(this.videoLocalList.indexOf(item)) ? HitTestMode.Default : HitTestMode.None)
+        // .hitTestBehavior(this.isDraggable(this.videoLocalList.indexOf(item)) ? HitTestMode.Default : HitTestMode.None)
 
 
       }, (item: VideoItem) => item.filePath)
@@ -3835,30 +3835,32 @@ export struct LocalMusic {
                 this.addToNextPlay(item);
                 this.longItemFilePath = ''
               })
-
-            MenuItem({
-              symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.square_and_pencil')),
-              content: '编辑标签'
-            })
-              .bindSheet($$this.isShowEdit, this.editSheet(item), {
-                height: '99%',
-                dragBar: true,
-                showClose: true,
-                preferType: SheetType.CENTER ,
-                title: { title: '编辑标签' }
+            if(Utility.isNoble()){
+              MenuItem({
+                symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.square_and_pencil')),
+                content: '编辑标签'
               })
-              .visibility(item.type === CommonConstants.TYPE_IS_DIR ? Visibility.None : Visibility.Visible)
-              .onClick(async() => {
-                this.setEditStrEmpty()
-                this.tempLyricContent = await this.getLyricContent(item);
-                // console.info('onecold 长按this.tempLyricContent' +this.tempLyricContent)
-                if(this.isGridMusic){
-                  this.longItemFilePath = item.filePath
-                }else{
-                  this.isShowEdit = !this.isShowEdit;
-                }
+                .bindSheet($$this.isShowEdit, this.editSheet(item), {
+                  height: '99%',
+                  dragBar: true,
+                  showClose: true,
+                  preferType: SheetType.CENTER ,
+                  title: { title: '编辑标签' }
+                })
+                .visibility(item.type === CommonConstants.TYPE_IS_DIR ? Visibility.None : Visibility.Visible)
+                .onClick(async() => {
+                  this.setEditStrEmpty()
+                  this.tempLyricContent = await this.getLyricContent(item);
+                  // console.info('onecold 长按this.tempLyricContent' +this.tempLyricContent)
+                  if(this.isGridMusic){
+                    this.longItemFilePath = item.filePath
+                  }else{
+                    this.isShowEdit = !this.isShowEdit;
+                  }
+
+                })
+            }
 
-              })
             MenuItem({
               symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.checkmark_square_on_square')),
               content: $r('app.string.select_all')
@@ -4915,6 +4917,7 @@ export struct LocalMusic {
                 if (imagePath) {
                   //用户更改过图片
                   this.imagePathStr = imagePath
+                  ToastUtil.showToast('获取封面成功')
                 }else{
                   ToastUtil.showToast('获取封面失败,请重试')
                 }
@@ -4948,6 +4951,7 @@ export struct LocalMusic {
                 let res: string | undefined = await getApiLyric(apiUrl,title, artist, false);
                 if (res && StrUtil.isNotEmpty(res) && res !== 'unknown' && res !== 'Timeout was reached') {
                   this.lyricConStr = res;
+                  ToastUtil.showToast('获取歌词成功')
                 }else{
                   ToastUtil.showToast('获取歌词失败,请重试')
                 }
@@ -7544,7 +7548,7 @@ export struct LocalMusic {
     .justifyContent(FlexAlign.SpaceEvenly)
   }
 
-  //播放进度条
+
   @Builder
   TopPlayProgressView(){
     Row() {
@@ -7557,6 +7561,7 @@ export struct LocalMusic {
             step: 1,
             style: SliderStyle.InSet
           })
+            .height(20)
             .blockColor('rgba(255,255,255,1)')
             .trackColor('rgba(255,255,255,0.3)')
             .selectedColor(Color.White)
@@ -7564,6 +7569,7 @@ export struct LocalMusic {
             .layoutWeight(1)
             .showSteps(false)
             .showTips(true)
+            .alignSelf(ItemAlign.Center)
             .enabled(this.slideEnable)
             .onChange((value: number, mode: SliderChangeMode) => {
               // if (mode == 2) {
@@ -7580,7 +7586,7 @@ export struct LocalMusic {
             })
 
         }
-        .padding({ right: 7,left:14 })
+        .padding({ right: 7,left:20 })
         Row(){
           Text(this.currentTime)
             .fontSize(10)
@@ -7600,7 +7606,7 @@ export struct LocalMusic {
     //x5的竖屏模式需要99%
     .width(this.isLandscape?'80%':'93%')
     .justifyContent(FlexAlign.Center)
-    .margin({bottom:5})
+    .margin({bottom:6})
     .animation({
       duration: 666,
       curve: 'ease-in-out' // 可选动画曲线
@@ -9432,7 +9438,7 @@ export struct LocalMusic {
 
     { id: 14, image: $r('app.media.cover_online'), title: '获取封面' },
 
-    { id: 15, image: $r('app.media.rename2'), title: '编辑标签' },
+    // { id: 15, image: $r('app.media.rename2'), title: '编辑标签' },
 
     { id: 5, image: $r('app.media.time_close'), title: '定时关闭' },
 

+ 1 - 1
lib/src/main/ets/parse/LyricParser.ts

@@ -29,7 +29,7 @@ export class LyricParser implements IParser {
         let album = ""
         let by = ""
         let offset = 0
-        const ignoredTags = [ 'id', 'hash', 'sign', 'qq', 'total','Outro']; // 定义需要忽略的标签
+        const ignoredTags = [ 'id', 'hash', 'sign', 'qq', 'total','Outro','Intro']; // 定义需要忽略的标签
         for (let i = 0; i < src.length; i++) {
             let line = src[i]
             console.info(`content The line of file:line ${line}`);