File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
android/src/main/java/com/musiclibrary Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ interface Track {
127127 album: string ; // Album name
128128 genre: string ; // Music genre
129129 duration: number ; // Duration in seconds
130- uri : string ; // File URI or path
130+ url : string ; // File URL or path
131131 createdAt? : number ; // Date added (Unix timestamp)
132132 modifiedAt? : number ; // Date modified (Unix timestamp)
133133 fileSize? : number ; // File size in bytes
@@ -186,7 +186,7 @@ const loadMusicLibrary = async () => {
186186 result .items .forEach (track => {
187187 console .log (` ${ track .title } by ${ track .artist } ` );
188188 console .log (` Duration: ${ Math .floor (track .duration / 60 )} :${ track .duration % 60 } ` );
189- console .log (` File: ${ track .uri } ` );
189+ console .log (` File: ${ track .url } ` );
190190 });
191191 } catch (error) {
192192 console .error (' Failed to load music library:' , error);
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ interface Track {
127127 album: string ; // 专辑名称
128128 genre: string ; // 音乐类型
129129 duration: number ; // 持续时间(秒)
130- uri : string ; // 文件 URI 或路径
130+ url : string ; // 文件 URL 或路径
131131 createdAt? : number ; // 添加日期(Unix 时间戳)
132132 modifiedAt? : number ; // 修改日期(Unix 时间戳)
133133 fileSize? : number ; // 文件大小(字节)
@@ -186,7 +186,7 @@ const loadMusicLibrary = async () => {
186186 result .items .forEach (track => {
187187 console .log (` ${ track .title } - ${ track .artist } ` );
188188 console .log (` 时长: ${ Math .floor (track .duration / 60 )} :${ track .duration % 60 } ` );
189- console .log (` 文件: ${ track .uri } ` );
189+ console .log (` 文件: ${ track .url } ` );
190190 });
191191 } catch (error) {
192192 console .error (' 加载音乐库失败:' , error);
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ data class Track(
88 val album : String ,
99 val genre : String ,
1010 val duration : Double ,
11- val uri : String ,
11+ val url : String ,
1212 val createdAt : Long? = null ,
1313 val modifiedAt : Long? = null ,
1414 val fileSize : Long ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ object GetTracksQuery {
105105 album = album,
106106 genre = genre,
107107 duration = duration,
108- uri = " file://$data " ,
108+ url = " file://$data " ,
109109 createdAt = dateAdded * 1000 , // Convert to milliseconds
110110 modifiedAt = dateAdded * 1000 , // Convert to milliseconds
111111 fileSize = fileSize
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ object DataConverter {
1515 map.putString(" album" , track.album)
1616 map.putString(" genre" , track.genre)
1717 map.putDouble(" duration" , track.duration)
18- map.putString(" uri " , track.uri )
18+ map.putString(" url " , track.url )
1919 map.putLong(" fileSize" , track.fileSize)
2020
2121 track.createdAt?.let { map.putDouble(" createdAt" , it.toDouble()) }
You can’t perform that action at this time.
0 commit comments