# Whats up in Jellyplist 0.1.6?
### 🆕Better Linking (in preparation for Lidarr integration)
 During the link-task `(update_jellyfin_id_for_downloaded_tracks)`, where Jellyplist tries to link a `Spotify-Track-Id` to a `Jellyfin-Track-Id` it performs now a search and tries to find a best match from the results also considering quality aspects of a file. 
You can also make use of `ffprobe`, so jellyplist get´s more  detailed information about the quality profile of a file. 
To use `ffprobe` set the environment variable `FIND_BEST_MATCH_USE_FFPROBE` to `true` otherwise jellyplist will use quality information provided by the Jellyfin API.
Fixes #14

In the Debug logs it will look like this:
```log
find_best_match_from_jellyfin() ]   DEBUG - Quality score for track Smalltown Boy: 4410.866669999999 [/storage/media/music/Bronski Beat/The Age of Reason (2017)/CD 01/Bronski Beat - The Age of Reason - 05 - Smalltown Boy.flac]
find_best_match_from_jellyfin() ]   DEBUG - Quality score for track Smalltown Boy: 4100.6 [/storage/media/music/Bronski Beat/The Age of Consent (1984)/CD 01/Bronski Beat - The Age of Consent - 06 - Smalltown Boy.flac]
find_best_match_from_jellyfin() ]   DEBUG - Quality score for track Smalltown Boy: 3240.48 [/storage/media/music/__jellyplist/5vmRQ3zELMLUQPo2FLQ76x.mp3]
```
**What´s the benefit?**

Once a day, the task `update_jellyfin_id_for_downloaded_tracks` will do a full update on all tracks. This way you can listen to tracks and make use of the playlists until Lidarr provides you the same track but with better audio quality. 

### 🆕Added REFRESH_LIBRARIES_AFTER_DOWNLOAD_TASK
When setting the new environment variable `REFRESH_LIBRARIES_AFTER_DOWNLOAD_TASK` to `true` , jellyplist will trigger a music library update on your Jellyfin server, in case you dont have `Realtime Monitoring` enabled on your Jellyfin library.
Fixes #10

### 🆕Removed cookies.txt requirement
No need to use `cookies.txt` file to download tracks via spotDL
>[!IMPORTANT]
> Not using a cookies.txt file will limit the bitrate of downloaded tracks to `128kbit/s` 📻

### 🆕Added LOG_LEVEL
Via the environment variable  `LOG_LEVEL` you can control the log output  now. The default python log levels are available: 
- CRITICAL 
- FATAL 
- ERROR 
- WARNING 
- INFO 
- DEBUG 
- NOTSET

### 🆕Added the possibility for admins to release task lock´s 
When a task will crash or whatsoever , the lock won´t be released and you have to wait for it to expire until you can run it manually. Now you can release it manually, in case you need it. 
>[!IMPORTANT]
>You must be logged in as an admin

### 🆕Added the possibility for admins to remove playlists completely
This way the playlist will be removed from "monitoring" and also be removed from jellyfin. 
>[!IMPORTANT]
>You must be logged in as an admin

### 🆕Allow manual track re-linking
In case something went wrong and you want to assign another Jellyfin track to a Spotify-Track-Id you can do it now manually. 
Just go to "View Playlist Details", in the table where the tracks are listed, hold the `CTRL` Key while clicking on the Play from Jellyfin button. You will be presented with the search modal and can choose whatever track you like. 
Fixex #13

### 🆕Added a badge on the lower left corner indicating the current version

### ⚒️Overall improvements in logging
Changed log format and also added debug logging where (I think) it´s appropriate.

### 🐛 Bugfixes
- Fixed a bug where playlists weren´t updated until the `snapshot-id` of a playlist changed. Fixes #9
- Fixed a dependency error, which caused `chromaprint` fingerprinting to error out. Fixes #12 
- Fixed a paging error, which caused that only the first 100 elements of a playlists were added
