mirror of
				https://github.com/Kareadita/Kavita.git
				synced 2025-10-30 18:22:29 -04:00 
			
		
		
		
	* Fixed the typeahead not having the same size input box as other inputs
* Implemented the ability to add multiple series to a collection through bulk operations flow. Updated book parser to handle "@import url('...');" syntax as well as @import '...';
* Implemented the ability to create a new Collection tag via bulk operations flow.
		
	
			
		
			
				
	
	
		
			63 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using API.DTOs;
 | |
| using API.DTOs.CollectionTags;
 | |
| using API.DTOs.Reader;
 | |
| using API.DTOs.ReadingLists;
 | |
| using API.DTOs.Settings;
 | |
| using API.Entities;
 | |
| using API.Helpers.Converters;
 | |
| using AutoMapper;
 | |
| 
 | |
| namespace API.Helpers
 | |
| {
 | |
|     public class AutoMapperProfiles : Profile
 | |
|     {
 | |
|         public AutoMapperProfiles()
 | |
|         {
 | |
|             CreateMap<LibraryDto, Library>();
 | |
| 
 | |
|             CreateMap<Volume, VolumeDto>();
 | |
| 
 | |
|             CreateMap<MangaFile, MangaFileDto>();
 | |
| 
 | |
|             CreateMap<Chapter, ChapterDto>();
 | |
| 
 | |
|             CreateMap<Series, SeriesDto>();
 | |
| 
 | |
|             CreateMap<CollectionTag, CollectionTagDto>();
 | |
| 
 | |
|             CreateMap<SeriesMetadata, SeriesMetadataDto>();
 | |
| 
 | |
|             CreateMap<Person, PersonDto>();
 | |
| 
 | |
|             CreateMap<AppUserPreferences, UserPreferencesDto>();
 | |
| 
 | |
|             CreateMap<AppUserBookmark, BookmarkDto>();
 | |
| 
 | |
|             CreateMap<ReadingList, ReadingListDto>();
 | |
|             CreateMap<ReadingListItem, ReadingListItemDto>();
 | |
| 
 | |
|             CreateMap<Series, SearchResultDto>()
 | |
|                 .ForMember(dest => dest.SeriesId,
 | |
|                     opt => opt.MapFrom(src => src.Id))
 | |
|                 .ForMember(dest => dest.LibraryName,
 | |
|                     opt => opt.MapFrom(src => src.Library.Name));
 | |
| 
 | |
| 
 | |
|             CreateMap<Library, LibraryDto>()
 | |
|                 .ForMember(dest => dest.Folders,
 | |
|                     opt =>
 | |
|                         opt.MapFrom(src => src.Folders.Select(x => x.Path).ToList()));
 | |
| 
 | |
|             CreateMap<AppUser, MemberDto>()
 | |
|                 .AfterMap((ps, pst, context) => context.Mapper.Map(ps.Libraries, pst.Libraries));
 | |
| 
 | |
|             CreateMap<RegisterDto, AppUser>();
 | |
| 
 | |
|             CreateMap<IEnumerable<ServerSetting>, ServerSettingDto>()
 | |
|                 .ConvertUsing<ServerSettingConverter>();
 | |
|         }
 | |
|     }
 | |
| }
 |