소스 검색

Merge remote-tracking branch 'refs/remotes/origin/master' into feature/smb

chendeben 9 달 전
부모
커밋
f51dfde329

+ 8 - 7
entry/src/main/ets/common/util/MediaTable.ets

@@ -230,18 +230,18 @@ export default  class MediaTable {
   public updateMediaInfo(filePath: string, title: string, artist: string, album: string,
     lyricContent:string,year:string,genre:string,track:string,
     ALBUMARTIST:string,COMPOSER:string,LYRICIST:string,COMMENT:string,disc:string,
-    callback: Function) {
+    callback: Function): boolean {
     if (!callback || typeof callback !== 'function') {
       Logger.info(RdbUtils.RDB_TAG, 'updateMediaInfo() has no valid callback!');
-      return;
+      return false;
     }
 
     if (!this.accountTable) {
       Logger.error(RdbUtils.RDB_TAG, 'RdbStore is not initialized.');
       callback(false);
-      return;
+      return false;
     }
-
+    console.info('onecold filePath updateMediaInfo= '+filePath)
     // Step 1: Create a predicate to find the record by filePath
     const predicates = new relationalStore.RdbPredicates(RdbUtils.MEDIA_TABLE.tableName);
     predicates.equalTo('filePath', filePath);
@@ -250,11 +250,12 @@ export default  class MediaTable {
     this.accountTable.query(predicates, (resultSet: relationalStore.ResultSet) => {
       if (resultSet.rowCount === 0) {
         Logger.info(RdbUtils.RDB_TAG, `No record found with filePath ${filePath}.`);
+        console.info('onecold No record found with filePath '+filePath)
         callback(false);
         resultSet.close();
         return;
       }
-
+      console.info('onecold filePath updateMediaInfo1= '+filePath)
       // Step 3: Prepare the values to update
       const valuesToUpdate: relationalStore.ValuesBucket = {};
       if (title !== '') {
@@ -307,10 +308,10 @@ export default  class MediaTable {
         callback(false);
       }
     });
+    
+    return true; // 表示方法已成功启动
   }
 
-
-
   //更新重命名数据操作
   public updateRename(newName: string, oldPath: string, newPath: string, callback: Function) {
     // Step 1: 查询原始记录

+ 1 - 1
entry/src/main/ets/common/util/RdbUtils.ets

@@ -394,7 +394,7 @@ export default class RdbUtils {
           callback(resFlag);
           return;
         }
-        Logger.info(RdbUtils.RDB_TAG, `updateData() finished: ${ret}`);
+        console.info( `onecold updateData() finished: ${ret}`);
         callback(!resFlag);
       });
     }

+ 33 - 0
entry/src/main/ets/pages/SettingPage.ets

@@ -119,6 +119,7 @@ export struct SettingPage {
   @State isShowFAV: boolean = true //是否显示我的收藏
   @State isShowHistory: boolean = true //是否显示最近播放
   @State isShowPlayPageBack: boolean = false //是否显示播放页返回键
+  @State isShowPrecious: boolean = false //播控条显示上一首按钮
   @State isShowSingleLineLyric: boolean = false //是否显示单行歌词
   @State isShowHeader: boolean = true
   @State isCustomizeBg: boolean = false //自定义背景界面
@@ -229,6 +230,7 @@ export struct SettingPage {
   // 组件生命周期
   aboutToAppear() {
     // this.geIDD()
+    this.isShowPrecious = PreferencesUtil.getBooleanSync('isShowPrecious', false)
     this.isBgPlayOpen = PreferencesUtil.getBooleanSync(SettingPage.IS_BGPLAY_OPEN, true)
     this.isAutoRatate = PreferencesUtil.getBooleanSync(SettingPage.IS_AUTO_RATATE, true)
     this.isMemoryPlay = PreferencesUtil.getBooleanSync(SettingPage.iS_MEMORY_PLAY, true)
@@ -1951,6 +1953,37 @@ export struct SettingPage {
       // .clickEffect({ level: ClickEffectLevel.HEAVY })
       //
       // Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
+      //播控条显示上一首按钮
+      Row() {
+        SymbolGlyph($r('sys.symbol.arrow_left'))
+          .fontSize(20)
+          .fontColor([this.themeColor])
+          .alignSelf(ItemAlign.Center)
+          .margin({ left: 15 })
+        Text('播控条上一首按钮')
+          .margin({ left: 8 })
+          .fontSize(15)
+          .fontColor(Color.Gray)
+          .fontWeight(480)
+          .layoutWeight(1)
+        Toggle({ type: ToggleType.Switch, isOn: this.isShowPrecious })
+          .selectedColor(this.themeColor)
+          .switchPointColor(Color.White)
+          .margin({ right: 18 })
+          .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
+          .onChange((checked: boolean) => {
+            this.isShowPrecious = checked;
+            PreferencesUtil.put('isShowPrecious', this.isShowPrecious)
+            this.sendChangeEvent()
+          })
+          .width(50)
+          .height(30);
+      }
+      .height(55)
+      .clickEffect({ level: ClickEffectLevel.HEAVY })
+
+      Line().width('100%').height(0.3).backgroundColor($r('app.color.index_tab_unselected_font_color'))
+
       // 播放页返回键
       Row() {
         SymbolGlyph($r('sys.symbol.arrow_left'))

+ 11 - 1
entry/src/main/ets/pages/SplashIndex.ets

@@ -121,9 +121,19 @@ struct  SplashIndex{
       cancel:()=>{this.exitApp()},
       confirm:()=>{this.onConfirm()}
 
+    }),
+    onWillDismiss:(dismissDialogAction: DismissDialogAction)=> {
+      console.info(`reason= ${dismissDialogAction.reason}`);
+      console.info('dialog onWillDismiss');
+      if (dismissDialogAction.reason == DismissReason.PRESS_BACK) {
+        // dismissDialogAction.dismiss();
+      }
+      if (dismissDialogAction.reason == DismissReason.TOUCH_OUTSIDE) {
+        // dismissDialogAction.dismiss();
+      }
     }
 
-    )})
+  })
 
 
   @State rootPath:string = ''

