private async Task <Either <BaseError, MediaItemScanResult <Show> > > FindOrCreateShow(
            int libraryPathId,
            string showFolder)
        {
            ShowMetadata metadata = await _localMetadataProvider.GetMetadataForShow(showFolder);

            Option <Show> maybeShow = await _televisionRepository.GetShowByMetadata(libraryPathId, metadata);

            return(await maybeShow.Match(
                       show => Right <BaseError, MediaItemScanResult <Show> >(new MediaItemScanResult <Show>(show)).AsTask(),
                       async() => await _televisionRepository.AddShow(libraryPathId, showFolder, metadata)));
        }
    private async Task <Either <BaseError, MediaItemScanResult <Show> > > FindOrCreateShow(
        int libraryPathId,
        string showFolder)
    {
        ShowMetadata metadata = await _localMetadataProvider.GetMetadataForShow(showFolder);

        Option <Show> maybeShow = await _televisionRepository.GetShowByMetadata(libraryPathId, metadata);

        foreach (Show show in maybeShow)
        {
            return(new MediaItemScanResult <Show>(show));
        }

        return(await _televisionRepository.AddShow(libraryPathId, showFolder, metadata));
    }