Skip to content

Commit

Permalink
Fix #291
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyCorbett committed Mar 13, 2020
1 parent 09b17ab commit 1857af6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions OnlyM/Services/ImageDisplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -422,7 +421,7 @@ private void InitFromSlideshowFile(string mediaItemFilePath)
return;
}

sf.ExtractImages(_slideshowStagingFolder);
sf.ExtractImages(GetStagingFolderForSlideshow());

_slides = sf.GetSlides(includeBitmapImage: false).ToList();
_shouldLoopSlideshow = sf.Loop;
Expand All @@ -431,6 +430,13 @@ private void InitFromSlideshowFile(string mediaItemFilePath)
_autoPlaySlideshowDwellTime = sf.DwellTimeMilliseconds;
}

private string GetStagingFolderForSlideshow()
{
var folder = Path.Combine(_slideshowStagingFolder, _slideshowGuid.ToString("N"));
Directory.CreateDirectory(folder);
return folder;
}

private void ConfigureSlideshowAutoPlayTimer()
{
if (_autoPlaySlideshow)
Expand Down Expand Up @@ -480,7 +486,7 @@ private void DisplaySlide(

var fadeType = GetSlideFadeType(slide, previousSlide, direction);

var imageFilePath = Path.Combine(_slideshowStagingFolder, slide.ArchiveEntryName);
var imageFilePath = Path.Combine(GetStagingFolderForSlideshow(), slide.ArchiveEntryName);

PlaceImage(
mediaItemId,
Expand Down
2 changes: 1 addition & 1 deletion SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.5.0.29")]
[assembly: AssemblyVersion("1.5.0.30")]

0 comments on commit 1857af6

Please sign in to comment.