mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-31 07:13:02 +00:00 
			
		
		
		
	Fix #2045 ("fetch metadata" update appends to the existing tags instead or replacing them)
This commit is contained in:
		| @@ -28,7 +28,10 @@ $(function () { | |||||||
|  |  | ||||||
|     function populateForm (book) { |     function populateForm (book) { | ||||||
|         tinymce.get("description").setContent(book.description); |         tinymce.get("description").setContent(book.description); | ||||||
|         var uniqueTags = []; |         var uniqueTags = $.map($("#tags").val().split(","), $.trim); | ||||||
|  |         if ( uniqueTags.length == 1 && uniqueTags[0] == "") { | ||||||
|  |             uniqueTags = []; | ||||||
|  |         } | ||||||
|         $.each(book.tags, function(i, el) { |         $.each(book.tags, function(i, el) { | ||||||
|             if ($.inArray(el, uniqueTags) === -1) uniqueTags.push(el); |             if ($.inArray(el, uniqueTags) === -1) uniqueTags.push(el); | ||||||
|         }); |         }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ozzieisaacs
					Ozzieisaacs