PlutoIsAPlanet 2 Posted October 1, 2021 Share Posted October 1, 2021 Greetings all, a bit of an extension to my previous mail, I hope this merits a new question: In the web interface, I can see the following (snipped) information: As mentioned in the previous mail, I'm attempting to update the metadata by inserting/replacing the name of the artist, into the items AlbumArtists collection (a NameIdPair array). If I have the name of the artist, then this does the trick: song.ArtistItems = new NameIdPair[] { new NameIdPair { Id = ARTIST_ID, Name = ARTIST } }; The problem is, that the whilst I can see certain properties of the BaseItemDto item, the Path property is null, so I'm unable to programmatically extract the name of the artist for further usage. I'd appreciate any ideas you might have! Link to comment Share on other sites More sharing options...
ebr 14939 Posted October 1, 2021 Share Posted October 1, 2021 Hi. Albums don't have paths because they are not derived from the file system. They come from the tags in the songs. You would have to look at the song paths. Link to comment Share on other sites More sharing options...
PlutoIsAPlanet 2 Posted October 1, 2021 Author Share Posted October 1, 2021 19 minutes ago, ebr said: Hi. Albums don't have paths because they are not derived from the file system. They come from the tags in the songs. You would have to look at the song paths. Thank you for the clarification @ebr - to be fair, I believed I was dealing with a song! As far as I can see and please, correct me if I'm wrong, there seems to be a slight difference when invoking GetItemsAsync compared to GetItemAsync. After providing an ItemQuery for GetItemsAsync, I can't see the Path property. When invoking GetItemAsync with the same criteria, I see what I was hoping for as well as further information (e.g. Container; DateCreated) not included in the first query. Link to comment Share on other sites More sharing options...
ebr 14939 Posted October 1, 2021 Share Posted October 1, 2021 1 hour ago, PlutoIsAPlanet said: there seems to be a slight difference when invoking GetItemsAsync compared to GetItemAsync. There are actually a lot of differences. The former is designed to get a large group of items to display in a list or grid and, for that, we don't need a lot of the bulky information that exists for items. So, many fields are optional. You can include the ones you want with the "Fields" query parameter. The latter retrieves all information for a single item. 1 Link to comment Share on other sites More sharing options...
PlutoIsAPlanet 2 Posted October 1, 2021 Author Share Posted October 1, 2021 Thanks once again for the detailed information! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now