handles string lists as inputs for baloo by inserting each string in the list separately
Details
Details
Diff Detail
Diff Detail
- Repository
- R293 Baloo
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Unfortunately I couldn't find tests that execute this code path. Do we have test for this somewhere?
This makes D11365 work
src/file/extractor/result.cpp | ||
---|---|---|
103 | this check is not strictly necessary - if the list is empty, you iterate zero times in the loop. But see below [1] | |
105 | bool shouldBeIndexed = KFMD:PropertyInfo(property).shouldBeIndexed(); avoids the check on each iteration | |
106 | range-based-for loop, please: | |
107 | [1] ... here you miss the check on val.at(i).empty() - the list can contain empty strings. |
Comment Actions
Can you do a manual test on an appropriate file, and add the output (before and after) for balooshow -x <file>?
Comment Actions
with D11365 applied (e.g. multiple entries are string lists) and using a file with multiple artists
balooshow -x testmultiple.opus
Bitrate: 67000 Channels: 1 Duration: 1 Genre: Genre Sample Rate: 48000 Track Number: 1 Release Year: 2015 Comment: Comment Artist: artist2, artist1 Album: Album Album Artist: Album Artist Composer: Composer Lyricist: Lyricist Title: Title Disc Number: 1 Internal Info Terms: Maudio Mogg Mopus Mx T2 Taudio X1-67000 X10-album X11-album X11-artist X12-composer X13-lyricist X15-title X2-1 X3-1 X4-genre X5-48000 X6-1 X62-1 X7-2015 X8-comment album artist title File Name Terms: Fopus Ftestmultiple opus testmultiple XAttr Terms: albumArtist: album artist comment: comment discNumber: 1 title: title composer: composer lyricist: lyricist channels: 1 duration: 1 bitRate: 67000 trackNumber: 1 releaseYear: 2015 genre: genre sampleRate: 48000 album: album
after
Bitrate: 67000 Channels: 1 Duration: 1 Genre: Genre Sample Rate: 48000 Track Number: 1 Release Year: 2015 Comment: Comment Artist: artist2, artist1 Album: Album Album Artist: Album Artist Composer: Composer Lyricist: Lyricist Title: Title Disc Number: 1 Internal Info Terms: Maudio Mogg Mopus Mx T2 Taudio X1-67000 X10-album X11-album X11-artist X12-composer X13-lyricist X15-title X2-1 X3-1 X4-genre X5-48000 X6-1 X62-1 X7-2015 X8-comment X9-artist1 X9-artist2 album artist artist1 artist2 title File Name Terms: Fopus Ftestmultiple opus testmultiple XAttr Terms: lyricist: lyricist title: title discNumber: 1 comment: comment artist: artist1 artist2 album: album albumArtist: album artist genre: genre sampleRate: 48000 trackNumber: 1 releaseYear: 2015 bitRate: 67000 channels: 1 duration: 1 composer: composer