Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getmango/Mango
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.23.0
Choose a base ref
...
head repository: getmango/Mango
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 29, 2021

  1. Cache entries' cover_url

    Leeingnyo committed Aug 29, 2021
    Copy the full SHA
    244f97a View commit details

Commits on Aug 30, 2021

  1. Cache display_name

    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    51a47b5 View commit details
  2. Copy the full SHA
    00c9cc1 View commit details
  3. Implement library caching TitleInfo

    * Cache sum of entry progress
    * Cache cover_url
    * Cache display_name
    * Cache sort_opt
    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    4a09aee View commit details
  4. Implement sorted entries cache

    sorted_entries cached
    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    bf81a4e View commit details
  5. Add config for sorted entries cache

    optional
    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    e988a8c View commit details
  6. Set cache if enabled

    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    601346b View commit details
  7. Change kbs to mbs

    Leeingnyo committed Aug 30, 2021
    Copy the full SHA
    365f71c View commit details

Commits on Sep 3, 2021

  1. Copy the full SHA
    0a8fd99 View commit details

Commits on Sep 4, 2021

  1. Move entry specific method

    Leeingnyo committed Sep 4, 2021
    Copy the full SHA
    9e90aa1 View commit details
  2. Make entry generic

    Leeingnyo committed Sep 4, 2021
    Copy the full SHA
    5e919d3 View commit details
  3. Rename

    Leeingnyo committed Sep 4, 2021
    Copy the full SHA
    0fd7cae View commit details
  4. Copy the full SHA
    de410f4 View commit details
  5. Copy the full SHA
    847f516 View commit details
  6. Make LRUCache togglable

    Leeingnyo committed Sep 4, 2021
    Copy the full SHA
    11976b1 View commit details

Commits on Sep 5, 2021

  1. make check

    Leeingnyo committed Sep 5, 2021
    Copy the full SHA
    c75c717 View commit details
  2. Copy the full SHA
    c5b6a8b View commit details
  3. Copy the full SHA
    565a535 View commit details
  4. Copy the full SHA
    9807db6 View commit details

Commits on Sep 6, 2021

  1. Copy the full SHA
    5cb85ea View commit details
  2. Remove unused variable

    hkalexling committed Sep 6, 2021
    Copy the full SHA
    79ef7bc View commit details
  3. Copy the full SHA
    51806f1 View commit details
  4. Copy the full SHA
    15a54f4 View commit details
  5. Fix logging

    hkalexling committed Sep 6, 2021
    Copy the full SHA
    44d9c51 View commit details
  6. Copy the full SHA
    ca1e221 View commit details
  7. Document CacheEntry

    hkalexling committed Sep 6, 2021
    Copy the full SHA
    d809c21 View commit details
  8. Merge pull request #222 from Leeingnyo/feature/enhance-loading-library

    Improve loading pages (library, titles)
    hkalexling authored Sep 6, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    da8a485 View commit details
  9. Copy the full SHA
    60a1260 View commit details
  10. Copy the full SHA
    f67e4e6 View commit details

Commits on Sep 7, 2021

  1. Revert "Support all image types (resolves #192)"

    This reverts commit f67e4e6.
    hkalexling committed Sep 7, 2021
    Copy the full SHA
    d9adb49 View commit details
  2. Support additional image formats:

    - APNG
    - AVIF
    - GIF
    - SVG
    hkalexling committed Sep 7, 2021
    Copy the full SHA
    371796c View commit details

