tesshucom / jpsonic

This is a repository for development. See https://github.com/jpsonic/jpsonic
GNU General Public License v3.0
14 stars 13 forks source link

Genres are incorrectly registered due to improper sorting during scanning #797

Closed tesshucom closed 3 years ago

tesshucom commented 3 years ago

Problem description

The genre count of the album may change depending on your environment.

The order of recent-albums may vary depending on your environment.

Steps to reproduce

System information

Additional notes

This is a reproduction case where the genre count of the album can change depending on the environment. In the case of test data and test cases attached to the project, among the Album genres, the Metal genre may be counted as 1 or 0. The order of the files has a lot to do with determining the genre of an album.

The album genre determination logic is dynamic and Subsonic specific. Therefore, if the genre determination conditions differ due to environmental differences, the results may change. For example, when there are multiple genres in an album and the file order differs depending on the OS. Or, a type of false positive that occurs rarely.


This issue itself will be treated as a bug and fixed.

tesshucom commented 3 years ago

It takes a long time to verify and is not a fatal issue. Also it is a latent bug that has existed for some time. (Alternatively, Subsonic may claim it as the specification...!)

So it will not be addressed in v109.4.0. (Depending on the modification method, the performance will be significantly affected.) Add a workaround fix to the test case. If it matches the expected result on Linux (Ubunts), the test case will be skipped and a warning will be displayed. Consider countermeasures in later versions.

tesshucom commented 3 years ago

Temporary evasion was done at 242f5f7b1bddaaae78c15b5105e99ecfe84f2e9d. Will do these additional investigations and, if possible, revert and improve.

tesshucom commented 3 years ago

Music2 scan results differ between Windows and Ubuntu.


Windows

(MediaFile) id:18, name:DIR chrome hoof - 2004, genre:Metal (Genre) id:Gothik Folk Psychobilly, albumCount:1, songCount:3 id:Impressionist Era, albumCount:1, songCount:2 id:Baroque Instrumental, albumCount:1, songCount:2 id:Metal, albumCount:1, songCount:1 id:Alternative/Indie, albumCount:0, songCount:1


Ubuntu

(MediaFile) id:17, name:DIR chrome hoof - 2004, genre:Alternative/Indie (Genre) id:Gothik Folk Psychobilly, albumCount:1, songCount:3 id:Impressionist Era, albumCount:1, songCount:2 id:Baroque Instrumental, albumCount:1, songCount:2 id:Metal, albumCount:0, songCount:1 id:Alternative/Indie, albumCount:1, songCount:1


image

Due to Subsonic specifications, the correct result is the scan result on Windows. There is a possibility that the order of the files cannot be obtained correctly on Ubuntu due to some problem.

tesshucom commented 3 years ago

It doesn't seem to be a simple bug. As a result of adding some validation, it was not possible to solve the problem immediately, so I will postpone it.

895