aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--css/main.css11
-rw-r--r--js/main.js15
2 files changed, 24 insertions, 2 deletions
diff --git a/css/main.css b/css/main.css
index 9bb7175..007c02a 100644
--- a/css/main.css
+++ b/css/main.css
@@ -240,8 +240,15 @@ label, p {
cursor: default;
}
+#alphabetGroup {
+ border-radius: 0.25rem;
+ overflow: hidden;
+ max-width: 990px;
+}
+
#alphabetGroup button {
margin-left: 0;
+ border-radius: 0;
}
#alphabetGroup .btn-outline-dark {
@@ -397,11 +404,11 @@ table, td, tr, th {
}
@media only screen and (max-width: 1199px) {
- #alphabetGroup.btn-group .btn:not(:last-child):not(.dropdown-toggle) {
+ /*#alphabetGroup.btn-group .btn:not(:last-child):not(.dropdown-toggle) {
border-bottom-left-radius: 0;
}
#alphabetGroup.btn-group .btn:not(:first-child) {
border-top-right-radius: 0;
- }
+ }*/
} \ No newline at end of file
diff --git a/js/main.js b/js/main.js
index 306412f..c0b7d11 100644
--- a/js/main.js
+++ b/js/main.js
@@ -536,6 +536,7 @@ function getAlphabet(uid, row) {
function displayAlphabet(data, row) {
const availableAlphabet = data.MediaContainer.Directory;
+
if (data.MediaContainer.thumb.indexOf('show') > -1) { libraryType = "shows"; }
else { libraryType = "movie"; }
@@ -574,6 +575,20 @@ function displayAlphabet(data, row) {
$(`#btn${availableAlphabet[i].title}`).prop("disabled", false);
}
}
+
+ // Get the non-English characters
+ const nonEngChars = availableAlphabet.filter(entry => !entry.title.match(/[a-z#]/i));
+
+ // Remove all custom buttons after the Z
+ $('#btnZ').nextAll().remove();
+
+ if (nonEngChars.length > 0) {
+ // Add buttons for the non English characters
+ for (let j = 0; j < nonEngChars.length; j++) {
+ $('#alphabetGroup').append(`<button id="btn${nonEngChars[j].title}" type="button" class="btn btn-outline-dark"
+ onclick="getLibraryByLetter(this)">${nonEngChars[j].title}</button>`);
+ }
+ }
}
function getLibraryByLetter(element) {