+ 336 - 111
entry/src/main/ets/view/LocalMusic.ets

@@ -512,9 +512,7 @@ const ITEM_HEIGHT_BIG: number = 78; // 列表项大高度
 @Preview
 @Component
 export struct LocalMusic {
-  // @State button_gradient_state: hdsEffect.PressShadowType = hdsEffect.PressShadowType.NONE;
-  // @State lightIntensity: number = 10;
-  // @State illuminatedType: hdsEffect.PointLightIlluminatedType = hdsEffect.PointLightIlluminatedType.NONE
+  @State isShowPrecious: boolean = false //播控条显示上一首按钮
   //背景两侧流光控制器
   @State sceneBgController: HdsSceneController|undefined = deviceInfo.sdkApiVersion>=20
     &&canIUse("SystemCapability.UIDesign.HDSComponent.Core")?
@@ -592,6 +590,7 @@ export struct LocalMusic {
   @State dirList: Array<VideoItem> = []
   @Consume videoLocalList:VideoItem[]
   @State dataSource: LazyDataSource<VideoItem> = new LazyDataSource(this.videoLocalList)
+  @State listRefreshKey: number = 0
   // @State mediaKuList: Array<VideoItem> = []; //媒体库文件
   @StorageProp('mediaKuList')  mediaKuList: Array<VideoItem> = []; //媒体库文件
   @State artistList: Array<VideoItem> = []; //艺术家文件
@@ -1186,6 +1185,7 @@ export struct LocalMusic {
     context.getApplicationContext().setColorMode(colorMode)
   }
   initSetting() {
+    this.isShowPrecious = PreferencesUtil.getBooleanSync('isShowPrecious', false)
     this.sortType = PreferencesUtil.getNumberSync(SettingPage.SORT_TYPE, 4)
     this.isCustomizeBg = PreferencesUtil.getBooleanSync(SettingPage.IS_CUSTOMIZE_BG, false)
     this.customizeBgPath = PreferencesUtil.getStringSync(SettingPage.IS_CUSTOMIZE_BG_PATH, '')
@@ -1295,7 +1295,7 @@ export struct LocalMusic {
         case 101: //第一次扫描文件夹入库
           ToastUtil.showToast('刷新同步数据库成功!')
           Logger.info('onecold 扫描数据库结束 this.mediaKuList length= ' + this.mediaKuList.length)
-          this.doUpdateData()
+          this.doAllUpdateData()
           break;
         case 102: //查询媒体库列表
           this.isRefreshing = false
@@ -1711,11 +1711,9 @@ export struct LocalMusic {
       }
 
       console.info(`onecold gengxin 1: ${this.videoLocalList.length}`);
-      // for (let i = 0; i < this.videoLocalList.length; i++) {
-      //
-      //   console.info(`onecold gengxin 1: ${this.videoLocalList[i].pixelMapPath}`);
-      //
-      // }
+      for (let i = 0; i < this.videoLocalList.length; i++) {
+        console.info(`onecold gengxin 1: ${this.videoLocalList[i].name}`);
+      }
 
       // this.setButtonStatus()
       this.openMusic(isOpen, destPath,openItem)
@@ -1746,7 +1744,8 @@ export struct LocalMusic {
       }
       if(openItem){
         this.doPlay(openItem,0,false,true)
-        this.isShowPlay = true
+        // this.isShowPlay = true
+        this.setShowPlayTrue()
       }
 
     }
@@ -2978,10 +2977,10 @@ export struct LocalMusic {
               })
 
 
-            // Button('乱码修复', { type: ButtonType.Capsule, stateEffect: true })
-            //   .width(90)
-            //   .height(50)
-            //   .fontSize(13)
+            // Button('乱码', { type: ButtonType.Circle, stateEffect: true })
+            //   .width(45)
+            //   .height(45)
+            //   .fontSize(10)
             //   .margin({ top: 10, bottom: 10, right: 6 })
             //   .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
             //   .backgroundColor(this.themeColor)
@@ -4216,7 +4215,8 @@ export struct LocalMusic {
                 this.handleFileSelection(item, !isChecked);
               } else {
                 this.doPlay(item,index)
-                this.isShowPlay = true
+                this.setShowPlayTrue()
+
               }
             })
         }
