File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ pub enum UniqueFields {
4747 Track {
4848 artists : ArtistsWithRole ,
4949 album : String ,
50+ album_date : Date ,
5051 album_artists : Vec < String > ,
5152 popularity : u8 ,
5253 number : u32 ,
@@ -83,6 +84,8 @@ impl AudioItem {
8384 let uri = track_id. to_uri ( ) ?;
8485 let album = track. album . name ;
8586
87+ let album_date = track. album . date ;
88+
8689 let album_artists = track
8790 . album
8891 . artists
@@ -116,6 +119,7 @@ impl AudioItem {
116119 let unique_fields = UniqueFields :: Track {
117120 artists : track. artists_with_role ,
118121 album,
122+ album_date,
119123 album_artists,
120124 popularity,
121125 number,
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ impl EventHandler {
5454 UniqueFields :: Track {
5555 artists,
5656 album,
57+ album_date,
5758 album_artists,
5859 popularity,
5960 number,
@@ -72,6 +73,10 @@ impl EventHandler {
7273 env_vars
7374 . insert ( "ALBUM_ARTISTS" , album_artists. join ( "\n " ) ) ;
7475 env_vars. insert ( "ALBUM" , album) ;
76+ env_vars. insert (
77+ "ALBUM_DATE" ,
78+ album_date. unix_timestamp ( ) . to_string ( ) ,
79+ ) ;
7580 env_vars. insert ( "POPULARITY" , popularity. to_string ( ) ) ;
7681 env_vars. insert ( "NUMBER" , number. to_string ( ) ) ;
7782 env_vars. insert ( "DISC_NUMBER" , disc_number. to_string ( ) ) ;
You can’t perform that action at this time.
0 commit comments