diff --git a/.devcontainer/dev.js b/.devcontainer/dev.js index 28c0074b44..054690d4f1 100644 --- a/.devcontainer/dev.js +++ b/.devcontainer/dev.js @@ -6,5 +6,5 @@ module.exports.config = { MetadataPath: Path.resolve('metadata'), FFmpegPath: '/usr/bin/ffmpeg', FFProbePath: '/usr/bin/ffprobe', - SkipBinariesCheck: true -} \ No newline at end of file + SkipBinariesCheck: false +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..0cd521a5b5 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,33 @@ + + +## Brief summary + + + +## Which issue is fixed? + + + +## In-depth Description + + + +## How have you tested this? + + + +## Screenshots + + diff --git a/.github/workflows/apply_comments.yaml b/.github/workflows/apply_comments.yaml new file mode 100644 index 0000000000..69a7ce280d --- /dev/null +++ b/.github/workflows/apply_comments.yaml @@ -0,0 +1,55 @@ +name: Add issue comments by label +on: + issues: + types: + - labeled +jobs: + help-wanted: + if: github.event.label.name == 'help wanted' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Help wanted comment + run: gh issue comment "$NUMBER" --body "$BODY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: > + This issue is not able to be completed due to limited bandwidth or access to the required test hardware. + + This issue is available for anyone to work on. + + + config-issue: + if: github.event.label.name == 'config-issue' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Config issue comment + run: gh issue close "$NUMBER" --reason "not planned" --comment "$BODY" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.issue.number }} + BODY: > + After reviewing this issue, this appears to be a problem with your setup and not Audiobookshelf. This issue is being closed to keep the issue tracker focused on Audiobookshelf itself. Please reach out on the Audiobookshelf Discord for community support. + + Some common search terms to help you find the solution to your problem: + - Reverse proxy + - Enabling websockets + - SSL (https vs http) + - Configuring a static IP + - `localhost` versus IP address + - hairpin NAT + - VPN + - firewall ports + - public versus private network + - bridge versus host mode + - Docker networking + - DNS (such as EAI_AGAIN errors) + + After you have followed these steps, please post the solution or steps you followed to fix the problem to help others in the future, or show that it is a problem with Audiobookshelf so we can reopen the issue. + diff --git a/.github/workflows/close-issues-on-release.yml b/.github/workflows/close-issues-on-release.yml new file mode 100644 index 0000000000..9c59075891 --- /dev/null +++ b/.github/workflows/close-issues-on-release.yml @@ -0,0 +1,20 @@ +name: Close fixed issues on release. +on: + release: + types: [published] + +permissions: + contents: read + issues: write + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Close issues marked as fixed upon a release. + uses: gcampbell-msft/fixed-pending-release@7fa1b75a0c04bcd4b375110522878e5f6100cff5 + with: + label: 'awaiting release' + removeLabel: true + applyToAll: true + message: Fixed in [${releaseTag}](${releaseUrl}). diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a77ab3e0ab..8d43311b7f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,11 +1,25 @@ -name: "CodeQL" +name: 'CodeQL' on: push: - branches: [ 'master' ] + branches: ['master'] + # Only build when files in these directories have been changed + paths: + - client/** + - server/** + - test/** + - index.js + - package.json pull_request: # The branches below must be a subset of the branches above - branches: [ 'master' ] + branches: ['master'] + # Only build when files in these directories have been changed + paths: + - client/** + - server/** + - test/** + - index.js + - package.json schedule: - cron: '16 5 * * 4' @@ -21,45 +35,44 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'javascript' ] + language: ['javascript'] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Use only 'java' to analyze code written in Java, Kotlin or both # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # âšī¸ Command-line programs to run using the OS shell. + # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # âšī¸ Command-line programs to run using the OS shell. - # đ See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: '/language:${{matrix.language}}' diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e783fce637..846a55639f 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -70,6 +70,7 @@ jobs: uses: docker/build-push-action@v3 with: tags: ${{ github.event.inputs.tags || steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} context: . platforms: linux/amd64,linux/arm64 push: true diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3e499468ee..580c0f500a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -5,6 +5,13 @@ on: push: branches-ignore: - 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests + # Only build when files in these directories have been changed + paths: + - client/** + - server/** + - test/** + - index.js + - package.json jobs: build: diff --git a/.github/workflows/lint-openapi.yml b/.github/workflows/lint-openapi.yml index 3c6072d8dc..817e94b97e 100644 --- a/.github/workflows/lint-openapi.yml +++ b/.github/workflows/lint-openapi.yml @@ -1,13 +1,15 @@ name: API linting -# Run on pull requests or pushes when there is a change to the OpenAPI file +# Run on pull requests or pushes when there is a change to any OpenAPI files in docs/ on: - push: - paths: - - docs/ pull_request: + push: paths: - - docs/ + - 'docs/**' + +# This action only needs read permissions +permissions: + contents: read jobs: build: diff --git a/.gitignore b/.gitignore index ca3768ba3b..1eda8e1fa8 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ /ffmpeg* /ffprobe* /unicode* +/libnusqlite3* sw.* .DS_STORE diff --git a/Dockerfile b/Dockerfile index fe68b304db..0d4629f84d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,19 +11,35 @@ FROM node:20-alpine ENV NODE_ENV=production RUN apk update && \ - apk add --no-cache --update \ - curl \ - tzdata \ - ffmpeg \ - make \ - python3 \ - g++ \ - tini + apk add --no-cache --update \ + curl \ + tzdata \ + ffmpeg \ + make \ + python3 \ + g++ \ + tini \ + unzip COPY --from=build /client/dist /client/dist COPY index.js package* / COPY server server +ARG TARGETPLATFORM + +ENV NUSQLITE3_DIR="/usr/local/lib/nusqlite3" +ENV NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so" + +RUN case "$TARGETPLATFORM" in \ + "linux/amd64") \ + curl -L -o /tmp/library.zip "https://github.com/mikiher/nunicode-sqlite/releases/download/v1.2/libnusqlite3-linux-musl-x64.zip" ;; \ + "linux/arm64") \ + curl -L -o /tmp/library.zip "https://github.com/mikiher/nunicode-sqlite/releases/download/v1.2/libnusqlite3-linux-musl-arm64.zip" ;; \ + *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ + esac && \ + unzip /tmp/library.zip -d $NUSQLITE3_DIR && \ + rm /tmp/library.zip + RUN npm ci --only=production RUN apk del make python3 g++ diff --git a/client/assets/fonts.css b/client/assets/fonts.css index 4e280dc935..c568ffa6e4 100644 --- a/client/assets/fonts.css +++ b/client/assets/fonts.css @@ -2,14 +2,7 @@ font-family: 'Material Symbols Rounded'; font-style: normal; font-weight: 400; - src: url(~static/fonts/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].woff2) format('woff2'); -} - -@font-face { - font-family: 'Material Symbols Outlined'; - font-style: normal; - font-weight: 400; - src: url(~static/fonts/MaterialSymbolsOutlined[FILL,GRAD,opsz,wght].woff2) format('woff2'); + src: url(~static/fonts/MaterialSymbolsRounded.woff2) format('woff2'); } .material-symbols { @@ -32,26 +25,6 @@ 'FILL' 1 } -.material-symbols-outlined { - font-family: 'Material Symbols Outlined'; - font-weight: normal; - font-style: normal; - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - -webkit-font-smoothing: antialiased; - vertical-align: top; -} - -.material-symbols-outlined.fill { - font-variation-settings: - 'FILL' 1 -} - /* cyrillic-ext */ @font-face { font-family: 'Source Sans Pro'; diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 1ded2f7a45..19b8fe3c62 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -16,7 +16,7 @@
{{ $strings.ButtonPlaylists }}
- queue_music + {{ $strings.ButtonCollections }}
- collections_bookmark + {{ $strings.ButtonAuthors }}
{{ Source }}
{{ $strings.ButtonLatest }}
@@ -43,7 +43,7 @@{{ $strings.ButtonCollections }}
@@ -51,14 +51,14 @@{{ $strings.ButtonPlaylists }}