Esempio n. 1
0
        private async Task ImportRelationships(ExportedLibraryDto dto)
        {
            await videoRepository.UpsertCharactersInVideos(dto.CharactersInVideos, ids);

            await videoRepository.UpsertCreatorsOfVideos(dto.VideoCreators, ids);

            mediaFileRepository.UpsertFilesOnCharacters(dto.FilesOnCharacters, ids);
            mediaFileRepository.UpsertFilesOnLocations(dto.FilesOnLocations, ids);
            mediaFileRepository.UpsertFilesOnVideos(dto.FilesOnVideos, ids);

            tagRepository.UpsertTagsOnCharacters(dto.TagsOnCharacters, ids);
            tagRepository.UpsertTagsOnFiles(dto.TagsOnFiles, ids);
            tagRepository.UpsertTagsOnSeries(dto.TagsOnSeries, ids);
            tagRepository.UpsertTagsOnVideos(dto.TagsOnVideos, ids);

            seriesSequenceRepository.UpsertVideosInSequences(dto.VideosInSeriesSequences, ids);
            playlistRepository.UpsertVideosInSequences(dto.VideosInPlaylists, ids);

            await locationRepository.UpsertVideosAtLocations(dto.VideosOnLocations, ids);
        }