- Sort the search result according to the similarity of *artist* and *title*
- Have Chinese translation if it's available
特色:
- 根据*艺术家*和*标题*的相似程度排序搜索结果
- 有中文歌词翻译(如果有提供)
## Usage(用法)
Download from [release](https://github.com/LudySu/Synology-LrcPlugin/releases). There are two flavors: `netease_org.aum` is the original flavor, which shows the lyric in original language; `netease_trans.aum` is the translated flavor that has Chinese translation if it's available.
Go to `Audio Station -> Settings -> Lyrics Plugin -> Add` to add the `aum` file in your flavor, then enable by ticking it. Then when you play a song the lyric will be downloaded automatically.
If you feel it's not the best match, in **Audio Station** you can right click on a song, go to `Song Information -> Lyrics -> Search Internet` which will give you all the search results. You can pick from the second one in the list.
In the proejct's root directory, run the included bash script to generate `.aum` files required by **Audio Station**. Both original and translated flavors will be generated.
```bash
./build.sh
```
## About development(关于开发)
### Do not use echo(不要用echo函数)
If the PHP script has `echo()` inside, **Audio Station** will fail to return the result!
1. Finds out the *title* that matches exactly or partially
2. Finds out the best match *artist* from all artists. (The song might have multiple artists)
3. Sort the search result based on the similarity of *artist* and *title* using `similar_text()`
###Chinese translation(中文翻译)
Some songs have Chinese translation, the translation is in another lyric file. So this PHP also append the translation to the end of each original lyric line when the time tag matches.