mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
Added a url base
This commit is contained in:
parent
68624f6971
commit
1af3c21655
11 changed files with 54 additions and 31 deletions
|
@ -33,7 +33,7 @@ namespace PlexRequests.Core.SettingModels
|
|||
public class PlexRequestSettings : Settings
|
||||
{
|
||||
public int Port { get; set; }
|
||||
|
||||
public string AssetLocation { get; set; }
|
||||
public bool SearchForMovies { get; set; }
|
||||
public bool SearchForTvShows { get; set; }
|
||||
public bool SearchForMusic { get; set; }
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace PlexRequests.Core
|
|||
{
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private static DbConfiguration Db { get; set; }
|
||||
public string SetupDb()
|
||||
public string SetupDb(string assetLocation)
|
||||
{
|
||||
Db = new DbConfiguration(new SqliteFactory());
|
||||
var created = Db.CheckDb();
|
||||
|
@ -52,7 +52,7 @@ namespace PlexRequests.Core
|
|||
|
||||
if (created)
|
||||
{
|
||||
CreateDefaultSettingsPage();
|
||||
CreateDefaultSettingsPage(assetLocation);
|
||||
}
|
||||
|
||||
var version = CheckSchema();
|
||||
|
@ -89,7 +89,7 @@ namespace PlexRequests.Core
|
|||
return version;
|
||||
}
|
||||
|
||||
private void CreateDefaultSettingsPage()
|
||||
private void CreateDefaultSettingsPage(string assetLocation)
|
||||
{
|
||||
var defaultSettings = new PlexRequestSettings
|
||||
{
|
||||
|
@ -97,7 +97,8 @@ namespace PlexRequests.Core
|
|||
RequireMovieApproval = true,
|
||||
SearchForMovies = true,
|
||||
SearchForTvShows = true,
|
||||
WeeklyRequestLimit = 0
|
||||
WeeklyRequestLimit = 0,
|
||||
AssetLocation = assetLocation ?? "assets"
|
||||
};
|
||||
var s = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
|
||||
s.SaveSettings(defaultSettings);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue