diff options
| author | Matt Goldspink <mattgoldspink1@gmail.com> | 2022-06-17 06:35:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-17 06:35:34 -0700 |
| commit | 0c63f5664c62643c781549df6818232f29e4226c (patch) | |
| tree | 9d547af30b132a62a6f882d8c565955b582c5ad6 | |
| parent | 8bd5b7694c938cd21aacec3beaf6a23334269192 (diff) | |
| parent | 1ecb866f81258d6a2319482de5dde52a1f96a13f (diff) | |
| download | slskd-0c63f5664c62643c781549df6818232f29e4226c.tar.gz | |
Merge branch 'master' into feature/folding-folders
| -rw-r--r-- | .github/workflows/codesee-arch-diagram.yml | 87 | ||||
| -rw-r--r-- | src/web/src/components/Search/Detail/SearchDetail.js | 2 | ||||
| -rw-r--r-- | src/web/src/lib/searches.js | 6 | ||||
| -rw-r--r-- | src/web/src/lib/util.js | 3 |
4 files changed, 9 insertions, 89 deletions
diff --git a/.github/workflows/codesee-arch-diagram.yml b/.github/workflows/codesee-arch-diagram.yml deleted file mode 100644 index f02cc13c..00000000 --- a/.github/workflows/codesee-arch-diagram.yml +++ /dev/null @@ -1,87 +0,0 @@ -on: - push: - branches: - - master - pull_request_target: - types: [opened, synchronize, reopened] - -name: CodeSee Map - -jobs: - test_map_action: - runs-on: ubuntu-latest - continue-on-error: true - name: Run CodeSee Map Analysis - steps: - - name: checkout - id: checkout - uses: actions/checkout@v2 - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 0 - - # codesee-detect-languages has an output with id languages. - - name: Detect Languages - id: detect-languages - uses: Codesee-io/codesee-detect-languages-action@latest - - - name: Configure JDK 16 - uses: actions/setup-java@v2 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }} - with: - java-version: '16' - distribution: 'zulu' - - # CodeSee Maps Go support uses a static binary so there's no setup step required. - - - name: Configure Node.js 14 - uses: actions/setup-node@v2 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }} - with: - node-version: '14' - - - name: Configure Python 3.x - uses: actions/setup-python@v2 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }} - with: - python-version: '3.10' - architecture: 'x64' - - - name: Configure Ruby '3.x' - uses: ruby/setup-ruby@v1 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }} - with: - ruby-version: '3.0' - - # We need the rust toolchain because it uses rustc and cargo to inspect the package - - name: Configure Rust 1.x stable - uses: actions-rs/toolchain@v1 - if: ${{ fromJSON(steps.detect-languages.outputs.languages).rust }} - with: - toolchain: stable - - - name: Generate Map - id: generate-map - uses: Codesee-io/codesee-map-action@latest - with: - step: map - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} - languages: ${{ steps.detect-languages.outputs.languages }} - - - name: Upload Map - id: upload-map - uses: Codesee-io/codesee-map-action@latest - with: - step: mapUpload - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} - - - name: Insights - id: insights - uses: Codesee-io/codesee-map-action@latest - with: - step: insights - api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }} - github_ref: ${{ github.ref }} diff --git a/src/web/src/components/Search/Detail/SearchDetail.js b/src/web/src/components/Search/Detail/SearchDetail.js index 4de3cc0e..af61c0ca 100644 --- a/src/web/src/components/Search/Detail/SearchDetail.js +++ b/src/web/src/components/Search/Detail/SearchDetail.js @@ -189,7 +189,7 @@ const SearchDetail = ({ search, creating, stopping, removing, disabled, onCreate className='search-filter' placeholder=' lackluster container -bothersome iscbr|isvbr islossless|islossy - minbitrate:320 minfilesize:10 minfilesinfolder:8 minlength:5000 + minbitrate:320 minbitdepth:24 minfilesize:10 minfilesinfolder:8 minlength:5000 ' label={{ icon: 'filter', content: 'Filter' }} value={resultFilters} diff --git a/src/web/src/lib/searches.js b/src/web/src/lib/searches.js index c7312bf5..a0e97820 100644 --- a/src/web/src/lib/searches.js +++ b/src/web/src/lib/searches.js @@ -34,6 +34,7 @@ export const getResponses = async ({ id }) => { export const parseFiltersFromString = (string) => { const filters = { minBitRate: 0, + minBitDepth: 0, minFileSize: 0, minLength: 0, minFilesInFolder: 0, @@ -54,6 +55,7 @@ export const parseFiltersFromString = (string) => { }; filters.minBitRate = getNthMatch(string, /(minbr|minbitrate):([0-9]+)/i, 2) || filters.minBitRate; + filters.minBitDepth = getNthMatch(string, /(minbd|minbitdepth):([0-9]+)/i, 2) || filters.minBitDepth; filters.minFileSize = getNthMatch(string, /(minfs|minfilesize):([0-9]+)/i, 2) || filters.minFileSize; filters.minLength = getNthMatch(string, /(minlen|minlength):([0-9]+)/i, 2) || filters.minLength; filters.minFilesInFolder = getNthMatch(string, /(minfif|minfilesinfolder):([0-9]+)/i, 2) || filters.minFilesInFolder; @@ -76,6 +78,7 @@ export const parseFiltersFromString = (string) => { export const filterResponse = ({ filters = { minBitRate: 0, + minBitDepth: 0, minFileSize: 0, minLength: 0, include: [], @@ -100,7 +103,7 @@ export const filterResponse = ({ const { bitRate, size, length, filename, sampleRate, bitDepth, isVariableBitRate } = file; const { isCBR, isVBR, isLossless, isLossy, - minBitRate, minFileSize, minLength, + minBitRate, minBitDepth, minFileSize, minLength, include = [], exclude = [], } = filters; @@ -109,6 +112,7 @@ export const filterResponse = ({ if (isLossless && (!sampleRate || !bitDepth)) return false; if (isLossy && (sampleRate || bitDepth)) return false; if (bitRate < minBitRate) return false; + if (bitDepth < minBitDepth) return false; if (size < minFileSize) return false; if (length < minLength) return false; diff --git a/src/web/src/lib/util.js b/src/web/src/lib/util.js index 94095efa..20653737 100644 --- a/src/web/src/lib/util.js +++ b/src/web/src/lib/util.js @@ -3,6 +3,9 @@ export const formatSeconds = (seconds) => if (isNaN(seconds)) return ''; var date = new Date(1970,0,1); date.setSeconds(seconds); + if (seconds >= 3600) { + return date.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, '$1'); + } return date.toTimeString().replace(/.*(\d{2}:\d{2}).*/, '$1'); }; |
