daydreamer-json
commited on
Update
Browse files- db/master.json +9 -7
- index.html +206 -37
- script.js +388 -4
- style.css +136 -0
db/master.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
"versionMajor": 0,
|
4 |
"versionMinor": 0,
|
5 |
"versionPatch": 1,
|
6 |
-
"updateDateUnixMs":
|
7 |
},
|
8 |
"data": {
|
9 |
"artists": [
|
@@ -207,19 +207,19 @@
|
|
207 |
"width": 3000,
|
208 |
"height": 3000,
|
209 |
"fileName": "cover_3000px",
|
210 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"}]
|
211 |
},
|
212 |
{
|
213 |
"width": 1024,
|
214 |
"height": 1024,
|
215 |
"fileName": "cover_1024px",
|
216 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"},{"name":"PNG","extension":"png"}]
|
217 |
},
|
218 |
{
|
219 |
"width": 512,
|
220 |
"height": 512,
|
221 |
"fileName": "cover_512px",
|
222 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"},{"name":"PNG","extension":"png"}]
|
223 |
}
|
224 |
],
|
225 |
"albums": [
|
@@ -257,6 +257,7 @@
|
|
257 |
],
|
258 |
"isCoverArtsUseDefault": true,
|
259 |
"coverArts": null,
|
|
|
260 |
"tracks": [
|
261 |
{
|
262 |
"uuid": "018d2827-8ae1-7a2d-823e-2557a01e70ca",
|
@@ -467,21 +468,22 @@
|
|
467 |
"width": 2598,
|
468 |
"height": 2598,
|
469 |
"fileName": "cover_2598px",
|
470 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"}]
|
471 |
},
|
472 |
{
|
473 |
"width": 1024,
|
474 |
"height": 1024,
|
475 |
"fileName": "cover_1024px",
|
476 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"},{"name":"PNG","extension":"png"}]
|
477 |
},
|
478 |
{
|
479 |
"width": 512,
|
480 |
"height": 512,
|
481 |
"fileName": "cover_512px",
|
482 |
-
"format": [{"name":"WebP","extension":"webp"},{"name":"JPEG","extension":"jpg"},{"name":"PNG","extension":"png"}]
|
483 |
}
|
484 |
],
|
|
|
485 |
"tracks": [
|
486 |
{
|
487 |
"uuid": "018d5a93-6d52-7deb-9fff-9a9ae28fe127",
|
|
|
3 |
"versionMajor": 0,
|
4 |
"versionMinor": 0,
|
5 |
"versionPatch": 1,
|
6 |
+
"updateDateUnixMs": 1706629503156
|
7 |
},
|
8 |
"data": {
|
9 |
"artists": [
|
|
|
207 |
"width": 3000,
|
208 |
"height": 3000,
|
209 |
"fileName": "cover_3000px",
|
210 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"}]
|
211 |
},
|
212 |
{
|
213 |
"width": 1024,
|
214 |
"height": 1024,
|
215 |
"fileName": "cover_1024px",
|
216 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"},{"name":"PNG","extension":"png","mime":"image/png"}]
|
217 |
},
|
218 |
{
|
219 |
"width": 512,
|
220 |
"height": 512,
|
221 |
"fileName": "cover_512px",
|
222 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"},{"name":"PNG","extension":"png","mime":"image/png"}]
|
223 |
}
|
224 |
],
|
225 |
"albums": [
|
|
|
257 |
],
|
258 |
"isCoverArtsUseDefault": true,
|
259 |
"coverArts": null,
|
260 |
+
"coverArtPotatoWebp16pxBase64": "UklGRowAAABXRUJQVlA4IIAAAABQAgCdASoQABAAAsBMJYwAD5MvSBcueurPeYAA/vdB1/AOtMGFAR0sdsKjS7GlyVx426V9Xhs0vXhikzrPL9vaY3slLZSx/vyoSYMNteGkZWn0tn/nc456PA7wdkjRAyYS04Zl+Zxuxr/8F0kUQ/kspmZVIQiAHEmy+z7gcgAAAA==",
|
261 |
"tracks": [
|
262 |
{
|
263 |
"uuid": "018d2827-8ae1-7a2d-823e-2557a01e70ca",
|
|
|
468 |
"width": 2598,
|
469 |
"height": 2598,
|
470 |
"fileName": "cover_2598px",
|
471 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"}]
|
472 |
},
|
473 |
{
|
474 |
"width": 1024,
|
475 |
"height": 1024,
|
476 |
"fileName": "cover_1024px",
|
477 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"},{"name":"PNG","extension":"png","mime":"image/png"}]
|
478 |
},
|
479 |
{
|
480 |
"width": 512,
|
481 |
"height": 512,
|
482 |
"fileName": "cover_512px",
|
483 |
+
"format": [{"name":"WebP","extension":"webp","mime":"image/webp"},{"name":"JPEG","extension":"jpg","mime":"image/jpeg"},{"name":"PNG","extension":"png","mime":"image/png"}]
|
484 |
}
|
485 |
],
|
486 |
+
"coverArtPotatoWebp16pxBase64": "UklGRnAAAABXRUJQVlA4IGQAAAAQAgCdASoQABAAAsBMJZgC7AD8C9+6gN4AAP5mCY0LAgpQjA8Um1U9cx8pReol1/HXjEkHhLTLMwUc4BRGwQQbf0Afs0ghTkqkaU/hQtFDrkr1AV2fRU4KdUZ+HfaFVvgk4AAA",
|
487 |
"tracks": [
|
488 |
{
|
489 |
"uuid": "018d5a93-6d52-7deb-9fff-9a9ae28fe127",
|
index.html
CHANGED
@@ -11,21 +11,31 @@
|
|
11 |
<script src="https://cdn.jsdelivr.net/npm/moment@2/moment.min.js"></script>
|
12 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js"></script>
|
13 |
<script src="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/cdn/with-layouts/vidstack.js" type="module"></script>
|
|
|
14 |
<!-- CSS load -->
|
15 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
|
16 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
|
17 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/player/styles/default/theme.min.css">
|
18 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/player/styles/default/layouts/audio.min.css">
|
19 |
<link rel="preconnect" href="https://rsms.me">
|
20 |
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
|
|
21 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css">
|
22 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
23 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
24 |
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100;
|
25 |
<link rel="stylesheet" href="style.css">
|
26 |
</head>
|
27 |
<body>
|
28 |
-
<div id="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<h1 class="user-select-none text-center">discography_v2_cdn_front</h1>
|
30 |
<hr class="my-4">
|
31 |
<button id="showSettingsModalButton" class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#settingsModal"><i class="bi bi-gear-wide-connected me-1"></i>Settings</button>
|
@@ -37,26 +47,6 @@
|
|
37 |
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
38 |
</div>
|
39 |
<div class="modal-body">
|
40 |
-
<!-- <ul class="nav nav-tabs" id="myTab" role="tablist">
|
41 |
-
<li class="nav-item" role="presentation">
|
42 |
-
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home-tab-pane" type="button" role="tab" aria-controls="home-tab-pane" aria-selected="true">Home</button>
|
43 |
-
</li>
|
44 |
-
<li class="nav-item" role="presentation">
|
45 |
-
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile-tab-pane" type="button" role="tab" aria-controls="profile-tab-pane" aria-selected="false">Profile</button>
|
46 |
-
</li>
|
47 |
-
<li class="nav-item" role="presentation">
|
48 |
-
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact-tab-pane" type="button" role="tab" aria-controls="contact-tab-pane" aria-selected="false">Contact</button>
|
49 |
-
</li>
|
50 |
-
<li class="nav-item" role="presentation">
|
51 |
-
<button class="nav-link" id="disabled-tab" data-bs-toggle="tab" data-bs-target="#disabled-tab-pane" type="button" role="tab" aria-controls="disabled-tab-pane" aria-selected="false" disabled>Disabled</button>
|
52 |
-
</li>
|
53 |
-
</ul>
|
54 |
-
<div class="tab-content" id="myTabContent">
|
55 |
-
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel" aria-labelledby="home-tab" tabindex="0">...</div>
|
56 |
-
<div class="tab-pane fade" id="profile-tab-pane" role="tabpanel" aria-labelledby="profile-tab" tabindex="0">...</div>
|
57 |
-
<div class="tab-pane fade" id="contact-tab-pane" role="tabpanel" aria-labelledby="contact-tab" tabindex="0">...</div>
|
58 |
-
<div class="tab-pane fade" id="disabled-tab-pane" role="tabpanel" aria-labelledby="disabled-tab" tabindex="0">...</div>
|
59 |
-
</div> -->
|
60 |
<h1 class="fs-3">UI</h1>
|
61 |
<form id="settingsUiSwitchUiMode" class="d-flex justify-content-between align-items-center">
|
62 |
<label>Switch UI mode</label>
|
@@ -76,7 +66,18 @@
|
|
76 |
</div>
|
77 |
</div>
|
78 |
<hr class="my-4">
|
79 |
-
<h3 class="user-select-none">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<div class="fetchingDataNowLabel user-select-none d-none">
|
81 |
<div class="d-inline-flex align-items-center mb-3">
|
82 |
<div class="spinner-border text-primary me-2" role="status">
|
@@ -92,13 +93,84 @@
|
|
92 |
<div class="flex-fill w-100">Track</div>
|
93 |
</button>
|
94 |
</div>
|
95 |
-
<div class="modal fade user-select-none" id="
|
96 |
<div class="modal-dialog modal-lg modal-fullscreen-md-down modal-dialog-scrollable">
|
97 |
<div class="modal-content">
|
98 |
<div class="modal-header">
|
99 |
-
<h1 class="modal-title fs-5" id="
|
100 |
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
101 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
<div class="modal-body">
|
103 |
<h3>Direct Download</h3>
|
104 |
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
@@ -106,17 +178,7 @@
|
|
106 |
</tbody>
|
107 |
</table>
|
108 |
<h3>Preview</h3>
|
109 |
-
|
110 |
-
<tbody id="trackInfoModal-previewTable">
|
111 |
-
<tr>
|
112 |
-
<td>FLAC</td>
|
113 |
-
<td class="w-100">
|
114 |
-
<audio class="w-100 align-middle" controls controlslist="nodownload" src="https://hf.co/datasets/DeliberatorArchiver/discography_v2_cdn/resolve/main/media/018d269e-89c0-7371-b748-79730286a132/flac/018d2827-8ae1-7a2d-823e-2558c99d6eed.flac"></audio>
|
115 |
-
</td>
|
116 |
-
</tr>
|
117 |
-
</tbody>
|
118 |
-
</table> -->
|
119 |
-
<audio id="trackInfoModal-previewAudio" class="w-100 align-middle text-center mb-3" controls controlslist="nodownload" src=""></audio>
|
120 |
<h3>Metadata</h3>
|
121 |
<h4>General</h4>
|
122 |
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
@@ -204,7 +266,114 @@
|
|
204 |
</div>
|
205 |
</div>
|
206 |
<div class="modal-footer">
|
207 |
-
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
</div>
|
209 |
</div>
|
210 |
</div>
|
|
|
11 |
<script src="https://cdn.jsdelivr.net/npm/moment@2/moment.min.js"></script>
|
12 |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js"></script>
|
13 |
<script src="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/cdn/with-layouts/vidstack.js" type="module"></script>
|
14 |
+
<script src="https://cdn.jsdelivr.net/npm/lazysizes@5.3.2/lazysizes.min.js"></script>
|
15 |
<!-- CSS load -->
|
16 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
|
17 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
18 |
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/fontawesome.min.css">
|
19 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/player/styles/default/theme.min.css">
|
20 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vidstack@1.0.0/player/styles/default/layouts/audio.min.css">
|
21 |
<link rel="preconnect" href="https://rsms.me">
|
22 |
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
23 |
+
<link rel="preconnect" href="https://cdn.jsdelivr.net">
|
24 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css">
|
25 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
26 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
27 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap">
|
28 |
<link rel="stylesheet" href="style.css">
|
29 |
</head>
|
30 |
<body>
|
31 |
+
<div id="fsOverlayLoadingScr" class="">
|
32 |
+
<div id="fsOverlayLoadingScr_loadingSpinner">
|
33 |
+
<svg class="fsOverlayLoadingScr_loadingCircular">
|
34 |
+
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
|
35 |
+
</svg>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<div id="mainContainer" class="container px-4 my-4">
|
39 |
<h1 class="user-select-none text-center">discography_v2_cdn_front</h1>
|
40 |
<hr class="my-4">
|
41 |
<button id="showSettingsModalButton" class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#settingsModal"><i class="bi bi-gear-wide-connected me-1"></i>Settings</button>
|
|
|
47 |
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
48 |
</div>
|
49 |
<div class="modal-body">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<h1 class="fs-3">UI</h1>
|
51 |
<form id="settingsUiSwitchUiMode" class="d-flex justify-content-between align-items-center">
|
52 |
<label>Switch UI mode</label>
|
|
|
66 |
</div>
|
67 |
</div>
|
68 |
<hr class="my-4">
|
69 |
+
<h3 class="mb-3 user-select-none">Album List</h3>
|
70 |
+
<div class="fetchingDataNowLabel user-select-none d-none">
|
71 |
+
<div class="d-inline-flex align-items-center mb-3">
|
72 |
+
<div class="spinner-border text-primary me-2" role="status">
|
73 |
+
<span class="visually-hidden">Loading...</span>
|
74 |
+
</div>
|
75 |
+
<span>Fetching data ...</span>
|
76 |
+
</div>
|
77 |
+
</div>
|
78 |
+
<div id="albumAllCardGroup" class="row row-cols-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 g-4 user-select-none"></div>
|
79 |
+
<hr class="my-4">
|
80 |
+
<h3 class="mb-3 user-select-none">Track List</h3>
|
81 |
<div class="fetchingDataNowLabel user-select-none d-none">
|
82 |
<div class="d-inline-flex align-items-center mb-3">
|
83 |
<div class="spinner-border text-primary me-2" role="status">
|
|
|
93 |
<div class="flex-fill w-100">Track</div>
|
94 |
</button>
|
95 |
</div>
|
96 |
+
<div class="modal fade user-select-none" data-bs-backdrop="static" data-bs-keyboard="false" id="albumInfoModal" tabindex="-1">
|
97 |
<div class="modal-dialog modal-lg modal-fullscreen-md-down modal-dialog-scrollable">
|
98 |
<div class="modal-content">
|
99 |
<div class="modal-header">
|
100 |
+
<h1 class="modal-title fs-5" id="albumInfoModalLabel"><i class="bi bi-file-earmark-music me-2"></i>Album Info</h1>
|
101 |
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
102 |
</div>
|
103 |
+
<div class="modal-body">
|
104 |
+
<h3>Metadata</h3>
|
105 |
+
<h4>General</h4>
|
106 |
+
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
107 |
+
<tbody>
|
108 |
+
<tr>
|
109 |
+
<td>Album Title</td>
|
110 |
+
<td id="albumInfoModal-metadataTable-albumTitle">---</td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td>Album Artist</td>
|
114 |
+
<td id="albumInfoModal-metadataTable-albumArtist">---</td>
|
115 |
+
</tr>
|
116 |
+
<tr>
|
117 |
+
<td>Album Released</td>
|
118 |
+
<td id="albumInfoModal-metadataTable-albumReleaseDate">YYYY/MM/DD</td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<td>Album Barcode</td>
|
122 |
+
<td id="albumInfoModal-metadataTable-albumBarcode">Sample Number</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td>Album Copyright</td>
|
126 |
+
<td id="albumInfoModal-metadataTable-albumCopyright">---</td>
|
127 |
+
</tr>
|
128 |
+
</tbody>
|
129 |
+
</table>
|
130 |
+
<h4>Track List</h4>
|
131 |
+
<div id="albumInfoModal-trackAllListGroup" class="list-group user-select-none mb-4">
|
132 |
+
<!-- <button type="button" class="list-group-item list-group-item-action d-flex" disabled>
|
133 |
+
<div class="flex-fill w-100">Artist</div>
|
134 |
+
<div class="flex-fill w-100">Track</div>
|
135 |
+
</button> -->
|
136 |
+
</div>
|
137 |
+
<h4>External Links</h4>
|
138 |
+
<table id="albumInfoModal-externalLinkTableRoot" class="table table-sm table-responsive table-hover table-borderless align-middle">
|
139 |
+
<tbody id="albumInfoModal-externalLinkTable">
|
140 |
+
</tbody>
|
141 |
+
</table>
|
142 |
+
<h4>Cover Artwork Images</h4>
|
143 |
+
<div class="mb-3" id="albumInfoModal-coverArtLinkDiv">
|
144 |
+
</div>
|
145 |
+
<div id="debugAreaSection" class="d-none">
|
146 |
+
<h3>Debug Area</h3>
|
147 |
+
<div class="accordion" id="albumInfoModal-DebugAcd">
|
148 |
+
<div class="accordion-item">
|
149 |
+
<h2 class="accordion-header">
|
150 |
+
<button class="accordion-button collapsed user-select-none" type="button" data-bs-toggle="collapse" data-bs-target="#albumInfoModal-DebugAcdInCollapse">Parsed data output (album)</button>
|
151 |
+
</h2>
|
152 |
+
<div id="albumInfoModal-DebugAcdInCollapse" class="accordion-collapse collapse" data-bs-parent="#albumInfoModal-DebugAcd">
|
153 |
+
<div class="accordion-body">
|
154 |
+
<pre class=""><code id="albumInfoModal-DebugAcdOutputEl"></code></pre>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<div class="modal-footer">
|
162 |
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
<div class="modal fade user-select-none" data-bs-backdrop="static" data-bs-keyboard="false" id="trackInfoModal" tabindex="-1">
|
168 |
+
<div class="modal-dialog modal-lg modal-fullscreen-md-down modal-dialog-scrollable">
|
169 |
+
<div class="modal-content">
|
170 |
+
<div class="modal-header">
|
171 |
+
<h1 class="modal-title fs-5" id="trackInfoModalLabel"><i class="bi bi-file-earmark-music me-2"></i>Track Info</h1>
|
172 |
+
<button type="button" id="trackInfoModal-ModalCloseIconButton" class="btn-close" data-bs-dismiss="modal"></button>
|
173 |
+
</div>
|
174 |
<div class="modal-body">
|
175 |
<h3>Direct Download</h3>
|
176 |
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
|
|
178 |
</tbody>
|
179 |
</table>
|
180 |
<h3>Preview</h3>
|
181 |
+
<audio id="trackInfoModal-previewAudio" class="w-100 align-middle text-center mb-3" controls controlslist="nodownload" preload="none" src=""></audio>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
<h3>Metadata</h3>
|
183 |
<h4>General</h4>
|
184 |
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
|
|
266 |
</div>
|
267 |
</div>
|
268 |
<div class="modal-footer">
|
269 |
+
<button type="button" id="trackInfoModal-ModalCloseButton" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
270 |
+
</div>
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
<div class="modal fade user-select-none" data-bs-backdrop="static" data-bs-keyboard="false" id="trackInfoModal2" tabindex="-1">
|
275 |
+
<div class="modal-dialog modal-lg modal-fullscreen-md-down modal-dialog-scrollable">
|
276 |
+
<div class="modal-content">
|
277 |
+
<div class="modal-header">
|
278 |
+
<h1 class="modal-title fs-5" id="trackInfoModal2Label"><i class="bi bi-file-earmark-music me-2"></i>Track Info</h1>
|
279 |
+
<button type="button" id="trackInfoModal2-ModalCloseIconButton" class="btn-close" data-bs-target="#albumInfoModal" data-bs-toggle="modal"></button>
|
280 |
+
</div>
|
281 |
+
<div class="modal-body">
|
282 |
+
<h3>Direct Download</h3>
|
283 |
+
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
284 |
+
<tbody id="trackInfoModal2-downloadTable">
|
285 |
+
</tbody>
|
286 |
+
</table>
|
287 |
+
<h3>Preview</h3>
|
288 |
+
<audio id="trackInfoModal2-previewAudio" class="w-100 align-middle text-center mb-3" controls controlslist="nodownload" preload="none" src=""></audio>
|
289 |
+
<h3>Metadata</h3>
|
290 |
+
<h4>General</h4>
|
291 |
+
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
292 |
+
<tbody>
|
293 |
+
<tr>
|
294 |
+
<td>Track Title</td>
|
295 |
+
<td id="trackInfoModal2-metadataTable-trackTitle">---</td>
|
296 |
+
</tr>
|
297 |
+
<tr>
|
298 |
+
<td>Artists</td>
|
299 |
+
<td id="trackInfoModal2-metadataTable-artists">---</td>
|
300 |
+
</tr>
|
301 |
+
<tr>
|
302 |
+
<td>Lyricist</td>
|
303 |
+
<td id="trackInfoModal2-metadataTable-lyricist">---</td>
|
304 |
+
</tr>
|
305 |
+
<tr>
|
306 |
+
<td>Composer</td>
|
307 |
+
<td id="trackInfoModal2-metadataTable-composer">---</td>
|
308 |
+
</tr>
|
309 |
+
<tr>
|
310 |
+
<td>Arranger</td>
|
311 |
+
<td id="trackInfoModal2-metadataTable-arranger">---</td>
|
312 |
+
</tr>
|
313 |
+
<tr>
|
314 |
+
<td>Track Duration (Readable)</td>
|
315 |
+
<td id="trackInfoModal2-metadataTable-trackDurationReadable">---</td>
|
316 |
+
</tr>
|
317 |
+
<tr>
|
318 |
+
<td>Track Duration (MS)</td>
|
319 |
+
<td id="trackInfoModal2-metadataTable-trackDurationMsec">---</td>
|
320 |
+
</tr>
|
321 |
+
<tr>
|
322 |
+
<td>Track Duration (Samples)</td>
|
323 |
+
<td id="trackInfoModal2-metadataTable-trackDurationSamples">---</td>
|
324 |
+
</tr>
|
325 |
+
</tbody>
|
326 |
+
</table>
|
327 |
+
<table class="table table-sm table-responsive table-hover table-borderless align-middle">
|
328 |
+
<tbody>
|
329 |
+
<tr>
|
330 |
+
<td>Album Title</td>
|
331 |
+
<td id="trackInfoModal2-metadataTable-albumTitle">---</td>
|
332 |
+
</tr>
|
333 |
+
<tr>
|
334 |
+
<td>Album Artist</td>
|
335 |
+
<td id="trackInfoModal2-metadataTable-albumArtist">---</td>
|
336 |
+
</tr>
|
337 |
+
<tr>
|
338 |
+
<td>Album Released</td>
|
339 |
+
<td id="trackInfoModal2-metadataTable-albumReleaseDate">YYYY/MM/DD</td>
|
340 |
+
</tr>
|
341 |
+
<tr>
|
342 |
+
<td>Album Barcode</td>
|
343 |
+
<td id="trackInfoModal2-metadataTable-albumBarcode">Sample Number</td>
|
344 |
+
</tr>
|
345 |
+
<tr>
|
346 |
+
<td>Album Copyright</td>
|
347 |
+
<td id="trackInfoModal2-metadataTable-albumCopyright">---</td>
|
348 |
+
</tr>
|
349 |
+
</tbody>
|
350 |
+
</table>
|
351 |
+
<h4>External Links</h4>
|
352 |
+
<table id="trackInfoModal2-externalLinkTableRoot" class="table table-sm table-responsive table-hover table-borderless align-middle">
|
353 |
+
<tbody id="trackInfoModal2-externalLinkTable">
|
354 |
+
</tbody>
|
355 |
+
</table>
|
356 |
+
<h4>Cover Artwork Images</h4>
|
357 |
+
<div class="mb-3" id="trackInfoModal2-coverArtLinkDiv">
|
358 |
+
</div>
|
359 |
+
<div id="debugAreaSection" class="d-none">
|
360 |
+
<h3>Debug Area</h3>
|
361 |
+
<div class="accordion" id="trackInfoModal2-DebugAcd">
|
362 |
+
<div class="accordion-item">
|
363 |
+
<h2 class="accordion-header">
|
364 |
+
<button class="accordion-button collapsed user-select-none" type="button" data-bs-toggle="collapse" data-bs-target="#trackInfoModal2-DebugAcdInCollapse">Parsed data output (album)</button>
|
365 |
+
</h2>
|
366 |
+
<div id="trackInfoModal2-DebugAcdInCollapse" class="accordion-collapse collapse" data-bs-parent="#trackInfoModal2-DebugAcd">
|
367 |
+
<div class="accordion-body">
|
368 |
+
<pre class=""><code id="trackInfoModal2-DebugAcdOutputEl"></code></pre>
|
369 |
+
</div>
|
370 |
+
</div>
|
371 |
+
</div>
|
372 |
+
</div>
|
373 |
+
</div>
|
374 |
+
</div>
|
375 |
+
<div class="modal-footer">
|
376 |
+
<button type="button" id="trackInfoModal2-ModalCloseButton" class="btn btn-secondary" data-bs-target="#albumInfoModal" data-bs-toggle="modal">Close</button>
|
377 |
</div>
|
378 |
</div>
|
379 |
</div>
|
script.js
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
const internalConfig = {
|
2 |
'network': {
|
3 |
'userAgent': {
|
@@ -20,6 +22,7 @@ const appSettingsSaveDataDefault = {
|
|
20 |
};
|
21 |
let apiDataMasterDB = new Object();
|
22 |
let apiDataConfig = new Object();
|
|
|
23 |
|
24 |
//!========== ページ読み込み時に実行する処理 ==========
|
25 |
|
@@ -44,6 +47,8 @@ window.addEventListener('load', async function(){
|
|
44 |
await loadRequiredDatabase();
|
45 |
await decryptConfig();
|
46 |
pushToTrackListGroupUi();
|
|
|
|
|
47 |
});
|
48 |
|
49 |
document.querySelector('#loadDatabaseTestButton').addEventListener('click', async function() {
|
@@ -57,6 +62,17 @@ document.querySelector('#trackListingTestButton').addEventListener('click', () =
|
|
57 |
pushToTrackListGroupUi();
|
58 |
});
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
// ========== 全てのトラックのリストをTrack Listing TestのListGroupに表示 ==========
|
61 |
|
62 |
function pushToTrackListGroupUi () {
|
@@ -112,9 +128,49 @@ function pushToTrackListGroupUi () {
|
|
112 |
});
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
// ========== trackInfoModalの処理 ==========
|
116 |
|
117 |
-
let bootstrapTooltipList = null;
|
118 |
function loadTrackInfoModal (trackUuid) {
|
119 |
const albumParsedObject = getParsedAlbumObjectFromAlbumUuid(getAlbumUuidFromTrackUuid(trackUuid));
|
120 |
const trackParsedObject = albumParsedObject.tracks.find((obj) => obj.uuid === trackUuid);
|
@@ -219,7 +275,7 @@ function loadTrackInfoModal (trackUuid) {
|
|
219 |
let temp_extLinkAlbumA2El = document.createElement('a');
|
220 |
temp_extLinkAlbumTdKeyEl.innerHTML = 'Album Link';
|
221 |
if (albumParsedObject.link.itunes !== null) {
|
222 |
-
temp_extLinkAlbumA1El.classList.add('btn','btn-outline-primary','btn-sm','me-
|
223 |
temp_extLinkAlbumA1El.setAttribute('href', `https://music.apple.com/album/${albumParsedObject.link.itunes}`);
|
224 |
temp_extLinkAlbumA1El.setAttribute('role', 'button');
|
225 |
temp_extLinkAlbumA1El.setAttribute('target', '_blank');
|
@@ -228,7 +284,7 @@ function loadTrackInfoModal (trackUuid) {
|
|
228 |
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA1El);
|
229 |
}
|
230 |
if (albumParsedObject.link.spotify !== null) {
|
231 |
-
temp_extLinkAlbumA2El.classList.add('btn','btn-outline-primary','btn-sm','me-
|
232 |
temp_extLinkAlbumA2El.setAttribute('href', `https://open.spotify.com/album/${albumParsedObject.link.spotify}`);
|
233 |
temp_extLinkAlbumA2El.setAttribute('role', 'button');
|
234 |
temp_extLinkAlbumA2El.setAttribute('target', '_blank');
|
@@ -243,7 +299,7 @@ function loadTrackInfoModal (trackUuid) {
|
|
243 |
albumParsedObject.coverArts.forEach((obj1) => {
|
244 |
obj1.format.forEach((obj2) => {
|
245 |
let temp_coverArtAEl = document.createElement('a');
|
246 |
-
temp_coverArtAEl.classList.add('btn','btn-primary','btn-sm','me-
|
247 |
temp_coverArtAEl.setAttribute('href', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${obj1.fileName}.${obj2.extension}`);
|
248 |
temp_coverArtAEl.setAttribute('role', 'button');
|
249 |
temp_coverArtAEl.setAttribute('target', '_blank');
|
@@ -316,6 +372,332 @@ function loadTrackInfoModal (trackUuid) {
|
|
316 |
const trackInfoModal = new bootstrap.Modal(document.getElementById('trackInfoModal'));
|
317 |
trackInfoModal.show();
|
318 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
|
320 |
// ========== 設定画面のイベントリスナー登録など ==========
|
321 |
|
@@ -333,9 +715,11 @@ function appSettingsApply () {
|
|
333 |
switch (appSettingsSaveData.ui.uiThemeMode) {
|
334 |
case 'light':
|
335 |
document.querySelector('html').setAttribute('data-bs-theme', 'light');
|
|
|
336 |
break;
|
337 |
case 'dark':
|
338 |
document.querySelector('html').setAttribute('data-bs-theme', 'dark');
|
|
|
339 |
}
|
340 |
}
|
341 |
|
|
|
1 |
+
document.body.style.paddingRight = `${window.innerWidth - document.body.clientWidth}px`;
|
2 |
+
document.body.style.overflow = 'hidden';
|
3 |
const internalConfig = {
|
4 |
'network': {
|
5 |
'userAgent': {
|
|
|
22 |
};
|
23 |
let apiDataMasterDB = new Object();
|
24 |
let apiDataConfig = new Object();
|
25 |
+
let bootstrapTooltipList = null;
|
26 |
|
27 |
//!========== ページ読み込み時に実行する処理 ==========
|
28 |
|
|
|
47 |
await loadRequiredDatabase();
|
48 |
await decryptConfig();
|
49 |
pushToTrackListGroupUi();
|
50 |
+
pushToAlbumListGroupUi();
|
51 |
+
fsOverlayLoadingScrControl();
|
52 |
});
|
53 |
|
54 |
document.querySelector('#loadDatabaseTestButton').addEventListener('click', async function() {
|
|
|
62 |
pushToTrackListGroupUi();
|
63 |
});
|
64 |
|
65 |
+
// ========== fsOverlayLoadingScr制御 ==========
|
66 |
+
|
67 |
+
function fsOverlayLoadingScrControl () {
|
68 |
+
document.getElementById('fsOverlayLoadingScr').style.backgroundColor = 'rgba(0,0,0,0)';
|
69 |
+
document.getElementById('fsOverlayLoadingScr').style.visibility = 'hidden';
|
70 |
+
document.getElementById('fsOverlayLoadingScr').style.backdropFilter = 'blur(0)';
|
71 |
+
document.getElementById('fsOverlayLoadingScr_loadingSpinner').style.opacity = 0;
|
72 |
+
document.body.style.paddingRight = 0;
|
73 |
+
document.body.style.overflow = 'auto';
|
74 |
+
}
|
75 |
+
|
76 |
// ========== 全てのトラックのリストをTrack Listing TestのListGroupに表示 ==========
|
77 |
|
78 |
function pushToTrackListGroupUi () {
|
|
|
128 |
});
|
129 |
}
|
130 |
|
131 |
+
// ========== Album Listをビルド ==========
|
132 |
+
|
133 |
+
function pushToAlbumListGroupUi () {
|
134 |
+
const albumAllCardGroup = document.getElementById('albumAllCardGroup');
|
135 |
+
while(albumAllCardGroup.firstChild) {
|
136 |
+
albumAllCardGroup.removeChild(albumAllCardGroup.firstChild);
|
137 |
+
}
|
138 |
+
apiDataMasterDB.response.data.albums.forEach((albumObject) => {
|
139 |
+
let albumParsedObject = getParsedAlbumObjectFromAlbumUuid(albumObject.uuid);
|
140 |
+
let elementObj = new Object();
|
141 |
+
elementObj.colDiv = document.createElement('div');
|
142 |
+
elementObj.cardDiv = document.createElement('div');
|
143 |
+
elementObj.cardBodyDiv = document.createElement('div');
|
144 |
+
elementObj.cardImgDiv = document.createElement('div');
|
145 |
+
elementObj.cardImg = document.createElement('img');
|
146 |
+
elementObj.cardTitle = document.createElement('h5');
|
147 |
+
elementObj.cardText = document.createElement('p');
|
148 |
+
elementObj.colDiv.classList.add('col');
|
149 |
+
elementObj.cardDiv.classList.add('card', 'h-100');
|
150 |
+
elementObj.cardBodyDiv.classList.add('card-body');
|
151 |
+
elementObj.cardImgDiv.classList.add('object-fit-cover', 'cs_card-img-wrapper')
|
152 |
+
elementObj.cardImg.classList.add('card-img-top', 'object-fit-cover', 'lazyload', 'customlazyload-blur', 'user-select-none', 'user-drag-none', 'pe-none');
|
153 |
+
elementObj.cardTitle.classList.add('card-title');
|
154 |
+
elementObj.cardText.classList.add('card-text');
|
155 |
+
elementObj.cardImg.src = `data:image/webp;base64,${albumObject.coverArtPotatoWebp16pxBase64}`;
|
156 |
+
// elementObj.cardImg.src = `data:image/bmp;base64,${albumObject.coverArtPotatoBmp8pxBase64}`;
|
157 |
+
elementObj.cardImg.setAttribute('data-src', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${albumParsedObject.coverArts.slice(-1)[0].fileName}.${albumParsedObject.coverArts.slice(-1)[0].format[0].extension}`);
|
158 |
+
// elementObj.cardImg.setAttribute('loading', 'lazy');
|
159 |
+
elementObj.cardTitle.innerHTML = albumParsedObject.title;
|
160 |
+
elementObj.cardText.innerHTML = albumParsedObject.artist.map((obj) => obj.name).join(', ');
|
161 |
+
elementObj.cardBodyDiv.appendChild(elementObj.cardTitle);
|
162 |
+
elementObj.cardBodyDiv.appendChild(elementObj.cardText);
|
163 |
+
elementObj.cardImgDiv.appendChild(elementObj.cardImg);
|
164 |
+
elementObj.cardDiv.appendChild(elementObj.cardImgDiv);
|
165 |
+
elementObj.cardDiv.appendChild(elementObj.cardBodyDiv);
|
166 |
+
elementObj.cardDiv.addEventListener('click', () => {loadAlbumInfoModal(albumParsedObject.uuid)});
|
167 |
+
elementObj.colDiv.appendChild(elementObj.cardDiv);
|
168 |
+
albumAllCardGroup.appendChild(elementObj.colDiv);
|
169 |
+
});
|
170 |
+
}
|
171 |
+
|
172 |
// ========== trackInfoModalの処理 ==========
|
173 |
|
|
|
174 |
function loadTrackInfoModal (trackUuid) {
|
175 |
const albumParsedObject = getParsedAlbumObjectFromAlbumUuid(getAlbumUuidFromTrackUuid(trackUuid));
|
176 |
const trackParsedObject = albumParsedObject.tracks.find((obj) => obj.uuid === trackUuid);
|
|
|
275 |
let temp_extLinkAlbumA2El = document.createElement('a');
|
276 |
temp_extLinkAlbumTdKeyEl.innerHTML = 'Album Link';
|
277 |
if (albumParsedObject.link.itunes !== null) {
|
278 |
+
temp_extLinkAlbumA1El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
279 |
temp_extLinkAlbumA1El.setAttribute('href', `https://music.apple.com/album/${albumParsedObject.link.itunes}`);
|
280 |
temp_extLinkAlbumA1El.setAttribute('role', 'button');
|
281 |
temp_extLinkAlbumA1El.setAttribute('target', '_blank');
|
|
|
284 |
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA1El);
|
285 |
}
|
286 |
if (albumParsedObject.link.spotify !== null) {
|
287 |
+
temp_extLinkAlbumA2El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
288 |
temp_extLinkAlbumA2El.setAttribute('href', `https://open.spotify.com/album/${albumParsedObject.link.spotify}`);
|
289 |
temp_extLinkAlbumA2El.setAttribute('role', 'button');
|
290 |
temp_extLinkAlbumA2El.setAttribute('target', '_blank');
|
|
|
299 |
albumParsedObject.coverArts.forEach((obj1) => {
|
300 |
obj1.format.forEach((obj2) => {
|
301 |
let temp_coverArtAEl = document.createElement('a');
|
302 |
+
temp_coverArtAEl.classList.add('btn','btn-primary','btn-sm','me-2','mb-2');
|
303 |
temp_coverArtAEl.setAttribute('href', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${obj1.fileName}.${obj2.extension}`);
|
304 |
temp_coverArtAEl.setAttribute('role', 'button');
|
305 |
temp_coverArtAEl.setAttribute('target', '_blank');
|
|
|
372 |
const trackInfoModal = new bootstrap.Modal(document.getElementById('trackInfoModal'));
|
373 |
trackInfoModal.show();
|
374 |
}
|
375 |
+
function loadTrackInfoModal2 (trackUuid) {
|
376 |
+
const albumParsedObject = getParsedAlbumObjectFromAlbumUuid(getAlbumUuidFromTrackUuid(trackUuid));
|
377 |
+
const trackParsedObject = albumParsedObject.tracks.find((obj) => obj.uuid === trackUuid);
|
378 |
+
if (bootstrapTooltipList !== null) {bootstrapTooltipList.forEach(el => el.dispose())}
|
379 |
+
document.getElementById('trackInfoModal2-metadataTable-trackTitle').innerHTML = trackParsedObject.title;
|
380 |
+
if (trackParsedObject.titleLatin === null) {
|
381 |
+
document.getElementById('trackInfoModal2-metadataTable-trackTitle').removeAttribute('data-bs-toggle');
|
382 |
+
document.getElementById('trackInfoModal2-metadataTable-trackTitle').removeAttribute('data-bs-title');
|
383 |
+
} else {
|
384 |
+
document.getElementById('trackInfoModal2-metadataTable-trackTitle').setAttribute('data-bs-toggle', 'tooltip');
|
385 |
+
document.getElementById('trackInfoModal2-metadataTable-trackTitle').setAttribute('data-bs-title', trackParsedObject.titleLatin);
|
386 |
+
}
|
387 |
+
document.getElementById('trackInfoModal2-metadataTable-artists').innerHTML = trackParsedObject.artist.map((obj) => obj.name).join(', ');
|
388 |
+
if (trackParsedObject.artist.some((obj) => obj.nameLatin !== null)) {
|
389 |
+
document.getElementById('trackInfoModal2-metadataTable-artists').setAttribute('data-bs-toggle', 'tooltip');
|
390 |
+
document.getElementById('trackInfoModal2-metadataTable-artists').setAttribute('data-bs-title', trackParsedObject.artist.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
391 |
+
} else {
|
392 |
+
document.getElementById('trackInfoModal2-metadataTable-artistsLatin').removeAttribute('data-bs-toggle');
|
393 |
+
document.getElementById('trackInfoModal2-metadataTable-artistsLatin').removeAttribute('data-bs-title');
|
394 |
+
}
|
395 |
+
if (trackParsedObject.lyricist === null) {
|
396 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').parentNode.classList.add('d-none');
|
397 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').removeAttribute('data-bs-toggle');
|
398 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').removeAttribute('data-bs-title');
|
399 |
+
} else {
|
400 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').parentNode.classList.remove('d-none');
|
401 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').innerHTML = trackParsedObject.lyricist.map((obj) => obj.name).join(', ');
|
402 |
+
if (trackParsedObject.lyricist.some((obj) => obj.nameLatin !== null)) {
|
403 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').setAttribute('data-bs-toggle', 'tooltip');
|
404 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').setAttribute('data-bs-title', trackParsedObject.lyricist.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
405 |
+
} else {
|
406 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').removeAttribute('data-bs-toggle');
|
407 |
+
document.getElementById('trackInfoModal2-metadataTable-lyricist').removeAttribute('data-bs-title');
|
408 |
+
}
|
409 |
+
}
|
410 |
+
if (trackParsedObject.composer === null) {
|
411 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').parentNode.classList.add('d-none');
|
412 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').removeAttribute('data-bs-toggle');
|
413 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').removeAttribute('data-bs-title');
|
414 |
+
} else {
|
415 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').parentNode.classList.remove('d-none');
|
416 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').innerHTML = trackParsedObject.composer.map((obj) => obj.name).join(', ');
|
417 |
+
if (trackParsedObject.composer.some((obj) => obj.nameLatin !== null)) {
|
418 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').setAttribute('data-bs-toggle', 'tooltip');
|
419 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').setAttribute('data-bs-title', trackParsedObject.composer.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
420 |
+
} else {
|
421 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').removeAttribute('data-bs-toggle');
|
422 |
+
document.getElementById('trackInfoModal2-metadataTable-composer').removeAttribute('data-bs-title');
|
423 |
+
}
|
424 |
+
}
|
425 |
+
if (trackParsedObject.arranger === null) {
|
426 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').parentNode.classList.add('d-none');
|
427 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').removeAttribute('data-bs-toggle');
|
428 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').removeAttribute('data-bs-title');
|
429 |
+
} else {
|
430 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').parentNode.classList.remove('d-none');
|
431 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').innerHTML = trackParsedObject.arranger.map((obj) => obj.name).join(', ');
|
432 |
+
if (trackParsedObject.arranger.some((obj) => obj.nameLatin !== null)) {
|
433 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').setAttribute('data-bs-toggle', 'tooltip');
|
434 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').setAttribute('data-bs-title', trackParsedObject.arranger.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
435 |
+
} else {
|
436 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').removeAttribute('data-bs-toggle');
|
437 |
+
document.getElementById('trackInfoModal2-metadataTable-arranger').removeAttribute('data-bs-title');
|
438 |
+
}
|
439 |
+
}
|
440 |
+
document.getElementById('trackInfoModal2-metadataTable-trackDurationReadable').innerHTML = msecToReadableTime(trackParsedObject.durationMsecs);
|
441 |
+
document.getElementById('trackInfoModal2-metadataTable-trackDurationMsec').innerHTML = `${trackParsedObject.durationMsecs} ms`;
|
442 |
+
document.getElementById('trackInfoModal2-metadataTable-trackDurationSamples').innerHTML = `${trackParsedObject.durationSamples} samples`;
|
443 |
+
document.getElementById('trackInfoModal2-metadataTable-albumTitle').innerHTML = albumParsedObject.title;
|
444 |
+
if (albumParsedObject.titleLatin === null) {
|
445 |
+
document.getElementById('trackInfoModal2-metadataTable-albumTitle').removeAttribute('data-bs-toggle');
|
446 |
+
document.getElementById('trackInfoModal2-metadataTable-albumTitle').removeAttribute('data-bs-title');
|
447 |
+
} else {
|
448 |
+
document.getElementById('trackInfoModal2-metadataTable-albumTitle').setAttribute('data-bs-toggle', 'tooltip');
|
449 |
+
document.getElementById('trackInfoModal2-metadataTable-albumTitle').setAttribute('data-bs-title', albumParsedObject.titleLatin);
|
450 |
+
}
|
451 |
+
document.getElementById('trackInfoModal2-metadataTable-albumArtist').innerHTML = albumParsedObject.artist.map((obj) => obj.name).join(', ');
|
452 |
+
if (albumParsedObject.artist.some((obj) => obj.nameLatin !== null)) {
|
453 |
+
document.getElementById('trackInfoModal2-metadataTable-albumArtist').setAttribute('data-bs-toggle', 'tooltip');
|
454 |
+
document.getElementById('trackInfoModal2-metadataTable-albumArtist').setAttribute('data-bs-title', albumParsedObject.artist.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
455 |
+
} else {
|
456 |
+
document.getElementById('trackInfoModal2-metadataTable-albumArtist').removeAttribute('data-bs-toggle');
|
457 |
+
document.getElementById('trackInfoModal2-metadataTable-albumArtist').removeAttribute('data-bs-title');
|
458 |
+
}
|
459 |
+
document.getElementById('trackInfoModal2-metadataTable-albumReleaseDate').innerHTML = moment(albumParsedObject.releaseDate).format('YYYY/MM/DD');
|
460 |
+
document.getElementById('trackInfoModal2-metadataTable-albumBarcode').innerHTML = albumParsedObject.barCode;
|
461 |
+
document.getElementById('trackInfoModal2-metadataTable-albumCopyright').innerHTML = albumParsedObject.copyright;
|
462 |
+
while(document.getElementById('trackInfoModal2-externalLinkTable').firstChild) {
|
463 |
+
document.getElementById('trackInfoModal2-externalLinkTable').removeChild(document.getElementById('trackInfoModal2-externalLinkTable').firstChild);
|
464 |
+
}
|
465 |
+
while(document.getElementById('trackInfoModal2-coverArtLinkDiv').firstChild) {
|
466 |
+
document.getElementById('trackInfoModal2-coverArtLinkDiv').removeChild(document.getElementById('trackInfoModal2-coverArtLinkDiv').firstChild);
|
467 |
+
}
|
468 |
+
while(document.getElementById('trackInfoModal2-downloadTable').firstChild) {
|
469 |
+
document.getElementById('trackInfoModal2-downloadTable').removeChild(document.getElementById('trackInfoModal2-downloadTable').firstChild);
|
470 |
+
}
|
471 |
+
if (albumParsedObject.link.itunes !== null || albumParsedObject.link.spotify !== null) {
|
472 |
+
let temp_extLinkAlbumTrEl = document.createElement('tr');
|
473 |
+
let temp_extLinkAlbumTdKeyEl = document.createElement('td');
|
474 |
+
let temp_extLinkAlbumTdValueEl = document.createElement('td');
|
475 |
+
let temp_extLinkAlbumA1El = document.createElement('a');
|
476 |
+
let temp_extLinkAlbumA2El = document.createElement('a');
|
477 |
+
temp_extLinkAlbumTdKeyEl.innerHTML = 'Album Link';
|
478 |
+
if (albumParsedObject.link.itunes !== null) {
|
479 |
+
temp_extLinkAlbumA1El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
480 |
+
temp_extLinkAlbumA1El.setAttribute('href', `https://music.apple.com/album/${albumParsedObject.link.itunes}`);
|
481 |
+
temp_extLinkAlbumA1El.setAttribute('role', 'button');
|
482 |
+
temp_extLinkAlbumA1El.setAttribute('target', '_blank');
|
483 |
+
temp_extLinkAlbumA1El.setAttribute('rel', 'noopener noreferrer');
|
484 |
+
temp_extLinkAlbumA1El.innerHTML = 'Apple Music';
|
485 |
+
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA1El);
|
486 |
+
}
|
487 |
+
if (albumParsedObject.link.spotify !== null) {
|
488 |
+
temp_extLinkAlbumA2El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
489 |
+
temp_extLinkAlbumA2El.setAttribute('href', `https://open.spotify.com/album/${albumParsedObject.link.spotify}`);
|
490 |
+
temp_extLinkAlbumA2El.setAttribute('role', 'button');
|
491 |
+
temp_extLinkAlbumA2El.setAttribute('target', '_blank');
|
492 |
+
temp_extLinkAlbumA2El.setAttribute('rel', 'noopener noreferrer');
|
493 |
+
temp_extLinkAlbumA2El.innerHTML = 'Spotify';
|
494 |
+
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA2El);
|
495 |
+
}
|
496 |
+
temp_extLinkAlbumTrEl.appendChild(temp_extLinkAlbumTdKeyEl);
|
497 |
+
temp_extLinkAlbumTrEl.appendChild(temp_extLinkAlbumTdValueEl);
|
498 |
+
document.getElementById('trackInfoModal2-externalLinkTable').appendChild(temp_extLinkAlbumTrEl);
|
499 |
+
}
|
500 |
+
albumParsedObject.coverArts.forEach((obj1) => {
|
501 |
+
obj1.format.forEach((obj2) => {
|
502 |
+
let temp_coverArtAEl = document.createElement('a');
|
503 |
+
temp_coverArtAEl.classList.add('btn','btn-primary','btn-sm','me-2','mb-2');
|
504 |
+
temp_coverArtAEl.setAttribute('href', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${obj1.fileName}.${obj2.extension}`);
|
505 |
+
temp_coverArtAEl.setAttribute('role', 'button');
|
506 |
+
temp_coverArtAEl.setAttribute('target', '_blank');
|
507 |
+
temp_coverArtAEl.setAttribute('rel', 'noopener noreferrer');
|
508 |
+
temp_coverArtAEl.innerHTML = `${obj2.name} ${obj1.height}px`;
|
509 |
+
document.getElementById('trackInfoModal2-coverArtLinkDiv').appendChild(temp_coverArtAEl);
|
510 |
+
});
|
511 |
+
});
|
512 |
+
let temp_codecListImported = new Array();
|
513 |
+
if (albumParsedObject.isAllTrackSameCodecs === false) {temp_codecListImported = trackParsedObject.codecs} else {temp_codecListImported = albumParsedObject.codecs}
|
514 |
+
temp_codecListImported.forEach((obj) => {
|
515 |
+
let temp_dlTrEl = document.createElement('tr');
|
516 |
+
let temp_dlTdCodecEl = document.createElement('td');
|
517 |
+
let temp_dlTdInfoEl = document.createElement('td');
|
518 |
+
let temp_dlTdBtnEl = document.createElement('td');
|
519 |
+
let temp_dlButtonGroupEl = document.createElement('div');
|
520 |
+
let temp_dlButtonEl = document.createElement('button');
|
521 |
+
let temp_dlButtonExtEl = document.createElement('a');
|
522 |
+
let temp_dlButtonIconEl = document.createElement('i');
|
523 |
+
let temp_dlButtonExtIconEl = document.createElement('i');
|
524 |
+
let temp_codecBitrateTemporal = null;
|
525 |
+
temp_dlTdCodecEl.innerHTML = obj.nameBasic;
|
526 |
+
temp_dlTdCodecEl.setAttribute('data-bs-toggle', 'tooltip');
|
527 |
+
temp_dlTdCodecEl.setAttribute('data-bs-title', obj.nameLong);
|
528 |
+
if ((obj.bitRateAvg !== null && obj.bitRateMax !== null) || (obj.bitRateAvg !== null && obj.bitRateMax === null)) {
|
529 |
+
temp_codecBitrateTemporal = obj.bitRateAvg;
|
530 |
+
} else {
|
531 |
+
temp_codecBitrateTemporal = obj.bitRateMax;
|
532 |
+
}
|
533 |
+
if (obj.bitDepth === null) {
|
534 |
+
temp_dlTdInfoEl.innerHTML = `${obj.sampleRate / 1000}kHz ${obj.channelCount}ch ${temp_codecBitrateTemporal / 1000}kbps`;
|
535 |
+
} else {
|
536 |
+
temp_dlTdInfoEl.innerHTML = `${obj.bitDepth}bit ${obj.sampleRate / 1000}kHz ${obj.channelCount}ch ${temp_codecBitrateTemporal / 1000}kbps`;
|
537 |
+
}
|
538 |
+
if (obj.isOriginal === true) {
|
539 |
+
temp_dlButtonEl.classList.add('btn', 'btn-primary');
|
540 |
+
temp_dlButtonExtEl.classList.add('btn', 'btn-primary', 'text-center');
|
541 |
+
} else {
|
542 |
+
temp_dlButtonEl.classList.add('btn', 'btn-secondary');
|
543 |
+
temp_dlButtonExtEl.classList.add('btn', 'btn-secondary', 'text-center');
|
544 |
+
}
|
545 |
+
temp_dlButtonEl.setAttribute('type', 'button');
|
546 |
+
// temp_dlButtonEl.addEventListener('click', async () => {
|
547 |
+
// await downloadAudioDataToBlob (trackParsedObject.uuid, obj.uuid)
|
548 |
+
// })
|
549 |
+
temp_dlButtonExtEl.setAttribute('href', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${obj.path}/${trackParsedObject.uuid}.${obj.extension}`);
|
550 |
+
temp_dlButtonExtEl.setAttribute('download', determineDownloadFileName(trackParsedObject.uuid, obj.uuid));
|
551 |
+
temp_dlButtonExtEl.setAttribute('role', 'button');
|
552 |
+
temp_dlButtonExtEl.setAttribute('target', '_blank');
|
553 |
+
temp_dlButtonExtEl.setAttribute('rel', 'noopener noreferrer');
|
554 |
+
temp_dlButtonGroupEl.setAttribute('role', 'group');
|
555 |
+
temp_dlButtonGroupEl.classList.add('btn-group');
|
556 |
+
temp_dlButtonIconEl.classList.add('bi', 'bi-download');
|
557 |
+
temp_dlButtonExtIconEl.classList.add('bi', 'bi-box-arrow-up-right');
|
558 |
+
temp_dlTdBtnEl.classList.add('text-end');
|
559 |
+
temp_dlButtonEl.appendChild(temp_dlButtonIconEl);
|
560 |
+
temp_dlButtonExtEl.appendChild(temp_dlButtonExtIconEl);
|
561 |
+
// temp_dlButtonGroupEl.appendChild(temp_dlButtonEl);
|
562 |
+
temp_dlButtonGroupEl.appendChild(temp_dlButtonExtEl);
|
563 |
+
temp_dlTdBtnEl.appendChild(temp_dlButtonGroupEl);
|
564 |
+
temp_dlTrEl.appendChild(temp_dlTdCodecEl);
|
565 |
+
temp_dlTrEl.appendChild(temp_dlTdInfoEl);
|
566 |
+
temp_dlTrEl.appendChild(temp_dlTdBtnEl);
|
567 |
+
document.getElementById('trackInfoModal2-downloadTable').appendChild(temp_dlTrEl);
|
568 |
+
});
|
569 |
+
document.getElementById('trackInfoModal2-previewAudio').src = `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${temp_codecListImported.slice(-1)[0].path}/${trackParsedObject.uuid}.${temp_codecListImported.slice(-1)[0].extension}`;
|
570 |
+
const bootstrapTooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
571 |
+
bootstrapTooltipList = [...bootstrapTooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
572 |
+
document.getElementById('trackInfoModal2-DebugAcdOutputEl').innerHTML = JSON.stringify(albumParsedObject, '', ' ');
|
573 |
+
const trackInfoModal2 = new bootstrap.Modal(document.getElementById('trackInfoModal2'));
|
574 |
+
trackInfoModal2.show();
|
575 |
+
}
|
576 |
+
|
577 |
+
// ========== albumInfoModalの処理 ==========
|
578 |
+
|
579 |
+
function loadAlbumInfoModal (albumUuid) {
|
580 |
+
// Parse Album from DB
|
581 |
+
const albumParsedObject = getParsedAlbumObjectFromAlbumUuid(albumUuid);
|
582 |
+
// Metadata label build
|
583 |
+
if (bootstrapTooltipList !== null) {bootstrapTooltipList.forEach(el => el.dispose())};
|
584 |
+
document.getElementById('albumInfoModal-metadataTable-albumTitle').innerHTML = albumParsedObject.title;
|
585 |
+
if (albumParsedObject.titleLatin === null) {
|
586 |
+
document.getElementById('albumInfoModal-metadataTable-albumTitle').removeAttribute('data-bs-toggle');
|
587 |
+
document.getElementById('albumInfoModal-metadataTable-albumTitle').removeAttribute('data-bs-title');
|
588 |
+
} else {
|
589 |
+
document.getElementById('albumInfoModal-metadataTable-albumTitle').setAttribute('data-bs-toggle', 'tooltip');
|
590 |
+
document.getElementById('albumInfoModal-metadataTable-albumTitle').setAttribute('data-bs-title', albumParsedObject.titleLatin);
|
591 |
+
}
|
592 |
+
document.getElementById('albumInfoModal-metadataTable-albumArtist').innerHTML = albumParsedObject.artist.map((obj) => obj.name).join(', ');
|
593 |
+
if (albumParsedObject.artist.some((obj) => obj.nameLatin !== null)) {
|
594 |
+
document.getElementById('albumInfoModal-metadataTable-albumArtist').setAttribute('data-bs-toggle', 'tooltip');
|
595 |
+
document.getElementById('albumInfoModal-metadataTable-albumArtist').setAttribute('data-bs-title', albumParsedObject.artist.map((obj) => {if (obj.nameLatin !== null) {return obj.nameLatin} else {return obj.name}}).join(', '));
|
596 |
+
} else {
|
597 |
+
document.getElementById('albumInfoModal-metadataTable-albumArtist').removeAttribute('data-bs-toggle');
|
598 |
+
document.getElementById('albumInfoModal-metadataTable-albumArtist').removeAttribute('data-bs-title');
|
599 |
+
}
|
600 |
+
document.getElementById('albumInfoModal-metadataTable-albumReleaseDate').innerHTML = moment(albumParsedObject.releaseDate).format('YYYY/MM/DD');
|
601 |
+
document.getElementById('albumInfoModal-metadataTable-albumBarcode').innerHTML = albumParsedObject.barCode;
|
602 |
+
document.getElementById('albumInfoModal-metadataTable-albumCopyright').innerHTML = albumParsedObject.copyright;
|
603 |
+
// Table clear el
|
604 |
+
while(document.getElementById('albumInfoModal-externalLinkTable').firstChild) {
|
605 |
+
document.getElementById('albumInfoModal-externalLinkTable').removeChild(document.getElementById('albumInfoModal-externalLinkTable').firstChild);
|
606 |
+
}
|
607 |
+
while(document.getElementById('albumInfoModal-coverArtLinkDiv').firstChild) {
|
608 |
+
document.getElementById('albumInfoModal-coverArtLinkDiv').removeChild(document.getElementById('albumInfoModal-coverArtLinkDiv').firstChild);
|
609 |
+
}
|
610 |
+
// External link table build
|
611 |
+
if (albumParsedObject.link.itunes !== null || albumParsedObject.link.spotify !== null) {
|
612 |
+
let temp_extLinkAlbumTrEl = document.createElement('tr');
|
613 |
+
let temp_extLinkAlbumTdKeyEl = document.createElement('td');
|
614 |
+
let temp_extLinkAlbumTdValueEl = document.createElement('td');
|
615 |
+
let temp_extLinkAlbumA1El = document.createElement('a');
|
616 |
+
let temp_extLinkAlbumA2El = document.createElement('a');
|
617 |
+
temp_extLinkAlbumTdKeyEl.innerHTML = 'Album Link';
|
618 |
+
if (albumParsedObject.link.itunes !== null) {
|
619 |
+
temp_extLinkAlbumA1El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
620 |
+
temp_extLinkAlbumA1El.setAttribute('href', `https://music.apple.com/album/${albumParsedObject.link.itunes}`);
|
621 |
+
temp_extLinkAlbumA1El.setAttribute('role', 'button');
|
622 |
+
temp_extLinkAlbumA1El.setAttribute('target', '_blank');
|
623 |
+
temp_extLinkAlbumA1El.setAttribute('rel', 'noopener noreferrer');
|
624 |
+
temp_extLinkAlbumA1El.innerHTML = 'Apple Music';
|
625 |
+
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA1El);
|
626 |
+
}
|
627 |
+
if (albumParsedObject.link.spotify !== null) {
|
628 |
+
temp_extLinkAlbumA2El.classList.add('btn','btn-outline-primary','btn-sm','me-2');
|
629 |
+
temp_extLinkAlbumA2El.setAttribute('href', `https://open.spotify.com/album/${albumParsedObject.link.spotify}`);
|
630 |
+
temp_extLinkAlbumA2El.setAttribute('role', 'button');
|
631 |
+
temp_extLinkAlbumA2El.setAttribute('target', '_blank');
|
632 |
+
temp_extLinkAlbumA2El.setAttribute('rel', 'noopener noreferrer');
|
633 |
+
temp_extLinkAlbumA2El.innerHTML = 'Spotify';
|
634 |
+
temp_extLinkAlbumTdValueEl.appendChild(temp_extLinkAlbumA2El);
|
635 |
+
}
|
636 |
+
temp_extLinkAlbumTrEl.appendChild(temp_extLinkAlbumTdKeyEl);
|
637 |
+
temp_extLinkAlbumTrEl.appendChild(temp_extLinkAlbumTdValueEl);
|
638 |
+
document.getElementById('albumInfoModal-externalLinkTable').appendChild(temp_extLinkAlbumTrEl);
|
639 |
+
}
|
640 |
+
// Cover art button build
|
641 |
+
albumParsedObject.coverArts.forEach((obj1) => {
|
642 |
+
obj1.format.forEach((obj2) => {
|
643 |
+
let temp_coverArtAEl = document.createElement('a');
|
644 |
+
temp_coverArtAEl.classList.add('btn','btn-primary','btn-sm','me-2','mb-2');
|
645 |
+
temp_coverArtAEl.setAttribute('href', `${apiDataConfig.response.config.decrypted.rawMediaUrlBase64}/media/${albumParsedObject.uuid}/${obj1.fileName}.${obj2.extension}`);
|
646 |
+
temp_coverArtAEl.setAttribute('role', 'button');
|
647 |
+
temp_coverArtAEl.setAttribute('target', '_blank');
|
648 |
+
temp_coverArtAEl.setAttribute('rel', 'noopener noreferrer');
|
649 |
+
temp_coverArtAEl.innerHTML = `${obj2.name} ${obj1.height}px`;
|
650 |
+
document.getElementById('albumInfoModal-coverArtLinkDiv').appendChild(temp_coverArtAEl);
|
651 |
+
});
|
652 |
+
});
|
653 |
+
// Tooltip initialize
|
654 |
+
const bootstrapTooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]');
|
655 |
+
bootstrapTooltipList = [...bootstrapTooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));
|
656 |
+
// Modal Initialize
|
657 |
+
const albumInfoModal = new bootstrap.Modal(document.getElementById('albumInfoModal'));
|
658 |
+
|
659 |
+
// Track List build
|
660 |
+
const albumTrackAllListGroup = document.querySelector('#albumInfoModal-trackAllListGroup');
|
661 |
+
while(albumTrackAllListGroup.firstChild) {
|
662 |
+
albumTrackAllListGroup.removeChild(albumTrackAllListGroup.firstChild);
|
663 |
+
}
|
664 |
+
let headerElObj = new Object();
|
665 |
+
headerElObj.buttonNodeEl = document.createElement('button');
|
666 |
+
headerElObj.divArtistNodeEl = document.createElement('div');
|
667 |
+
headerElObj.divTrackNodeEl = document.createElement('div');
|
668 |
+
headerElObj.buttonNodeEl.classList.add('list-group-item', 'list-group-item-action', 'd-flex');
|
669 |
+
headerElObj.buttonNodeEl.setAttribute('type', 'button');
|
670 |
+
headerElObj.buttonNodeEl.disabled = true;
|
671 |
+
headerElObj.divArtistNodeEl.classList.add('flex-fill', 'w-100');
|
672 |
+
headerElObj.divTrackNodeEl.classList.add('flex-fill', 'w-100');
|
673 |
+
headerElObj.divArtistNodeEl.innerHTML = 'Artist';
|
674 |
+
headerElObj.divTrackNodeEl.innerHTML = 'Track';
|
675 |
+
headerElObj.buttonNodeEl.appendChild(headerElObj.divArtistNodeEl);
|
676 |
+
headerElObj.buttonNodeEl.appendChild(headerElObj.divTrackNodeEl);
|
677 |
+
albumTrackAllListGroup.appendChild(headerElObj.buttonNodeEl);
|
678 |
+
albumParsedObject.tracks.forEach((trackParsedObject) => {
|
679 |
+
let buttonNodeEl = document.createElement('button');
|
680 |
+
let divArtistNodeEl = document.createElement('div');
|
681 |
+
let divTrackNodeEl = document.createElement('div');
|
682 |
+
buttonNodeEl.classList.add('list-group-item', 'list-group-item-action', 'd-flex');
|
683 |
+
buttonNodeEl.setAttribute('type', 'button');
|
684 |
+
buttonNodeEl.setAttribute('data-track-uuid', trackParsedObject.uuid);
|
685 |
+
divArtistNodeEl.classList.add('flex-fill', 'w-100');
|
686 |
+
divTrackNodeEl.classList.add('flex-fill', 'w-100');
|
687 |
+
divArtistNodeEl.innerHTML = trackParsedObject.artist.map((obj) => obj.name).join(', ');
|
688 |
+
divTrackNodeEl.innerHTML = trackParsedObject.title;
|
689 |
+
buttonNodeEl.appendChild(divArtistNodeEl);
|
690 |
+
buttonNodeEl.appendChild(divTrackNodeEl);
|
691 |
+
buttonNodeEl.addEventListener('click', () => {
|
692 |
+
albumInfoModal.hide();
|
693 |
+
loadTrackInfoModal2(trackParsedObject.uuid)
|
694 |
+
});
|
695 |
+
albumTrackAllListGroup.appendChild(buttonNodeEl);
|
696 |
+
});
|
697 |
+
|
698 |
+
// Show modal
|
699 |
+
albumInfoModal.show();
|
700 |
+
}
|
701 |
|
702 |
// ========== 設定画面のイベントリスナー登録など ==========
|
703 |
|
|
|
715 |
switch (appSettingsSaveData.ui.uiThemeMode) {
|
716 |
case 'light':
|
717 |
document.querySelector('html').setAttribute('data-bs-theme', 'light');
|
718 |
+
document.querySelector('html').setAttribute('data-mdb-theme', 'light');
|
719 |
break;
|
720 |
case 'dark':
|
721 |
document.querySelector('html').setAttribute('data-bs-theme', 'dark');
|
722 |
+
document.querySelector('html').setAttribute('data-mdb-theme', 'dark');
|
723 |
}
|
724 |
}
|
725 |
|
style.css
CHANGED
@@ -3,4 +3,140 @@ body, .tooltip {
|
|
3 |
}
|
4 |
pre, code {
|
5 |
font-family: 'Fira Code', SFMono-Regular, SF Mono, 'Noto Sans JP', ui-monospace, monospace, sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
}
|
|
|
3 |
}
|
4 |
pre, code {
|
5 |
font-family: 'Fira Code', SFMono-Regular, SF Mono, 'Noto Sans JP', ui-monospace, monospace, sans-serif;
|
6 |
+
}
|
7 |
+
|
8 |
+
.user-drag-none {
|
9 |
+
user-drag: none;
|
10 |
+
-webkit-user-drag: none;
|
11 |
+
-moz-user-select: none;
|
12 |
+
}
|
13 |
+
|
14 |
+
.customlazyload-blur {
|
15 |
+
-webkit-filter: blur(12px);
|
16 |
+
filter: blur(12px);
|
17 |
+
opacity: 1;
|
18 |
+
transition: filter 400ms, -webkit-filter 400ms, opacity 400ms;
|
19 |
+
}
|
20 |
+
.customlazyload-blur.lazyloaded {
|
21 |
+
-webkit-filter: blur(0);
|
22 |
+
filter: blur(0);
|
23 |
+
opacity: 1;
|
24 |
+
}
|
25 |
+
|
26 |
+
.modal-content {
|
27 |
+
box-shadow: 0px 0px 24px 0px rgba(0,0,0,0.6);
|
28 |
+
}
|
29 |
+
.cs_card-img-wrapper {
|
30 |
+
overflow: hidden;
|
31 |
+
}
|
32 |
+
#trackAllListGroup {
|
33 |
+
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.4);
|
34 |
+
scale: 1;
|
35 |
+
transition: box-shadow 200ms, scale 200ms;
|
36 |
+
&:hover {
|
37 |
+
box-shadow: 0px 0px 24px 0px rgba(0,0,0,0.6);
|
38 |
+
scale: 1.01;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
#albumAllCardGroup .col .card {
|
42 |
+
cursor: pointer;
|
43 |
+
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.4);
|
44 |
+
scale: 1;
|
45 |
+
transition: box-shadow 200ms, scale 200ms;
|
46 |
+
&:hover {
|
47 |
+
box-shadow: 0px 0px 24px 0px rgba(0,0,0,0.6);
|
48 |
+
scale: 1.03;
|
49 |
+
}
|
50 |
+
&:active {
|
51 |
+
box-shadow: 0px 0px 17px 0px rgba(0,0,0,0.6);
|
52 |
+
scale: 1.015;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
.btn, .btn-group {
|
56 |
+
box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.4);
|
57 |
+
scale: 1;
|
58 |
+
transition: box-shadow 200ms, scale 200ms;
|
59 |
+
&:hover {
|
60 |
+
box-shadow: 0px 0px 16px 0px rgba(0,0,0,0.6);
|
61 |
+
scale: 1.05;
|
62 |
+
}
|
63 |
+
&:active {
|
64 |
+
box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.6);
|
65 |
+
scale: 1.025;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
.btn-group .btn {
|
69 |
+
box-shadow: none;
|
70 |
+
scale: 1;
|
71 |
+
&:hover {
|
72 |
+
box-shadow: none;
|
73 |
+
scale: 1;
|
74 |
+
}
|
75 |
+
&:active {
|
76 |
+
box-shadow: none;
|
77 |
+
scale: 1;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
.btn-close {
|
81 |
+
scale: 1;
|
82 |
+
transition: scale 200ms;
|
83 |
+
&:hover {
|
84 |
+
scale: 1.08;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
#fsOverlayLoadingScr {
|
89 |
+
position: fixed;
|
90 |
+
left: 0;
|
91 |
+
top: 0;
|
92 |
+
width: 100%;
|
93 |
+
height: 100%;
|
94 |
+
display: flex;
|
95 |
+
visibility: visible;
|
96 |
+
justify-content: center;
|
97 |
+
align-items: center;
|
98 |
+
background-color: rgba(0,0,0,0.5);
|
99 |
+
z-index: 5001;
|
100 |
+
backdrop-filter: blur(32px);
|
101 |
+
transition: background-color 700ms, visibility 700ms, backdrop-filter 700ms;
|
102 |
+
}
|
103 |
+
#fsOverlayLoadingScr_loadingSpinner {
|
104 |
+
margin: 0px auto;
|
105 |
+
width: 100px;
|
106 |
+
height: 100px;
|
107 |
+
zoom: 1.5;
|
108 |
+
opacity: 1;
|
109 |
+
transition: opacity 500ms;
|
110 |
+
}
|
111 |
+
.fsOverlayLoadingScr_loadingCircular {
|
112 |
+
animation: fsOverlayLoadingScr_loadingCircular_rotate 1s linear infinite;
|
113 |
+
height: 100px;
|
114 |
+
position: relative;
|
115 |
+
width: 100px;
|
116 |
+
}
|
117 |
+
.fsOverlayLoadingScr_loadingCircular circle {
|
118 |
+
stroke: #fff;
|
119 |
+
stroke-dasharray: 1,200;
|
120 |
+
stroke-dashoffset: 0;
|
121 |
+
animation: fsOverlayLoadingScr_loadingCircular_dash 1.5s ease-in-out infinite;
|
122 |
+
stroke-linecap: round;
|
123 |
+
}
|
124 |
+
@keyframes fsOverlayLoadingScr_loadingCircular_rotate {
|
125 |
+
100% {
|
126 |
+
transform: rotate(360deg);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
@keyframes fsOverlayLoadingScr_loadingCircular_dash {
|
130 |
+
0% {
|
131 |
+
stroke-dasharray: 1,200;
|
132 |
+
stroke-dashoffset: 0;
|
133 |
+
}
|
134 |
+
50% {
|
135 |
+
stroke-dasharray: 89,200;
|
136 |
+
stroke-dashoffset: -35;
|
137 |
+
}
|
138 |
+
100% {
|
139 |
+
stroke-dasharray: 89,200;
|
140 |
+
stroke-dashoffset: -124;
|
141 |
+
}
|
142 |
}
|