diff --git a/JMMServer/Repositories/Cached/AnimeEpisodeRepository.cs b/JMMServer/Repositories/Cached/AnimeEpisodeRepository.cs index 17ed81b47..c2a0cc242 100644 --- a/JMMServer/Repositories/Cached/AnimeEpisodeRepository.cs +++ b/JMMServer/Repositories/Cached/AnimeEpisodeRepository.cs @@ -48,7 +48,13 @@ public override void RegenerateDb() if (max <= 0) return; foreach (AnimeEpisode g in grps) { - Save(g); + try + { + Save(g); + } + catch (Exception e) + { + } cnt++; if (cnt % 10 == 0) { diff --git a/JMMServer/Repositories/Cached/AnimeSeriesRepository.cs b/JMMServer/Repositories/Cached/AnimeSeriesRepository.cs index 989d0648e..d2ca23250 100644 --- a/JMMServer/Repositories/Cached/AnimeSeriesRepository.cs +++ b/JMMServer/Repositories/Cached/AnimeSeriesRepository.cs @@ -70,7 +70,14 @@ public override void RegenerateDb() if (max <= 0) return; foreach (AnimeSeries s in sers) { - Save(s, false, false, true); + try + { + Save(s, false, false, true); + } + catch (Exception e) + { + } + cnt++; if (cnt % 10 == 0) { diff --git a/JMMServer/Repositories/Cached/VideoLocalRepository.cs b/JMMServer/Repositories/Cached/VideoLocalRepository.cs index 49c7dad9e..d8f2c3b84 100644 --- a/JMMServer/Repositories/Cached/VideoLocalRepository.cs +++ b/JMMServer/Repositories/Cached/VideoLocalRepository.cs @@ -1,4 +1,5 @@ -using System; + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; @@ -75,12 +76,18 @@ public override void RegenerateDb() Save(a, false); }); //Fix possible paths in filename - Cache.Values.Where(a=>a.FileName.Contains("\\")).ToList().ForEach(a => + try { - int b = a.FileName.LastIndexOf("\\"); - a.FileName = a.FileName.Substring(b + 1); - Save(a,false); - }); + Cache.Values.Where(a=>a.FileName.Contains("\\")).ToList().ForEach(a => + { + int b = a.FileName.LastIndexOf("\\"); + a.FileName = a.FileName.Substring(b + 1); + Save(a,false); + }); + } + catch (Exception e) + { + } }