windows runtime - Why does MusicProperties->Year always return the current year? -



windows runtime - Why does MusicProperties->Year always return the current year? -

i'm trying music properties each file in music library using storagefolder apis.

after calling getfilesasync(commonfilequery::orderbyname) on music library i'm iterating on resulting ivectorview^ , calling storagefile->properties->getmusicpropertiesasync() each file, inherently slow have way, since queryoptions not supported on windows phone reason.

anyway, after completing task every property right except musicproperties->year, 2014 every single 1 of on 900 music files on phone. here's short code snippet:

create_task(lib->getfilesasync(search::commonfilequery::orderbyname)) .then([](ivectorview<storagefile^>^ songfiles) { auto taskptr = std::make_shared<std::vector<task<song>>>(songfiles->size); (size_t = 0, len = songfiles->size; < len; ++i) { storagefile^ song = songfiles->getat(i); (*taskptr)[i] = create_task(song->properties->getmusicpropertiesasync()).then([] (musicproperties^ props) { song s; s.album = std::wstring(std::move(props->album->data())); s.artist = std::wstring(std::move(props->artist->data())); s.title = std::wstring(std::move(props->title->data())); s.track = props->tracknumber; s.year = props->year; homecoming s; }); } //further processing done in when_all function after song tasks have completed }

song plain struct save result temporarily , convert json later on, year property freaking me out. has else encountered issue , there other way retrieve proper release year music file?

windows-runtime windows-phone-8.1 c++-cx

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -