44using NzbDrone . Common . Instrumentation ;
55using NzbDrone . Core . IndexerSearch . Definitions ;
66using System . Net ;
7+ using System . Text ;
78
89namespace NzbDrone . Core . Indexers . Soulseek
910{
@@ -69,7 +70,12 @@ private IEnumerable<IndexerRequest> GetRequests(string artist, string? album = n
6970 _logger . Trace ( $ "Generated search initiation request: { searchRequest . Url } ") ;
7071
7172 HttpRequest request = new HttpRequestBuilder ( $ "{ Settings . BaseUrl } /api/v0/searches/{ searchData . Id } ")
72- . AddQueryParam ( "includeResponses" , true ) . SetHeader ( "X-API-KEY" , Settings . ApiKey ) . SetHeader ( "X-ALBUM" , album ) . SetHeader ( "X-ARTIST" , artist ) . SetHeader ( "X-INTERACTIVE" , interactive . ToString ( ) ) . Build ( ) ;
73+ . AddQueryParam ( "includeResponses" , true )
74+ . SetHeader ( "X-API-KEY" , Settings . ApiKey )
75+ . SetHeader ( "X-ALBUM" , Convert . ToBase64String ( Encoding . UTF8 . GetBytes ( album ?? "" ) ) )
76+ . SetHeader ( "X-ARTIST" , Convert . ToBase64String ( Encoding . UTF8 . GetBytes ( artist ) ) )
77+ . SetHeader ( "X-INTERACTIVE" , interactive . ToString ( ) )
78+ . Build ( ) ;
7379 yield return new IndexerRequest ( request ) ;
7480 }
7581
@@ -88,7 +94,7 @@ private async Task WaitOnSearchCompletionAsync(string searchId, TimeSpan timeout
8894 if ( elapsed > timeout && ! hasTimedOut )
8995 {
9096 hasTimedOut = true ;
91- timeoutEndTime = DateTime . UtcNow . AddSeconds ( 8 ) ;
97+ timeoutEndTime = DateTime . UtcNow . AddSeconds ( 20 ) ;
9298 }
9399 else if ( hasTimedOut && timeoutEndTime < DateTime . UtcNow )
94100 break ;
@@ -104,10 +110,7 @@ private async Task WaitOnSearchCompletionAsync(string searchId, TimeSpan timeout
104110 double delay ;
105111
106112 if ( hasTimedOut && DateTime . UtcNow < timeoutEndTime )
107- {
108- await Task . Delay ( 1000 ) ;
109- delay = 0.5 ;
110- }
113+ delay = 1 ;
111114 else
112115 delay = CalculateQuadraticDelay ( progress ) ;
113116
0 commit comments