1
0
Fork 0
mirror of https://github.com/Lidarr/Lidarr.git synced 2026-03-03 00:26:58 -05:00

Allow ENV override for AcoustID values #2281

Open
opened 2026-02-20 12:24:37 -05:00 by deekerman · 3 comments
Owner

Originally created by @DeftNerd on GitHub (Oct 5, 2022).

Is there an existing issue for this?

  • I have searched the existing issues

api.acoustid.org keeps having more and more timeouts. I'm not sure if it's the Lidarr API key that's being throttled or the API endpoint itself. There are proxy services available such as acoustid.plex.tv, and self-hosted docker proxies such as acoustid/docker-https-proxy available to cache the data. It would be a benefit if they could be utilized.

It's even possible to download the whole database (just a few gigs in size) to locally host it for quick local responses.

Describe the solution you'd like

I think it would be useful to allow users to set an ENV variable to override some of the values in FingerprintingService.cs such as the API URL, API Key, and timeout value

Perhaps ACOUSTID_URL, ACOUSTID_KEY, and ACOUSTID_TIMEOUT?

A slightly more advanced feature would be to allow the default hard-coded values to take effect if the ENV set values fail for some reason. It would be nice to have that as a fallback.

Describe alternatives you've considered

Overriding DNS locally, but there are complications with HTTPS enforcement.

Anything else?

#3009
#1821

AB#3874

Originally created by @DeftNerd on GitHub (Oct 5, 2022). ### Is there an existing issue for this? - [X] I have searched the existing issues ### Is your feature request related to a problem? Please describe api.acoustid.org keeps having more and more timeouts. I'm not sure if it's the Lidarr API key that's being throttled or the API endpoint itself. There are proxy services available such as acoustid.plex.tv, and self-hosted docker proxies such as [acoustid/docker-https-proxy](https://github.com/acoustid/docker-https-proxy) available to cache the data. It would be a benefit if they could be utilized. It's even possible to download the whole database (just a few gigs in size) to locally host it for quick local responses. ### Describe the solution you'd like I think it would be useful to allow users to set an ENV variable to override some of the values in [FingerprintingService.cs ](https://github.com/Lidarr/Lidarr/blob/7fcebba7860299f4bee6b97f4739d08d4a7ff614/src/NzbDrone.Core/Parser/FingerprintingService.cs#L35) such as the API URL, API Key, and timeout value Perhaps ACOUSTID_URL, ACOUSTID_KEY, and ACOUSTID_TIMEOUT? A slightly more advanced feature would be to allow the default hard-coded values to take effect if the ENV set values fail for some reason. It would be nice to have that as a fallback. ### Describe alternatives you've considered Overriding DNS locally, but there are complications with HTTPS enforcement. ### Anything else? #3009 #1821 [AB#3874](https://dev.azure.com/Servarr/7ab38f4e-5a57-4d70-84f4-94dd9bc5d6df/_workitems/edit/3874)
Author
Owner

@Qstick commented on GitHub (Oct 21, 2022):

Good thoughts. Let us take a look at some options

@Qstick commented on GitHub (Oct 21, 2022): Good thoughts. Let us take a look at some options
Author
Owner

@ovizii commented on GitHub (Jan 31, 2023):

I have an acoustid api key I am using with my beets container but I can't seem to find an option to let lidarr use this same api key.

@ovizii commented on GitHub (Jan 31, 2023): I have an acoustid api key I am using with my beets container but I can't seem to find an option to let lidarr use this same api key.
Author
Owner

@ovizii commented on GitHub (Jan 31, 2023):

This is what my error looks like:

[Info] IdentificationService: Identifying album 191/227                                                                                              
[Warn] FingerprintingService: AcoustId API lookup failed                                                                                             
                                                                                                                                                     
[v1.0.2.2592] System.Net.WebException: The operation has timed out.: 'https://api.acoustid.org/v2/lookup'                                            
 ---> System.Net.WebException: The operation has timed out.                                                                                          
   at System.Net.HttpWebRequest.GetResponse()                                                                                                        
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 122                                                                                                 
   --- End of inner exception stack trace ---                                                                                                        
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 122                                                                                                 
   at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 124                                                                                                                                    
   at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 57                        
   at NzbDrone.Common.Http.HttpClient.Post[T](HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 269                       
   at NzbDrone.Core.Parser.FingerprintingService.GetResponse(HttpRequest request, Int32 retry) in D:\a\1\s\src\NzbDrone.Core\Parser\FingerprintingService.cs:line 415 
@ovizii commented on GitHub (Jan 31, 2023): This is what my error looks like: ``` [Info] IdentificationService: Identifying album 191/227 [Warn] FingerprintingService: AcoustId API lookup failed [v1.0.2.2592] System.Net.WebException: The operation has timed out.: 'https://api.acoustid.org/v2/lookup' ---> System.Net.WebException: The operation has timed out. at System.Net.HttpWebRequest.GetResponse() at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 122 --- End of inner exception stack trace --- at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse(HttpRequest request, CookieContainer cookies) in D:\a\1\s\src\NzbDrone.Common\Http\Dispatchers\ManagedHttpDispatcher.cs:line 122 at NzbDrone.Common.Http.HttpClient.ExecuteRequest(HttpRequest request, CookieContainer cookieContainer) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 124 at NzbDrone.Common.Http.HttpClient.Execute(HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 57 at NzbDrone.Common.Http.HttpClient.Post[T](HttpRequest request) in D:\a\1\s\src\NzbDrone.Common\Http\HttpClient.cs:line 269 at NzbDrone.Core.Parser.FingerprintingService.GetResponse(HttpRequest request, Int32 retry) in D:\a\1\s\src\NzbDrone.Core\Parser\FingerprintingService.cs:line 415 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Lidarr-Lidarr#2281
No description provided.