@@ -4673,7 +4673,7 @@ export struct LocalMusic {
                   })
               )
             )
-          }, (item: VideoItem) =>  item.filePath)
+          }, (item: VideoItem) =>  item.filePath + '_' + this.listRefreshKey)
         }
         // .columnsTemplate('repeat(auto-fit, 160)')
         .id('waterflow') // 设置id用于截图
@@ -5111,7 +5111,7 @@ export struct LocalMusic {
         .translate(this.dragItem === index ? { x: this.offsetX, y: this.offsetY } : { x: 0, y: 0 })
 
 
-      }, (item: VideoItem) => item.filePath)
+      }, (item: VideoItem) => item.filePath + '_' + this.listRefreshKey)
     }
     .width('94%')
     .height('100%')
@@ -5482,7 +5482,7 @@ export struct LocalMusic {
               .onClick(async () => {
                 this.longItemFilePath = ''
                 await this.openAddToPlaylistDialog(item)
-              })
+            })
 
             MenuItem({
               symbolStartIcon: new SymbolGlyphModifier($r('sys.symbol.square_and_pencil')),
@@ -5497,8 +5497,11 @@ export struct LocalMusic {
               })
               .visibility(item.type === CommonConstants.TYPE_IS_DIR ? Visibility.None : Visibility.Visible)
               .onClick(async() => {
-                this.setEditStrEmpty()
+                this.initEditFields(item)
                 this.tempLyricContent = await this.getLyricContent(item);
+                if (StrUtil.isNotEmpty(this.tempLyricContent)) {
+                  this.lyricConStr = this.tempLyricContent
+                }
                 if(this.isGridMusic||this.twoFingerType==4){
                   this.longItemFilePath = item.filePath
                 }else{
@@ -5904,7 +5907,7 @@ export struct LocalMusic {
               })
           ) //拖动List关键代码结束
 
-        }, (item: VideoItem) => item.filePath)
+        }, (item: VideoItem) => item.filePath + '_' + this.listRefreshKey)
       // }
     }
     .scrollBar(BarState.Off)
