c# - GetMusicProperties Isn't Getting Correct Album Artist -


i'm making 2 separate calls artists , albums user's music library. artists:

list<artist> _artists = new list<artist>();    var folderlist = await knownfolders.musiclibrary.getfoldersasync(commonfolderquery.groupbyartist);  foreach (var folder in folderlist) {     var props = await folder.properties.getmusicpropertiesasync();     var thumbnail = await folder.getthumbnailasync(thumbnailmode.musicview, 256);      if (!string.isnullorempty(props.artist))     {         var artist = new artist         {             id = props.artist,             name = props.artist,             creationdate = folder.datecreated.datetime,             thumbnail = thumbnail         };         _artists.add(artist);     } } 

and albums:

list<album> _albums = new list<album>(); var folderlist = await knownfolders.musiclibrary.getfoldersasync(commonfolderquery.groupbyalbum);  foreach (var folder in folderlist) {     var props = await folder.properties.getmusicpropertiesasync();     var thumbnail = await folder.getthumbnailasync(thumbnailmode.musicview, 256);      if (!string.isnullorempty(props.album))     {         var album = new album         {             id = props.album,             artistid = props.artist,             title = props.album,             creationdate = folder.datecreated.datetime,             thumbnail = thumbnail         };         _albums.add(album);     } } 

the problem have structure:

  • a folder artist (artist 1)
  • in artist folder, folder album
  • two files in album folder, each of them different artists (artist 2 , artist 3)

in method retrieve artists, props.artist set "artist 1". is, of course, want. however, when make call albums, props.artist "artist 2"; "artist 1" found in props. likewise, in call artists, "artist 2" isn't anywhere in props. makes virtually impossible-- @ best, unreliable-- link artists , albums in way, need do. there way "artist 1" when getting album properties?


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -