Audioscrobbler: avoid 414 Request-URI Too Large (bgo#689018)
Lastfm has the policy of not accepting more than 50 songs per audioscrobbling submission; but it also has a limit on how long an HTTP request should be, so there could be occassions when the metadata of the 30 songs (our MAX) could surpass this limit. Now, LastfmRequest can receive parameters in batches (all parameters for a song, in a NameValueCollection). If that addition makes the request too large, a MaxSizeExceeded exception is thrown which means that no more parameters can be added and the request is ready to be sent. (All LastFmRequest tests still pass after this refactoring.) Co-authored-by: Andres G. Aragoneses <knocte@gmail.com> Signed-off-by: Andres G. Aragoneses <knocte@gmail.com>
parent
84c491c8
Please register or sign in to comment