Commits on Sep 8, 2021

  1. Update .dockerignore

    lincolnthedev authored Sep 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d2cad6c View commit details
  2. Merge pull request #225 from hkalexling/feature/support-all-image-types

    Support additional image formats (resolves #192)
    hkalexling authored Sep 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0305433 View commit details
  3. Copy the full SHA
    ccf558e View commit details
  4. Forgot .github

    lincolnthedev authored Sep 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    53226ea View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    eaef055 View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    17d7cef View commit details
  7. Merge pull request #226 from lincolnthedev/master

    Better .dockerignore
    hkalexling authored Sep 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a190ae3 View commit details

Commits on Sep 9, 2021

  1. Copy the full SHA
    566cebf View commit details
  2. Merge pull request #227 from hkalexling/all-contributors/add-lincolnt…

    …hedev
    
    docs: add lincolnthedev as a contributor for infra
    hkalexling authored Sep 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e408398 View commit details
  3. Copy the full SHA
    3d295e9 View commit details
  4. Merge pull request #224 from hkalexling/fix/sanitize-download-filename

    Stricter sanitization rules for download filenames
    hkalexling authored Sep 9, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d5847bb View commit details

Commits on Sep 11, 2021

  1. Measure scan only

    Leeingnyo committed Sep 11, 2021
    Copy the full SHA
    0667f01 View commit details
  2. Copy the full SHA
    291a340 View commit details
  3. Copy the full SHA
    4409ed8 View commit details
  4. Ignore caches

    Leeingnyo committed Sep 11, 2021
    Copy the full SHA
    0a90e3b View commit details
  5. Copy the full SHA
    eb3e37b View commit details
  6. Enhance the examine method

    Leeingnyo committed Sep 11, 2021
    Copy the full SHA
    fb43abb View commit details
  7. Spawn scan job

    Leeingnyo committed Sep 11, 2021
    Copy the full SHA
    80e13ab View commit details
  8. Copy the full SHA
    e6214dd View commit details
Showing with 3,810 additions and 982 deletions.
  1. +27 −0 .all-contributorsrc
  2. +1 −0 .ameba.yml
  3. +7 −0 .dockerignore
  4. +13 −12 README.md
  5. +1 −1 gulpfile.js
  6. +94 −0 migration/sort_title.12.cr
  7. BIN public/img/{ → icons}/icon.png
  8. BIN public/img/icons/icon_x192.png
  9. BIN public/img/icons/icon_x512.png
  10. BIN public/img/icons/icon_x96.png
  11. +3 −0 public/js/admin.js
  12. +1 −1 public/js/download-manager.js
  13. +439 −126 public/js/plugin-download.js
  14. +48 −11 public/js/reader.js
  15. +147 −0 public/js/subscription-manager.js
  16. +62 −6 public/js/title.js
  17. +23 −0 public/manifest.json
  18. +5 −1 shard.lock
  19. +3 −1 shard.yml
  20. 0 spec/asset/plugins/plugin/index.js
  21. +6 −0 spec/asset/plugins/plugin/info.json
  22. +19 −2 spec/config_spec.cr
  23. +70 −0 spec/plugin_spec.cr
  24. +8 −0 spec/spec_helper.cr
  25. +10 −0 spec/util_spec.cr
  26. +46 −59 src/config.cr
  27. +24 −7 src/handlers/auth_handler.cr
  28. +8 −0 src/handlers/cors_handler.cr
  29. +111 −0 src/library/archive_entry.cr
  30. +218 −0 src/library/cache.cr
  31. +132 −0 src/library/dir_entry.cr
  32. +126 −120 src/library/entry.cr
  33. +149 −41 src/library/library.cr
  34. +351 −64 src/library/title.cr
  35. +27 −2 src/library/types.cr
  36. +1 −0 src/logger.cr
  37. +4 −1 src/mango.cr
  38. +3 −8 src/plugin/downloader.cr
  39. +183 −27 src/plugin/plugin.cr
  40. +115 −0 src/plugin/subscriptions.cr
  41. +75 −0 src/plugin/updater.cr
  42. +8 −2 src/queue.cr
  43. +9 −4 src/routes/admin.cr
  44. +588 −30 src/routes/api.cr
  45. +9 −13 src/routes/main.cr
  46. +1 −0 src/routes/reader.cr
  47. +11 −0 src/server.cr
  48. +91 −3 src/storage.cr
  49. +0 −83 src/subscription.cr
  50. +46 −1 src/util/signature.cr
  51. +78 −10 src/util/util.cr
  52. +54 −2 src/util/web.cr
  53. +1 −0 src/views/admin.html.ecr
  54. +3 −1 src/views/components/card.html.ecr
  55. +1 −0 src/views/components/head.html.ecr
  56. +0 −6 src/views/download-manager.html.ecr
  57. +0 −162 src/views/download.html.ecr
  58. +7 −5 src/views/layout.html.ecr
  59. +1 −0 src/views/library.html.ecr
  60. +0 −39 src/views/mangadex.html.ecr
  61. +1 −1 src/views/opds/title.xml.ecr
  62. +199 −60 src/views/plugin-download.html.ecr
  63. +1 −1 src/views/reader-error.html.ecr
  64. +29 −12 src/views/reader.html.ecr
  65. +101 −0 src/views/subscription-manager.html.ecr
  66. +0 −54 src/views/subscription.html.ecr
  67. +11 −3 src/views/title.html.ecr
27 changes: 27 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -104,6 +104,33 @@
"contributions": [
"infra"
]
},
{
"login": "lincolnthedev",
"name": "i use arch btw",
"avatar_url": "https://avatars.githubusercontent.com/u/41193328?v=4",
"profile": "https://lncn.dev",
"contributions": [
"infra"
]
},
{
"login": "BradleyDS2",
"name": "BradleyDS2",
"avatar_url": "https://avatars.githubusercontent.com/u/2174921?v=4",
"profile": "https://github.com/BradleyDS2",
"contributions": [
"doc"
]
},
{
"login": "nduja",
"name": "Robbo",
"avatar_url": "https://avatars.githubusercontent.com/u/69299134?v=4",
"profile": "https://github.com/nduja",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
1 change: 1 addition & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -12,3 +12,4 @@ Layout/LineLength:
MaxLength: 80
Excluded:
- src/routes/api.cr
- spec/plugin_spec.cr
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
node_modules
lib
Dockerfile
Dockerfile.arm32v7
Dockerfile.arm64v8
README.md
.all-contributorsrc
env.example
.github/
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ Mango is a self-hosted manga server and reader. Its features include
- Supports nested folders in library
- Automatically stores reading progress
- Thumbnail generation
- Supports [plugins](https://github.com/hkalexling/mango-plugins) to download from thrid-party sites
- Supports [plugins](https://github.com/hkalexling/mango-plugins) to download from third-party sites
- The web reader is responsive and works well on mobile, so there is no need for a mobile app
- All the static files are embedded in the binary, so the deployment process is easy and painless

@@ -51,7 +51,7 @@ The official docker images are available on [Dockerhub](https://hub.docker.com/r
### CLI

```
Mango - Manga Server and Web Reader. Version 0.23.0
Mango - Manga Server and Web Reader. Version 0.27.0
Usage:
@@ -80,29 +80,27 @@ base_url: /
session_secret: mango-session-secret
library_path: ~/mango/library
db_path: ~/mango/mango.db
queue_db_path: ~/mango/queue.db
scan_interval_minutes: 5
thumbnail_generation_interval_hours: 24
log_level: info
upload_path: ~/mango/uploads
plugin_path: ~/mango/plugins
download_timeout_seconds: 30
library_cache_path: ~/mango/library.yml.gz
cache_enabled: true
cache_size_mbs: 50
cache_log_enabled: true
disable_login: false
default_username: ""
auth_proxy_header_name: ""
mangadex:
base_url: https://mangadex.org
api_url: https://api.mangadex.org/v2
download_wait_seconds: 5
download_retries: 4
download_queue_db_path: ~/mango/queue.db
chapter_rename_rule: '[Vol.{volume} ][Ch.{chapter} ]{title|id}'
manga_rename_rule: '{title}'
subscription_update_interval_hours: 24
plugin_update_interval_hours: 24
```
- `scan_interval_minutes`, `thumbnail_generation_interval_hours` and `db_optimization_interval_hours` can be any non-negative integer. Setting them to `0` disables the periodic tasks
- `scan_interval_minutes`, `thumbnail_generation_interval_hours`, and `plugin_update_interval_hours` can be any non-negative integer. Setting them to `0` disables the periodic tasks
- `log_level` can be `debug`, `info`, `warn`, `error`, `fatal` or `off`. Setting it to `off` disables the logging
- You can disable authentication by setting `disable_login` to true. Note that `default_username` must be set to an existing username for this to work.
- By setting `cache_enabled` to `true`, you can enable an experimental feature where Mango caches library metadata to improve page load time. You can further fine-tune the feature with `cache_size_mbs` and `cache_log_enabled`.

### Library Structure

@@ -174,6 +172,9 @@ Please check the [development guideline](https://github.com/hkalexling/Mango/wik
<td align="center"><a href="https://github.com/Leeingnyo"><img src="https://avatars0.githubusercontent.com/u/6760150?v=4?s=100" width="100px;" alt=""/><br /><sub><b>이인용</b></sub></a><br /><a href="https://github.com/hkalexling/Mango/commits?author=Leeingnyo" title="Code">💻</a></td>
<td align="center"><a href="http://h45h74x.eu.org"><img src="https://avatars1.githubusercontent.com/u/27204033?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Simon</b></sub></a><br /><a href="https://github.com/hkalexling/Mango/commits?author=h45h74x" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/davidkna"><img src="https://avatars.githubusercontent.com/u/835177?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Knaack</b></sub></a><br /><a href="#infra-davidkna" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://lncn.dev"><img src="https://avatars.githubusercontent.com/u/41193328?v=4?s=100" width="100px;" alt=""/><br /><sub><b>i use arch btw</b></sub></a><br /><a href="#infra-lincolnthedev" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://github.com/BradleyDS2"><img src="https://avatars.githubusercontent.com/u/2174921?v=4?s=100" width="100px;" alt=""/><br /><sub><b>BradleyDS2</b></sub></a><br /><a href="https://github.com/hkalexling/Mango/commits?author=BradleyDS2" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/nduja"><img src="https://avatars.githubusercontent.com/u/69299134?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Robbo</b></sub></a><br /><a href="https://github.com/hkalexling/Mango/commits?author=nduja" title="Code">💻</a></td>
</tr>
</table>

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ gulp.task('minify-css', () => {
gulp.task('copy-files', () => {
return gulp.src([
'public/*.*',
'public/img/*',
'public/img/**',
'public/webfonts/*',
'public/js/*.min.js'
], {
94 changes: 94 additions & 0 deletions migration/sort_title.12.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
class SortTitle < MG::Base
def up : String
<<-SQL
-- add sort_title column to ids and titles
ALTER TABLE ids ADD COLUMN sort_title TEXT;
ALTER TABLE titles ADD COLUMN sort_title TEXT;
SQL
end

def down : String
<<-SQL
-- remove sort_title column from ids
ALTER TABLE ids RENAME TO tmp;
CREATE TABLE ids (
path TEXT NOT NULL,
id TEXT NOT NULL,
signature TEXT,
unavailable INTEGER NOT NULL DEFAULT 0
);
INSERT INTO ids
SELECT path, id, signature, unavailable
FROM tmp;
DROP TABLE tmp;
-- recreate the indices
CREATE UNIQUE INDEX path_idx ON ids (path);
CREATE UNIQUE INDEX id_idx ON ids (id);
-- recreate the foreign key constraint on thumbnails
ALTER TABLE thumbnails RENAME TO tmp;
CREATE TABLE thumbnails (
id TEXT NOT NULL,
data BLOB NOT NULL,
filename TEXT NOT NULL,
mime TEXT NOT NULL,
size INTEGER NOT NULL,
FOREIGN KEY (id) REFERENCES ids (id)
ON UPDATE CASCADE
ON DELETE CASCADE
);
INSERT INTO thumbnails
SELECT * FROM tmp;
DROP TABLE tmp;
CREATE UNIQUE INDEX tn_index ON thumbnails (id);
-- remove sort_title column from titles
ALTER TABLE titles RENAME TO tmp;
CREATE TABLE titles (
id TEXT NOT NULL,
path TEXT NOT NULL,
signature TEXT,
unavailable INTEGER NOT NULL DEFAULT 0
);
INSERT INTO titles
SELECT id, path, signature, unavailable
FROM tmp;
DROP TABLE tmp;
-- recreate the indices
CREATE UNIQUE INDEX titles_id_idx on titles (id);
CREATE UNIQUE INDEX titles_path_idx on titles (path);
-- recreate the foreign key constraint on tags
ALTER TABLE tags RENAME TO tmp;
CREATE TABLE tags (
id TEXT NOT NULL,
tag TEXT NOT NULL,
UNIQUE (id, tag),
FOREIGN KEY (id) REFERENCES titles (id)
ON UPDATE CASCADE
ON DELETE CASCADE
);
INSERT INTO tags
SELECT * FROM tmp;
DROP TABLE tmp;
CREATE INDEX tags_id_idx ON tags (id);
CREATE INDEX tags_tag_idx ON tags (tag);
SQL
end
end
File renamed without changes
Binary file added public/img/icons/icon_x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/icons/icon_x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/js/admin.js
Original file line number Diff line number Diff line change
@@ -31,6 +31,9 @@ const component = () => {
this.scanMs = data.milliseconds;
this.scanTitles = data.titles;
})
.catch(e => {
alert('danger', `Failed to trigger a scan. Error: ${e}`);
})
.always(() => {
this.scanning = false;
});
2 changes: 1 addition & 1 deletion public/js/download-manager.js
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ const component = () => {
jobAction(action, event) {
let url = `${base_url}api/admin/mangadex/queue/${action}`;
if (event) {
const id = event.currentTarget.closest('tr').id.split('-')[1];
const id = event.currentTarget.closest('tr').id.split('-').slice(1).join('-');
url = `${url}?${$.param({
id: id
})}`;
Loading