mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Add config options for optimization tasks
This commit is contained in:
parent
83d96fd2a1
commit
0582b57d60
@ -11,8 +11,9 @@ class Config
|
|||||||
property library_path : String = File.expand_path "~/mango/library",
|
property library_path : String = File.expand_path "~/mango/library",
|
||||||
home: true
|
home: true
|
||||||
property db_path : String = File.expand_path "~/mango/mango.db", home: true
|
property db_path : String = File.expand_path "~/mango/mango.db", home: true
|
||||||
@[YAML::Field(key: "scan_interval_minutes")]
|
property scan_interval_minutes : Int32 = 5
|
||||||
property scan_interval : Int32 = 5
|
property thumbnail_generation_interval_hours : Int32 = 24
|
||||||
|
property db_optimization_interval_hours : Int32 = 24
|
||||||
property log_level : String = "info"
|
property log_level : String = "info"
|
||||||
property upload_path : String = File.expand_path "~/mango/uploads",
|
property upload_path : String = File.expand_path "~/mango/uploads",
|
||||||
home: true
|
home: true
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
class Library
|
class Library
|
||||||
property dir : String, title_ids : Array(String), scan_interval : Int32,
|
property dir : String, title_ids : Array(String), scan_interval : Int32,
|
||||||
title_hash : Hash(String, Title)
|
title_hash : Hash(String, Title), entries_count = 0,
|
||||||
|
thumbnails_count = 0
|
||||||
|
|
||||||
use_default
|
use_default
|
||||||
|
|
||||||
|
@ -1,83 +1,83 @@
|
|||||||
<%- if new_user && empty_library -%>
|
<%- if new_user && empty_library -%>
|
||||||
|
|
||||||
<div class="uk-container uk-text-center">
|
<div class="uk-container uk-text-center">
|
||||||
<i class="fas fa-plus" style="font-size: 80px;"></i>
|
<i class="fas fa-plus" style="font-size: 80px;"></i>
|
||||||
<h2>Add your first manga</h2>
|
<h2>Add your first manga</h2>
|
||||||
<p style="margin-bottom: 40px;">We can't find any files yet. Add some to your library and they'll appear here.</p>
|
<p style="margin-bottom: 40px;">We can't find any files yet. Add some to your library and they'll appear here.</p>
|
||||||
<dl class="uk-description-list">
|
<dl class="uk-description-list">
|
||||||
<dt style="font-weight: 500;">Current library path</dt>
|
<dt style="font-weight: 500;">Current library path</dt>
|
||||||
<dd><code><%= Config.current.library_path %></code></dd>
|
<dd><code><%= Config.current.library_path %></code></dd>
|
||||||
<dt style="font-weight: 500;">Want to change your library path?</dt>
|
<dt style="font-weight: 500;">Want to change your library path?</dt>
|
||||||
<dd>Update <code>config.yml</code> located at: <code><%= Config.current.path %></code></dd>
|
<dd>Update <code>config.yml</code> located at: <code><%= Config.current.path %></code></dd>
|
||||||
<dt style="font-weight: 500;">Can't see your files yet?</dt>
|
<dt style="font-weight: 500;">Can't see your files yet?</dt>
|
||||||
<dd>
|
<dd>
|
||||||
You must wait <%= Config.current.scan_interval %> minutes for the library scan to complete
|
You must wait <%= Config.current.scan_interval_minutes %> minutes for the library scan to complete
|
||||||
<% if is_admin %>
|
<% if is_admin %>
|
||||||
, or manually re-scan from <a href="<%= base_url %>admin">Admin</a>
|
, or manually re-scan from <a href="<%= base_url %>admin">Admin</a>
|
||||||
<% end %>.
|
<% end %>.
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%- elsif new_user && empty_library == false -%>
|
<%- elsif new_user && empty_library == false -%>
|
||||||
|
|
||||||
<div class="uk-container uk-text-center">
|
<div class="uk-container uk-text-center">
|
||||||
<i class="fas fa-book-open" style="font-size: 80px;"></i>
|
<i class="fas fa-book-open" style="font-size: 80px;"></i>
|
||||||
<h2>Read your first manga</h2>
|
<h2>Read your first manga</h2>
|
||||||
<p>Once you start reading, Mango will remember where you left off
|
<p>Once you start reading, Mango will remember where you left off
|
||||||
and show your entries here.</p>
|
and show your entries here.</p>
|
||||||
<a href="<%= base_url %>library" class="uk-button uk-button-default">View library</a>
|
<a href="<%= base_url %>library" class="uk-button uk-button-default">View library</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%- elsif new_user == false && empty_library == false -%>
|
<%- elsif new_user == false && empty_library == false -%>
|
||||||
|
|
||||||
<%- if continue_reading.empty? && recently_added.empty? -%>
|
<%- if continue_reading.empty? && recently_added.empty? -%>
|
||||||
<div class="uk-container uk-text-center">
|
<div class="uk-container uk-text-center">
|
||||||
<img src="<%= base_url %>img/banner.png" style="max-width: 400px; padding: 0 20px;">
|
<img src="<%= base_url %>img/banner.png" style="max-width: 400px; padding: 0 20px;">
|
||||||
<p>A self-hosted manga server and reader</p>
|
<p>A self-hosted manga server and reader</p>
|
||||||
<a href="<%= base_url %>library" class="uk-button uk-button-default">View library</a>
|
<a href="<%= base_url %>library" class="uk-button uk-button-default">View library</a>
|
||||||
</div>
|
</div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- unless continue_reading.empty? -%>
|
<%- unless continue_reading.empty? -%>
|
||||||
<h2 class="uk-title home-headings">Continue Reading</h2>
|
<h2 class="uk-title home-headings">Continue Reading</h2>
|
||||||
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
||||||
<%- continue_reading.each do |cr| -%>
|
<%- continue_reading.each do |cr| -%>
|
||||||
<% item = cr[:entry] %>
|
<% item = cr[:entry] %>
|
||||||
<% progress = cr[:percentage] %>
|
<% progress = cr[:percentage] %>
|
||||||
<%= render_component "card" %>
|
<%= render_component "card" %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</div>
|
</div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- unless start_reading.empty? -%>
|
<%- unless start_reading.empty? -%>
|
||||||
<h2 class="uk-title home-headings">Start Reading</h2>
|
<h2 class="uk-title home-headings">Start Reading</h2>
|
||||||
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
||||||
<%- start_reading.each do |t| -%>
|
<%- start_reading.each do |t| -%>
|
||||||
<% item = t %>
|
<% item = t %>
|
||||||
<% progress = 0.0 %>
|
<% progress = 0.0 %>
|
||||||
<%= render_component "card" %>
|
<%= render_component "card" %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</div>
|
</div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- unless recently_added.empty? -%>
|
<%- unless recently_added.empty? -%>
|
||||||
<h2 class="uk-title home-headings">Recently Added</h2>
|
<h2 class="uk-title home-headings">Recently Added</h2>
|
||||||
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
<div class="uk-child-width-1-4@m uk-child-width-1-2" uk-grid>
|
||||||
<%- recently_added.each do |ra| -%>
|
<%- recently_added.each do |ra| -%>
|
||||||
<% item = ra %>
|
<% item = ra %>
|
||||||
<% progress = ra[:percentage] %>
|
<% progress = ra[:percentage] %>
|
||||||
<%= render_component "card" %>
|
<%= render_component "card" %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</div>
|
</div>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%= render_component "entry-modal" %>
|
<%= render_component "entry-modal" %>
|
||||||
|
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<% content_for "script" do %>
|
<% content_for "script" do %>
|
||||||
<%= render_component "dots-scripts" %>
|
<%= render_component "dots-scripts" %>
|
||||||
<script src="<%= base_url %>js/alert.js"></script>
|
<script src="<%= base_url %>js/alert.js"></script>
|
||||||
<script src="<%= base_url %>js/title.js"></script>
|
<script src="<%= base_url %>js/title.js"></script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user