mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Added contact email to user agent
MusicBrainz request a contact email address is supplied in comment section of user agent field.
This commit is contained in:
		
							parent
							
								
									f8bb7a7ff4
								
							
						
					
					
						commit
						d125fbc43d
					
				@ -428,6 +428,12 @@ namespace Emby.Server.Implementations
 | 
			
		||||
        /// <value>The application user agent.</value>
 | 
			
		||||
        public string ApplicationUserAgent => Name.Replace(' ','-') + "/" + ApplicationVersion;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Gets the email address for use within a comment section of a user agent field.
 | 
			
		||||
        /// Presently used to provide contact information to MusicBrainz service.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public string ApplicationUserAgentAddress { get; } = "team@jellyfin.org";
 | 
			
		||||
 | 
			
		||||
        private string _productName;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
 | 
			
		||||
@ -71,6 +71,12 @@ namespace MediaBrowser.Common
 | 
			
		||||
        /// <value>The application user agent.</value>
 | 
			
		||||
        string ApplicationUserAgent { get; }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Gets the email address for use within a comment section of a user agent field.
 | 
			
		||||
        /// Presently used to provide contact information to MusicBrainz service.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        string ApplicationUserAgentAddress { get; }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Gets the exports.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,6 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Diagnostics;
 | 
			
		||||
using System.Globalization;
 | 
			
		||||
using System.IO;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Net;
 | 
			
		||||
@ -735,7 +734,9 @@ namespace MediaBrowser.Providers.Music
 | 
			
		||||
            {
 | 
			
		||||
                Url = MusicBrainzBaseUrl.TrimEnd('/') + url,
 | 
			
		||||
                CancellationToken = cancellationToken,
 | 
			
		||||
                UserAgent = _appHost.ApplicationUserAgent,
 | 
			
		||||
                // MusicBrainz request a contact email address is supplied, as comment, in user agent field:
 | 
			
		||||
                // https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#User-Agent
 | 
			
		||||
                UserAgent = string.Format("{0} ( {1} )", _appHost.ApplicationUserAgent, _appHost.ApplicationUserAgentAddress),
 | 
			
		||||
                BufferContent = false
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user