@@ -6502,9 +6505,11 @@ export struct LocalMusic {
     .height(this.bottomBarHeight)
     .hitTestBehavior(HitTestMode.Transparent)
     .bindContentCover($$this.isShowPlay, this.MusicPlayBuilder(), {
-      // modalTransition: ModalTransition.DEFAULT,
-      transition: AnimationHelper.transitionInDown(666),
-      backgroundColor: 'rgba(0, 0, 0, 0.9)',
+      modalTransition: ModalTransition.NONE,
+      onWillDisappear: () => {
+        this.setShowPlayFalse()
+      },
+      // backgroundColor: 'rgba(0, 0, 0, 0.9)',
     })
     .padding({
       left: 16,
@@ -6523,7 +6528,7 @@ export struct LocalMusic {
         .fontSize(16)
         .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
         .maxLines(1)
-        .fontColor($r('app.color.text_color'))
+        .fontColor(Color.White)
         .fontWeight(500);
       Row() {
         Text(this.currentSong?.artist)
@@ -6532,23 +6537,35 @@ export struct LocalMusic {
           .textAlign(TextAlign.Start)
           .maxLines(1)
           .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
-          .fontColor($r('app.color.text_color'));
+          .fontColor(Color.White)
       }
       .visibility(this.currentSong?.artist? Visibility.Visible:Visibility.None)
     }
+    .geometryTransition('name', { follow: true }) // 绑定标识符
     .alignItems(HorizontalAlign.Center)
   }
   @Builder
   playConLeft(isLeft: boolean = true) {
     Row() {
-      RotatingCover({ songLabel: this.currentSong?.pixelMapPath });
-
+      // RotatingCover({ songLabel: this.currentSong?.pixelMapPath })
+      Image( this.currentSong?.pixelMapPath)
+        .height(45)
+        .objectFit(ImageFit.Contain)
+        .alt( $r('app.media.music_red'))
+        .fillColor(this.themeColor)
+        .borderRadius(8)
+        .shadow({
+          radius: 10,
+          type: ShadowType.BLUR,
+          color: 'on_primary'
+        })
+        .geometryTransition('cover', { follow: true }) // 绑定标识符
       Column() {
         Text(this.currentSong?.name)
           .fontSize(16)
           .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
           .maxLines(1)
-          .fontColor($r('app.color.text_color'))
+          .fontColor(Color.White)
           .fontWeight(500);
         Row() {
           Text(this.currentSong?.artist)
@@ -6557,10 +6574,12 @@ export struct LocalMusic {
             .textAlign(TextAlign.Start)
             .maxLines(1)
             .textOverflow({ overflow: TextOverflow.MARQUEE }) //超长滚动
-            .fontColor($r('app.color.text_color'));
+            .fontColor(Color.White)
         }
         .visibility(this.currentSong?.artist? Visibility.Visible:Visibility.None)
       }
+      .padding({left:8})
+      .geometryTransition('name', { follow: true }) // 绑定标识符
       .alignItems(isLeft?HorizontalAlign.Start:HorizontalAlign.End)
       .margin({ right: isLeft?22:10 })
       .visibility(isLeft? Visibility.Visible:Visibility.None)
@@ -6572,16 +6591,32 @@ export struct LocalMusic {
       this.showPlayerView()
     })
   }
+
+  setShowPlayTrue(){
+    this.getUIContext()?.animateTo({
+      duration: 500,
+      curve: Curve.Friction
+    }, () => {
+      this.isShowPlay = true;
+    });
+  }
+
+  setShowPlayFalse(){
+    this.getUIContext()?.animateTo({
+      duration: 500,
+      curve: Curve.Friction
+    }, () => {
+      this.isShowPlay = false;
+    });
+  }
   //打开播放页
   showPlayerView() {
 
     if (ArrayUtil.isNotEmpty(this.songList)) {
-      this.isShowPlay = true;
+      this.setShowPlayTrue()
       let lyricPath = this.videoUrl.substring(0, this.videoUrl.lastIndexOf('.')) + '.lrc';
       this.initLyric(lyricPath);
       this.startAutoHide();
-
-
     } else {
       ToastUtil.showToast('当前播放列表为空,请先导入音乐。');
     }
@@ -6589,12 +6624,14 @@ export struct LocalMusic {
   @Builder
   playConRigth() {
     Row() {
-      Image($r('app.media.hm_previous'))
-        .height(28)
-        .width(28)
+
+      SymbolGlyph($r('sys.symbol.backward_end_fill'))
+        .fontSize(28)
+        .fontColor([this.themeColor])
+        .alignSelf(ItemAlign.Center)
+        .visibility(this.isShowPrecious? Visibility.Visible:Visibility.None)
         .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
-        .margin({ left: 8, right: 16 })
-        .fillColor(this.themeColor)
+        .margin({ left: 8, right: 14 })
         .displayPriority(2)
         .onClick(() => {
           if (ArrayUtil.isNotEmpty(this.songList)) {
@@ -6613,12 +6650,11 @@ export struct LocalMusic {
 
         })
           .color(this.themeColor)// 进度条前景色为灰色
-          .backgroundColor($r('app.color.index_background'))
-          .height(40)
+          .height(38)
           .aspectRatio(CommonConstants.ASPECT_RATIO)
         Image(this.CONTROL_PlayStatus === PlayStatus.PLAY ? $r('app.media.hm_pause') : $r('app.media.hm_play2'))
-          .height(38)
-          .width(38)
+          .height(36)
+          .width(36)
           .displayPriority(3)
           .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
           .fillColor(this.themeColor)
@@ -6633,14 +6669,14 @@ export struct LocalMusic {
       }
 
 
-      Image($r('app.media.hm_next'))
-        .height(28)
-        .width(28)
+      SymbolGlyph($r('sys.symbol.forward_end_fill'))
+        .fontSize(28)
+        .fontColor([this.themeColor])
+        .alignSelf(ItemAlign.Center)
         .margin({
-          right: 16,
-          left: 16
+          right: 14,
+          left: 14
         })
-        .fillColor(this.themeColor)
         .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
         .displayPriority(2)
         .onClick(() => {
@@ -6653,8 +6689,8 @@ export struct LocalMusic {
         })
 
       Image($r('app.media.hm_playlist'))
-        .height(28)
-        .width(28)
+        .height(26)
+        .width(26)
         .displayPriority(1)
         .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.5 })
         .fillColor(this.themeColor)
@@ -6732,6 +6768,19 @@ export struct LocalMusic {
   @State discStr: string  = ''
 
   doUpdateData() {
+    setTimeout(() => {
+
+      if (this.modeType === 0) {
+        this.deleteCache(this.currentPath)
+        this.getSortedFiles(this.currentPath)
+      }else if (this.modeType === 1){
+        workerInstance.postMessage({ code: 2, data: this.context,data2:this.packName });
+      }
+
+    }, 999)
+  }
+
+  doAllUpdateData() {
     setTimeout(() => {
 
       if (this.modeType === 0) {
@@ -6741,6 +6790,7 @@ export struct LocalMusic {
       workerInstance.postMessage({ code: 2, data: this.context,data2:this.packName });
       workerInstance.postMessage({ code: 3, data: this.context });
       workerInstance.postMessage({ code: 4, data: this.context });
+
     }, 999)
   }
 
@@ -6815,45 +6865,60 @@ export struct LocalMusic {
           }
         });
       }
-      this.table.updateMediaInfo(item.filePath, this.titleStr, this.artistStr, this.ablumStr,this.lyricConStr,
-        this.yearStr,this.genreStr,this.trackStr,this.albumArtistStr,this.composerStr, this.lyricistStr,this.commentStr,this.discStr,
-        (success: boolean, error?: string) => {
-          // this.isShowEdit = false
 
-          if (success) {
-            console.log(" onecold 编辑信息成功,数据库已同步");
-            ToastUtil.showToast('内嵌音乐标签成功')
-            this.isShowMoreView = false
-            this.name = this.titleStr
-            if (item.filePath == this.currentSong?.filePath) {
-              this.currentSong.name = this.titleStr
-              this.artist = this.artistStr
-              this.currentSong.artist = this.artistStr
-              this.currentSong.album = this.ablumStr
-              this.currentSong.year = this.yearStr
-              this.currentSong.genre = this.genreStr
-              this.currentSong.track = this.trackStr
-              this.currentSong.lyricContent = this.lyricConStr
-              this.initLyric(item.filePath)
-
-              this.currentSong.ALBUMARTIST = this.albumArtistStr
-              this.currentSong.COMPOSER = this.composerStr
-              this.currentSong.LYRICIST = this.lyricistStr
-              this.currentSong.COMMENT = this.commentStr
-            }
+      const task = new taskpool.Task(
+        updateInfoDb,
+        this.context,
+        item.filePath,
+        this.titleStr,
+        this.artistStr,
+        this.ablumStr,
+        this.lyricConStr,
+        this.yearStr,this.genreStr,
+        this.trackStr,this.albumArtistStr,
+        this.composerStr, this.lyricistStr,
+        this.commentStr,this.discStr
+      );
+      taskpool.execute(task, taskpool.Priority.HIGH).then((result) => {
+        if (result) {
+          console.log(" onecold 编辑信息成功,数据库已同步");
+          ToastUtil.showToast('内嵌音乐标签成功')
+          this.isShowMoreView = false
+          this.name = this.titleStr
+          this.syncEditedFields(item)
+          if (item.filePath == this.currentSong?.filePath) {
+            this.currentSong.name = this.titleStr
+            this.artist = this.artistStr
+            this.currentSong.artist = this.artistStr
+            this.currentSong.album = this.ablumStr
+            this.currentSong.year = this.yearStr
+            this.currentSong.genre = this.genreStr
+            this.currentSong.track = this.trackStr
+            this.currentSong.lyricContent = this.lyricConStr
+            this.initLyric(item.filePath)
+
+            this.currentSong.ALBUMARTIST = this.albumArtistStr
+            this.currentSong.COMPOSER = this.composerStr
+            this.currentSong.LYRICIST = this.lyricistStr
+            this.currentSong.COMMENT = this.commentStr
+          }
+
+          this.syncListsAfterEdit(item.filePath)
+          this.doUpdateData()
+        } else {
+          // ToastUtil.showToast('保存失败' + error?.toString())
+          console.error(" onecold  编辑信息数据库失败 ");
+        }
 
-            this.doUpdateData()
-          } else {
-            // ToastUtil.showToast('保存失败' + error?.toString())
-            console.error(" onecold  编辑信息数据库失败原因: " + error);
-          }
+      }).catch((error: Error) => {
+        console.error('onecold Subtitle sync failed:', error);
+      });
 
-          // 关闭进度条
-          DialogHelper.closeLoading();
-        });
-      console.log(' onecold 元数据标签更新成功,');
 
+      console.log(' onecold 元数据标签更新成功,');
 
+      // 关闭进度条
+      DialogHelper.closeLoading();
     } else {
       // 关闭进度条
       DialogHelper.closeLoading();
@@ -7431,6 +7496,91 @@ export struct LocalMusic {
     this.discStr = ''
   }
 
+  initEditFields(item?: VideoItem) {
+    if (!item) {
+      this.setEditStrEmpty()
+      return
+    }
+    this.imagePathStr = ''
+    this.titleStr = item.name ?? ''
+    this.artistStr = item.artist ?? ''
+    this.ablumStr = item.album ?? ''
+    this.genreStr = item.genre ?? ''
+    this.yearStr = item.year ?? ''
+    this.trackStr = item.track ?? ''
+    this.albumArtistStr = item.ALBUMARTIST ?? ''
+    this.composerStr = item.COMPOSER ?? ''
+    this.lyricistStr = item.LYRICIST ?? ''
+    this.commentStr = item.COMMENT ?? ''
+    this.discStr = item.disc ?? ''
+    this.lyricConStr = item.lyricContent ?? ''
+  }
+
+  private syncEditedFields(target?: VideoItem) {
+    if (!target) {
+      return
+    }
+    target.name = this.titleStr
+    target.artist = this.artistStr
+    target.album = this.ablumStr
+    target.lyricContent = this.lyricConStr
+    target.year = this.yearStr
+    target.genre = this.genreStr
+    target.track = this.trackStr
+    target.ALBUMARTIST = this.albumArtistStr
+    target.COMPOSER = this.composerStr
+    target.LYRICIST = this.lyricistStr
+    target.COMMENT = this.commentStr
+    target.disc = this.discStr
+  }
+
+  private replaceItemInList(list: Array<VideoItem> | undefined, filePath: string,
+    apply?: (next: Array<VideoItem>) => void) {
+    if (!list || ArrayUtil.isEmpty(list)) {
+      return
+    }
+    const index = list.findIndex((video: VideoItem) => video.filePath === filePath)
+    if (index < 0) {
+      return
+    }
+    const nextList = [...list]
+    this.syncEditedFields(nextList[index])
+    apply?.(nextList)
+  }
+
+  private syncListsAfterEdit(filePath: string) {
+    this.replaceItemInList(this.videoLocalList, filePath, (next: Array<VideoItem>) => {
+      this.videoLocalList = next
+      this.dataSource.pushArrayData(next)
+    })
+    this.replaceItemInList(this.songList, filePath, (next: Array<VideoItem>) => {
+      this.songList = next
+      this.sonDataSource.pushArrayData(next)
+    })
+    this.replaceItemInList(this.favList, filePath, (next: Array<VideoItem>) => {
+      this.favList = next
+    })
+    this.replaceItemInList(this.historyList, filePath, (next: Array<VideoItem>) => {
+      this.historyList = next
+    })
+    this.replaceItemInList(this.currentSongList, filePath, (next: Array<VideoItem>) => {
+      this.currentSongList = next
+    })
+    this.replaceItemInList(this.mediaKuList, filePath, (next: Array<VideoItem>) => {
+      this.mediaKuList = next
+    })
+    this.replaceItemInList(this.filteredList, filePath, (next: Array<VideoItem>) => {
+      this.filteredList = next
+    })
+    this.replaceItemInList(this.artistList, filePath, (next: Array<VideoItem>) => {
+      this.artistList = next
+    })
+    this.replaceItemInList(this.albumList, filePath, (next: Array<VideoItem>) => {
+      this.albumList = next
+    })
+    this.listRefreshKey++
+  }
+
   @Builder
   detailSheet(item:VideoItem) {
     Scroll() {
@@ -8292,7 +8442,7 @@ export struct LocalMusic {
         .onClick(() => {
           this.doPlay(item, index, true)
         })
-      }, (item: VideoItem) => item.filePath)
+      }, (item: VideoItem) => item.filePath + '_' + this.listRefreshKey)
     }
     .width('100%')
     .height('100%')
@@ -8451,6 +8601,10 @@ export struct LocalMusic {
     Column() {
       this.IjkMusicPlayerView()
     }
+    .transition(TransitionEffect.asymmetric(
+      TransitionEffect.opacity(1),
+      TransitionEffect.OPACITY
+    ))
     .visualEffect(deviceInfo.sdkApiVersion>=20&&this.bgController?
       new hdsEffect.HdsEffectBuilder()
       .shaderEffect({
@@ -8479,11 +8633,21 @@ export struct LocalMusic {
           if (event) {
             // 只允许向下滑动,向上滑动时限制为0
             this.translateY = Math.max(0, event.offsetY);
+
+            this.getUIContext().animateTo({
+              duration: 500,
+              curve: Curve.Sharp
+            }, () => {
+              this.scaleValueImage = Math.min(1, Math.max(0.3, 1 - event.offsetY / 260));
+              console.info('onecold scaleValueImage:', this.scaleValueImage)
+
+              this.scaleValueText =Math.min(1, Math.max(0.6, 1 - event.offsetY / 300));
+            })
           }
         })
         .onActionEnd((event?: GestureEvent) => {
           // 使用更低的阈值和滑动速度判断
-          const minDistance = 100; // 最小滑动距离 100vp
+          const minDistance = 300; // 最小滑动距离 100vp
           const minVelocity = 500; // 最小滑动速度
 
           // 获取滑动速度(如果可用)
@@ -8495,18 +8659,22 @@ export struct LocalMusic {
           if (shouldClose) {
             // 添加关闭动画
             this.getUIContext().animateTo({
-              duration: 300,
-              curve: Curve.Smooth
+              duration: 600,
+              curve: Curve.Friction
             }, () => {
               this.isShowPlay = false;
+              this.scaleValueImage = 1
+              this.scaleValueText = 1
               this.translateY = 0;
             })
           } else {
             // 回弹动画
             this.getUIContext().animateTo({
-              duration: 300,
-              curve: Curve.Smooth
+              duration: 600,
+              curve: Curve.Friction
             }, () => {
+              this.scaleValueImage = 1
+              this.scaleValueText = 1
               this.translateY = 0;
             })
           }
@@ -9815,8 +9983,11 @@ export struct LocalMusic {
         .layoutWeight(1)
         .backgroundColor(Color.Transparent)
         .onClick(async () => {
-          this.setEditStrEmpty()
+          this.initEditFields(this.currentSong)
           this.tempLyricContent = this.lyricContent
+          if (StrUtil.isNotEmpty(this.tempLyricContent)) {
+            this.lyricConStr = this.tempLyricContent
+          }
           this.isShowEdit = !this.isShowEdit;
         })
       }
@@ -10058,6 +10229,7 @@ export struct LocalMusic {
   @State isCoverTop: boolean = true
   // 添加控制缩放的状态变量
   @State scaleValueImage: number = 1
+  @State scaleValueText: number = 1
   @Builder
   CoverInfo() {
     Column() {
@@ -10100,20 +10272,24 @@ export struct LocalMusic {
           })
 
         Column() {
-          if (this.isCoverTop && !this.isCoverOpacity() && this.isCoverRectangle) {
+          if (this.isCoverTop  && this.isCoverRectangle) {
             Image(this.cover)
-              .height(this.isHiCar()?(px2vp(this.windowHeight)*0.46):'auto')
-              .width(this.isHiCar()?'auto':this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '88%')
+              .height(this.isHiCar()?(px2vp(this.windowHeight)*0.46):
+                this.isCoverOpacity()?(px2vp(this.windowHeight)*0.6):'auto')
+              .width(this.isHiCar()||this.isCoverOpacity()?'auto':this.isBigScreen() ? '72%' : this.isCoverTopBig ? '100%' : '88%')
               .objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
               .alt($r('app.media.alt'))
               .margin({ right: 8, left: 8, top: 8 })
               .aspectRatio(1)
+              .geometryTransition('cover') // 绑定标识符
               .opacity(this.opacityValueImage)
-              .scale({ x: this.scaleValueImage, y: this.scaleValueImage }) // 添加缩放效果
+              .scale({ x: this.scaleValueImage, y: this.scaleValueImage,
+                // 设置左下角为缩放中心点
+                centerX: '0%',
+                centerY: '100%' })
               .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.8 })
               .visibility(this.isPuraWP() ? Visibility.None : Visibility.Visible)
               .borderRadius(this.isCoverRectangle ? 20 : '100%')
-              .align(Alignment.Center)//
               .clip(true)
               .rotate({
                 x: 0,
@@ -10165,10 +10341,14 @@ export struct LocalMusic {
                 (this.isCoverOpacity() ? (px2vp(this.windowHeight)*0.62) : this.isCoverRectangle ? 320 : 162))
               .objectFit(this.isCoverRectangle ? ImageFit.Contain : ImageFit.Auto)
               .alt($r('app.media.alt'))
+              .geometryTransition('cover') // 绑定标识符
               .margin({ right: 20, left: 20,top:this.isCoverRectangle||this.isLandscape?0:43 })
               .aspectRatio(1)
               .opacity(this.opacityValueImage)
-              .scale({ x: this.scaleValueImage, y: this.scaleValueImage }) // 添加缩放效果
+              .scale({ x: this.scaleValueImage, y: this.scaleValueImage,
+                // 设置左下角为缩放中心点
+                centerX: '0%',
+                centerY: '100%' })
               .visibility(this.isPuraWP() ? Visibility.None : Visibility.Visible)
               .borderRadius(this.isCoverRectangle ? 20 : '100%')
               .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.8 })
@@ -10188,24 +10368,26 @@ export struct LocalMusic {
               .onClick(() => {
 
               })
-            if (this.isPhoneLan()) {
-              Text(this.name)
-                .fontSize(18)
-                .fontWeight(FontWeight.Bold)
-                .margin({ top: 13 })
-                .textOverflow({ overflow: TextOverflow.Ellipsis })
-                .maxLines(1)
-                .width('99%')
-                .textAlign(TextAlign.Center)
-                .fontColor(Color.White)
 
-            }
+          }
+
+          if (this.isPhoneLan()) {
+            Text(this.name)
+              .fontSize(18)
+              .fontWeight(FontWeight.Bold)
+              .margin({ top: 13 })
+              .textOverflow({ overflow: TextOverflow.Ellipsis })
+              .maxLines(1)
+              .width('99%')
+              .textAlign(TextAlign.Center)
+              .fontColor(Color.White)
 
           }
 
 
         }
 
+
         // 唱针以左上角为点选择逆时针40度
         Image($r('app.media.ic_music_cover_hand'))
           .height(130)
@@ -10234,6 +10416,7 @@ export struct LocalMusic {
         }
         .justifyContent(FlexAlign.Start)
         .zIndex(1)
+        .geometryTransition('name')
         .visibility(this.isCoverOpacity() ? Visibility.Visible : Visibility.None)
 
       }
@@ -10288,9 +10471,9 @@ export struct LocalMusic {
           .maxLines(1)
       }
       .zIndex(1)
+      .geometryTransition('name') // 绑定标识符
       .layoutWeight(1)
       .margin({ left: 15 })
-      .scale({ x: this.scaleValueImage, y: this.scaleValueImage }) // 添加缩放效果
       Blank()
       Row(){
 
@@ -10321,6 +10504,7 @@ export struct LocalMusic {
 
     }
     .width('90%')
+    .scale({ x: this.scaleValueText, y: this.scaleValueText }) // 添加缩放效果
     .margin({ top: this.isCoverOpacity() ? 10 : isHidden ? 20 : 10 })
     .visibility(this.isCoverOpacity() || isHidden ? Visibility.None : Visibility.Visible)
   }
@@ -10348,8 +10532,7 @@ export struct LocalMusic {
       .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
       .visibility(this.isHide ? Visibility.Hidden : Visibility.Visible)
       .onClick(() => {
-
-        this.isShowPlay = false;
+        this.setShowPlayFalse()
 
       })
 
@@ -11829,8 +12012,11 @@ export struct LocalMusic {
         this.isShowMoreView = false
         break;
       case 15: //编辑标签
-        this.setEditStrEmpty()
+        this.initEditFields(this.currentSong)
         this.tempLyricContent = this.lyricContent
+        if (StrUtil.isNotEmpty(this.tempLyricContent)) {
+          this.lyricConStr = this.tempLyricContent
+        }
         this.isShowEdit = !this.isShowEdit;
         break;
       case 16: //悬浮歌词
@@ -14599,3 +14785,42 @@ async function scanCurrentDirectoryTask(context: Context, dirPath: string, lockP
     console.error(' 扫描当前目录失败:', error);
   }
 }
+
+//内嵌标签后更新库
+@Concurrent
+async function updateInfoDb(
+  context: Context,
+  filePath: string,
+  titleStr: string,
+  artistStr: string,
+  albumStr: string,
+  lyricConStr: string,
+  yearStr: string,
+  genreStr: string,
+  trackStr: string,
+  albumArtistStr: string,
+  composerStr: string,
+  lyricistStr: string,
+  commentStr: string,
+  discStr: string,
+): Promise<boolean> {
+  const table: MediaTable = new MediaTable(context);
+  await new Promise<void>((resolve, reject) => {
+    table.getRdbStore(context,  (err:Error) => {
+      err ? reject(err) : resolve();
+    });
+  });
+
+  return await new Promise<boolean>((resolve) => {
+    table.updateMediaInfo(filePath, titleStr, artistStr, albumStr, lyricConStr,
+      yearStr, genreStr, trackStr, albumArtistStr, composerStr, lyricistStr, commentStr, discStr,
+      (success: boolean, error?: string) => {
+        if (success) {
+          console.log("onecold 编辑信息成功,数据库已同步");
+        } else {
+          console.error("onecold 编辑信息数据库失败原因: " + error);
+        }
+        resolve(success);
+      });
+  });
+}