sentriz / gonic

music streaming server / free-software subsonic server API implementation
ircs://irc.libera.chat/#gonic
GNU General Public License v3.0
1.62k stars 115 forks source link

Use file name / foder name for unknown tag retrieval. #541

Open heimoshuiyu opened 1 month ago

heimoshuiyu commented 1 month ago

When taglib cannot retrieve the title of the media or the title of the album, use the filename as the track name and the folder name as the album name.

I have a lot of music downloaded from YouTube, which doesn't have recognizable media metadata. After scanning with gonic, all of them turn into empty titles and unknown albums, making it difficult for me to distinguish the music. For example, like this:

Screenshot_20240925_150357

These pieces of music without metadata should be manually managed by the user using filenames and folders. In this way, using the filename and folder as the title and album name is reasonable. For example, like this: (the file is named aino.opus under folder miku)

Screenshot_20240925_150148

sentriz commented 1 month ago

interesting, i think i'd need to weigh up the pros and cons here. this is what the subsonic "browse by folder" mode is for. have you tried that?

heimoshuiyu commented 1 month ago

Yes, I know. However, the PC client Sonixd that I use does not support this mode. The Ultrasonic client on Android can choose this mode. The "browser by folder" effect is like this (without this PR):

ultrasonic

I don't think this PR has any drawbacks. It supplements the missing song information in ID3 mode, turning blank titles and Unknown Album into understandable information. At the same time, it does not change the behavior in "browser by folder" mode. I have been using it for two months and think this is a very good improvement.