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 {
127
127
album: string ; // Album name
128
128
genre: string ; // Music genre
129
129
duration: number ; // Duration in seconds
130
- uri : string ; // File URI or path
130
+ url : string ; // File URL or path
131
131
createdAt? : number ; // Date added (Unix timestamp)
132
132
modifiedAt? : number ; // Date modified (Unix timestamp)
133
133
fileSize? : number ; // File size in bytes
@@ -186,7 +186,7 @@ const loadMusicLibrary = async () => {
186
186
result .items .forEach (track => {
187
187
console .log (` ${ track .title } by ${ track .artist } ` );
188
188
console .log (` Duration: ${ Math .floor (track .duration / 60 )} :${ track .duration % 60 } ` );
189
- console .log (` File: ${ track .uri } ` );
189
+ console .log (` File: ${ track .url } ` );
190
190
});
191
191
} catch (error) {
192
192
console .error (' Failed to load music library:' , error);
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ interface Track {
127
127
album: string ; // 专辑名称
128
128
genre: string ; // 音乐类型
129
129
duration: number ; // 持续时间(秒)
130
- uri : string ; // 文件 URI 或路径
130
+ url : string ; // 文件 URL 或路径
131
131
createdAt? : number ; // 添加日期(Unix 时间戳)
132
132
modifiedAt? : number ; // 修改日期(Unix 时间戳)
133
133
fileSize? : number ; // 文件大小(字节)
@@ -186,7 +186,7 @@ const loadMusicLibrary = async () => {
186
186
result .items .forEach (track => {
187
187
console .log (` ${ track .title } - ${ track .artist } ` );
188
188
console .log (` 时长: ${ Math .floor (track .duration / 60 )} :${ track .duration % 60 } ` );
189
- console .log (` 文件: ${ track .uri } ` );
189
+ console .log (` 文件: ${ track .url } ` );
190
190
});
191
191
} catch (error) {
192
192
console .error (' 加载音乐库失败:' , error);
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ data class Track(
8
8
val album : String ,
9
9
val genre : String ,
10
10
val duration : Double ,
11
- val uri : String ,
11
+ val url : String ,
12
12
val createdAt : Long? = null ,
13
13
val modifiedAt : Long? = null ,
14
14
val fileSize : Long ,
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ object GetTracksQuery {
105
105
album = album,
106
106
genre = genre,
107
107
duration = duration,
108
- uri = " file://$data " ,
108
+ url = " file://$data " ,
109
109
createdAt = dateAdded * 1000 , // Convert to milliseconds
110
110
modifiedAt = dateAdded * 1000 , // Convert to milliseconds
111
111
fileSize = fileSize
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ object DataConverter {
15
15
map.putString(" album" , track.album)
16
16
map.putString(" genre" , track.genre)
17
17
map.putDouble(" duration" , track.duration)
18
- map.putString(" uri " , track.uri )
18
+ map.putString(" url " , track.url )
19
19
map.putLong(" fileSize" , track.fileSize)
20
20
21
21
track.createdAt?.let { map.putDouble(" createdAt" , it.toDouble()) }
You can’t perform that action at this time.
0 commit comments