File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ pub enum UniqueFields {
4545 Track {
4646 artists : ArtistsWithRole ,
4747 album : String ,
48+ album_date : Date ,
4849 album_artists : Vec < String > ,
4950 popularity : u8 ,
5051 number : u32 ,
@@ -80,6 +81,8 @@ impl AudioItem {
8081 let uri_string = uri. to_uri ( ) ?;
8182 let album = track. album . name ;
8283
84+ let album_date = track. album . date ;
85+
8386 let album_artists = track
8487 . album
8588 . artists
@@ -113,6 +116,7 @@ impl AudioItem {
113116 let unique_fields = UniqueFields :: Track {
114117 artists : track. artists_with_role ,
115118 album,
119+ album_date,
116120 album_artists,
117121 popularity,
118122 number,
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ impl EventHandler {
6161 UniqueFields :: Track {
6262 artists,
6363 album,
64+ album_date,
6465 album_artists,
6566 popularity,
6667 number,
@@ -81,6 +82,10 @@ impl EventHandler {
8182 album_artists. join ( "\n " ) ,
8283 ) ;
8384 env_vars. insert ( "ALBUM" , album) ;
85+ env_vars. insert (
86+ "ALBUM_DATE" ,
87+ album_date. unix_timestamp ( ) . to_string ( ) ,
88+ ) ;
8489 env_vars
8590 . insert ( "POPULARITY" , popularity. to_string ( ) ) ;
8691 env_vars. insert ( "NUMBER" , number. to_string ( ) ) ;
You can’t perform that action at this time.
0 commit comments