Compare commits
69 Commits
1.4.0rc1-8
...
master
Author | SHA1 | Date |
---|---|---|
Clementine Buildbot | cecc1c1b57 | |
John Maguire | efe886e0ae | |
John Maguire | 5c61371f8f | |
John Maguire | 7ab9afffd4 | |
John Maguire | 89ec83c3f1 | |
John Maguire | 552e19a9b9 | |
John Maguire | f636992801 | |
John Maguire | 53c015f712 | |
John Maguire | c482d81ce3 | |
John Maguire | fc48517d63 | |
John Maguire | 0729998979 | |
Clementine Buildbot | a809096a98 | |
Clementine Buildbot | bd22ace4ec | |
Clementine Buildbot | 4597dc16b3 | |
Clementine Buildbot | 49b5f1cb51 | |
Clementine Buildbot | 154f09853e | |
Sergey Fedorov | 43826d9277 | |
Clementine Buildbot | 1506c27696 | |
Clementine Buildbot | d99cbb269b | |
Clementine Buildbot | 3cca9bb98a | |
Clementine Buildbot | 650bd81508 | |
Clementine Buildbot | 7607ddcb96 | |
Clementine Buildbot | e249911937 | |
Clementine Buildbot | 4ae57a4b5d | |
Clementine Buildbot | 2f3464403b | |
Clementine Buildbot | f76dbffa6b | |
Clementine Buildbot | fbb266adc2 | |
Clementine Buildbot | 9638ac70b3 | |
Clementine Buildbot | c93b4e1149 | |
Clementine Buildbot | d014a315c9 | |
Isaiah W | df4181940d | |
Isaiah W | ebe3c45476 | |
Clementine Buildbot | 634910238d | |
Clementine Buildbot | 62ed69fa3d | |
Clementine Buildbot | dd0a94e8a6 | |
Clementine Buildbot | 1566148c50 | |
Clementine Buildbot | 98a520552b | |
Clementine Buildbot | 5968648aa1 | |
Clementine Buildbot | f3ddd7eee4 | |
Clementine Buildbot | 19b44fb831 | |
Robert-André Mauchin | 994d16effa | |
xoza | 4768cb9efb | |
Clementine Buildbot | 7b678f26e0 | |
Marcus Müller | 3f572a4139 | |
Marcus Müller | f3837f95db | |
Marcus Müller | 6820a0a58d | |
Marcus Müller | cfcddf7c0f | |
Marcus Müller | 98e24f626b | |
Marcus Müller | 8e47ab59e5 | |
Marcus Müller | 63208b4e1f | |
Marcus Müller | 20773dee29 | |
John Maguire | c2a5b9b07e | |
Quentin Snow | de7455eebd | |
Marcus Müller | 2a14ec9d4d | |
Clementine Buildbot | 86e81cea05 | |
Clementine Buildbot | 10570316dd | |
Clementine Buildbot | ad8fd81ba9 | |
Clementine Buildbot | 6ff5768634 | |
Clementine Buildbot | 08bfb88912 | |
Clementine Buildbot | d3108b32e8 | |
Clementine Buildbot | 0701bef103 | |
Clementine Buildbot | bf4ac0cb46 | |
John Maguire | baf05335f9 | |
John Maguire | d21e9697d0 | |
John Maguire | ab057f8275 | |
John Maguire | 58325e45a7 | |
John Maguire | 1d0cbc0ebb | |
Clementine Buildbot | c83a0ac25f | |
John Maguire | 351a5e2547 |
|
@ -10,7 +10,7 @@ on:
|
|||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -25,10 +25,15 @@ jobs:
|
|||
push_translations:
|
||||
name: Push translation sources to Transifex
|
||||
if: github.ref == 'refs/heads/master'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: ubuntu:bionic
|
||||
image: ubuntu:noble
|
||||
steps:
|
||||
- uses: supplypike/setup-bin@v3
|
||||
with:
|
||||
uri: https://github.com/transifex/cli/releases/download/v1.6.17/tx-linux-amd64.tar.gz
|
||||
name: tx
|
||||
version: 1.6.17
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
@ -44,7 +49,7 @@ jobs:
|
|||
libchromaprint-dev
|
||||
libdbus-1-dev
|
||||
libfftw3-dev
|
||||
libglew1.5-dev
|
||||
libglew-dev
|
||||
libglib2.0-dev
|
||||
libgpod-dev
|
||||
libgstreamer-plugins-base1.0-dev
|
||||
|
@ -64,8 +69,6 @@ jobs:
|
|||
qttools5-dev
|
||||
libsparsehash-dev
|
||||
ssh
|
||||
- name: Install tx
|
||||
run: pip3 install transifex-client==0.13.9
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1.2.0
|
||||
- name: git hackery
|
||||
|
@ -73,7 +76,7 @@ jobs:
|
|||
- name: tx init
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
run: tx init --no-interactive --force
|
||||
run: tx init
|
||||
- name: cmake
|
||||
working-directory: bin
|
||||
run: cmake ..
|
||||
|
@ -83,7 +86,7 @@ jobs:
|
|||
- name: tx config
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
run: tx config mapping --execute -r clementine.clementineplayer -f src/translations/translations.pot -s en -t PO --expression 'src/translations/<lang>.po'
|
||||
run: tx add --organization davidsansome --project clementine --resource clementineplayer --file-filter 'src/translations/<lang>.po' --type PO src/translations/en.po
|
||||
- name: tx push
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
|
@ -91,43 +94,50 @@ jobs:
|
|||
|
||||
create_release:
|
||||
name: Create GitHub Release
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.ref == 'refs/heads/master'
|
||||
needs:
|
||||
- build_bionic_64
|
||||
- build_bullseye_64
|
||||
- build_buster_64
|
||||
- build_fedora_36
|
||||
- build_fedora_37
|
||||
- build_fedora_39
|
||||
- build_fedora_40
|
||||
- build_focal_64
|
||||
- build_jammy_64
|
||||
- build_kinetic_64
|
||||
- build_mac
|
||||
- build_noble_64
|
||||
# - build_mac
|
||||
- build_mingw
|
||||
- build_source
|
||||
- build_stretch_64
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v1.2.0
|
||||
- uses: actions/download-artifact@v2
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: release_artifacts
|
||||
- name: Create draft pre-release
|
||||
id: tag_name
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -x
|
||||
VERSION=$(echo release_artifacts/**/*.tar.xz | sed -e 's/.*clementine-\(.*\).tar.xz/\1/')
|
||||
echo "Version: ${VERSION}"
|
||||
assets=()
|
||||
for asset in $(find release_artifacts -type f); do
|
||||
echo "Adding asset: ${asset}"
|
||||
assets+=("-a" "$asset")
|
||||
done
|
||||
hub release create -p "${assets[@]}" -m "$VERSION" -t "$GITHUB_SHA" "$VERSION"
|
||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
- name: Create draft pre-release
|
||||
uses: softprops/action-gh-release@v2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
name: ${{ steps.tag_name.outputs.version }}
|
||||
tag_name: ${{ steps.tag_name.outputs.version }}
|
||||
files: "release_artifacts/**/*"
|
||||
fail_on_unmatched_files: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
build_source:
|
||||
name: Build source tarball
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
steps:
|
||||
|
@ -180,16 +190,16 @@ jobs:
|
|||
- name: Build source tarball
|
||||
working-directory: bin
|
||||
run: ../dist/maketarball.sh
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_source
|
||||
path: bin/clementine-*.tar.xz
|
||||
|
||||
build_fedora_36:
|
||||
name: Build Fedora 36 RPM
|
||||
runs-on: ubuntu-22.04
|
||||
build_fedora_39:
|
||||
name: Build Fedora 39 RPM
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: fedora:36
|
||||
image: fedora:39
|
||||
env:
|
||||
RPM_BUILD_NCPUS: "2"
|
||||
steps:
|
||||
|
@ -200,6 +210,7 @@ jobs:
|
|||
alsa-lib-devel
|
||||
boost-devel
|
||||
cmake
|
||||
cryptopp
|
||||
cryptopp-devel
|
||||
dbus-devel
|
||||
desktop-file-utils
|
||||
|
@ -229,6 +240,8 @@ jobs:
|
|||
qt5-qtbase-devel
|
||||
qt5-qtx11extras-devel
|
||||
qt5-rpm-macros
|
||||
qtsingleapplication-qt5-devel
|
||||
qtsinglecoreapplication-qt5-devel
|
||||
rpmdevtools
|
||||
sha2-devel
|
||||
sparsehash-devel
|
||||
|
@ -240,7 +253,7 @@ jobs:
|
|||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
- name: cmake
|
||||
working-directory: bin
|
||||
run: cmake ..
|
||||
run: cmake -DUSE_SYSTEM_QTSINGLEAPPLICATION=On ..
|
||||
- name: Build source tarball
|
||||
working-directory: bin
|
||||
run: ../dist/maketarball.sh
|
||||
|
@ -252,16 +265,16 @@ jobs:
|
|||
- name: Build RPM
|
||||
working-directory: bin
|
||||
run: rpmbuild -ba ../dist/clementine.spec
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_fedora_36
|
||||
name: release_fedora_39
|
||||
path: ~/rpmbuild/RPMS/*/clementine-*.rpm
|
||||
|
||||
build_fedora_37:
|
||||
name: Build Fedora 37 RPM
|
||||
runs-on: ubuntu-22.04
|
||||
build_fedora_40:
|
||||
name: Build Fedora 40 RPM
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: fedora:37
|
||||
image: fedora:40
|
||||
env:
|
||||
RPM_BUILD_NCPUS: "2"
|
||||
steps:
|
||||
|
@ -272,6 +285,7 @@ jobs:
|
|||
alsa-lib-devel
|
||||
boost-devel
|
||||
cmake
|
||||
cryptopp
|
||||
cryptopp-devel
|
||||
dbus-devel
|
||||
desktop-file-utils
|
||||
|
@ -301,6 +315,8 @@ jobs:
|
|||
qt5-qtbase-devel
|
||||
qt5-qtx11extras-devel
|
||||
qt5-rpm-macros
|
||||
qtsingleapplication-qt5-devel
|
||||
qtsinglecoreapplication-qt5-devel
|
||||
rpmdevtools
|
||||
sha2-devel
|
||||
sparsehash-devel
|
||||
|
@ -312,7 +328,7 @@ jobs:
|
|||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
- name: cmake
|
||||
working-directory: bin
|
||||
run: cmake ..
|
||||
run: cmake -DUSE_SYSTEM_QTSINGLEAPPLICATION=On ..
|
||||
- name: Build source tarball
|
||||
working-directory: bin
|
||||
run: ../dist/maketarball.sh
|
||||
|
@ -324,14 +340,14 @@ jobs:
|
|||
- name: Build RPM
|
||||
working-directory: bin
|
||||
run: rpmbuild -ba ../dist/clementine.spec
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_fedora_37
|
||||
name: release_fedora_40
|
||||
path: ~/rpmbuild/RPMS/*/clementine-*.rpm
|
||||
|
||||
build_mingw:
|
||||
name: Build Windows Installer
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: eu.gcr.io/clementine-data/mingw-w64:latest
|
||||
env:
|
||||
|
@ -517,132 +533,14 @@ jobs:
|
|||
- name: Build Windows installer
|
||||
working-directory: dist/windows
|
||||
run: makensis clementine.nsi
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_mingw
|
||||
path: dist/windows/ClementineSetup*.exe
|
||||
|
||||
build_stretch_64:
|
||||
name: Build Debian Stretch 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: debian:stretch
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: >
|
||||
apt-get update && apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
gettext
|
||||
git
|
||||
libasound2-dev
|
||||
libboost-dev
|
||||
libcdio-dev
|
||||
libchromaprint-dev
|
||||
libcrypto++-dev
|
||||
libdbus-1-dev
|
||||
libfftw3-dev
|
||||
libglew1.5-dev
|
||||
libglib2.0-dev
|
||||
libgpod-dev
|
||||
libgstreamer-plugins-base1.0-dev
|
||||
libgstreamer1.0-dev
|
||||
liblastfm5-dev
|
||||
libmtp-dev
|
||||
libmygpo-qt-dev
|
||||
libprotobuf-dev
|
||||
libpulse-dev
|
||||
libqt5x11extras5-dev
|
||||
libsparsehash-dev
|
||||
libsqlite3-dev
|
||||
libtag1-dev
|
||||
pkg-config
|
||||
protobuf-compiler
|
||||
qtbase5-dev
|
||||
qttools5-dev-tools
|
||||
qttools5-dev
|
||||
ssh
|
||||
- uses: actions/checkout@v1.2.0
|
||||
- name: git hackery
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
- name: cmake
|
||||
working-directory: bin
|
||||
run: >
|
||||
cmake ..
|
||||
-DWITH_DEBIAN=ON
|
||||
-DDEB_ARCH=amd64
|
||||
-DDEB_DIST=stretch
|
||||
-DENABLE_SPOTIFY_BLOB=OFF
|
||||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: release_stretch_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_bionic_64:
|
||||
name: Build Ubuntu Bionic 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: ubuntu:bionic
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: >
|
||||
apt-get update && apt-get install -y
|
||||
build-essential
|
||||
cmake
|
||||
gettext
|
||||
git
|
||||
libasound2-dev
|
||||
libboost-dev
|
||||
libcdio-dev
|
||||
libchromaprint-dev
|
||||
libdbus-1-dev
|
||||
libfftw3-dev
|
||||
libglew1.5-dev
|
||||
libglib2.0-dev
|
||||
libgpod-dev
|
||||
libgstreamer-plugins-base1.0-dev
|
||||
libgstreamer1.0-dev
|
||||
liblastfm5-dev
|
||||
libmtp-dev
|
||||
libprotobuf-dev
|
||||
libpulse-dev
|
||||
libqt5x11extras5-dev
|
||||
libsqlite3-dev
|
||||
libtag1-dev
|
||||
pkg-config
|
||||
protobuf-compiler
|
||||
qtbase5-dev
|
||||
qttools5-dev-tools
|
||||
qttools5-dev
|
||||
libsparsehash-dev
|
||||
ssh
|
||||
- uses: actions/checkout@v1.2.0
|
||||
- name: git hackery
|
||||
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
- name: cmake
|
||||
working-directory: bin
|
||||
run: >
|
||||
cmake ..
|
||||
-DWITH_DEBIAN=ON
|
||||
-DDEB_ARCH=amd64
|
||||
-DDEB_DIST=bionic
|
||||
-DENABLE_SPOTIFY_BLOB=OFF
|
||||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: release_bionic_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_bullseye_64:
|
||||
name: Build Debian Bullseye 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: debian:bullseye
|
||||
steps:
|
||||
|
@ -695,14 +593,14 @@ jobs:
|
|||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_bullseye_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_buster_64:
|
||||
name: Build Debian Buster 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: debian:buster
|
||||
steps:
|
||||
|
@ -754,14 +652,14 @@ jobs:
|
|||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_buster_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_focal_64:
|
||||
name: Build Ubuntu Focal 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: ubuntu:focal
|
||||
steps:
|
||||
|
@ -819,14 +717,14 @@ jobs:
|
|||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_focal_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_jammy_64:
|
||||
name: Build Ubuntu Jammy 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: ubuntu:jammy
|
||||
steps:
|
||||
|
@ -887,16 +785,16 @@ jobs:
|
|||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_jammy_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_kinetic_64:
|
||||
name: Build Ubuntu Kinetic 64-bit deb
|
||||
runs-on: ubuntu-22.04
|
||||
build_noble_64:
|
||||
name: Build Ubuntu Noble 64-bit deb
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: ubuntu:kinetic
|
||||
image: ubuntu:noble
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
env:
|
||||
|
@ -950,17 +848,18 @@ jobs:
|
|||
cmake ..
|
||||
-DWITH_DEBIAN=ON
|
||||
-DDEB_ARCH=amd64
|
||||
-DDEB_DIST=kinetic
|
||||
-DDEB_DIST=noble
|
||||
-DENABLE_SPOTIFY_BLOB=OFF
|
||||
- name: make
|
||||
working-directory: bin
|
||||
run : make -j2 deb
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_kinetic_64
|
||||
name: release_noble_64
|
||||
path: bin/clementine_*.deb
|
||||
|
||||
build_mac:
|
||||
if: false
|
||||
name: Build Mac DMG
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
|
@ -1021,7 +920,7 @@ jobs:
|
|||
- name: Build DMG
|
||||
working-directory: bin
|
||||
run: make dmg
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release_mac
|
||||
path: bin/clementine-*.dmg
|
||||
|
|
|
@ -8,18 +8,20 @@ jobs:
|
|||
name: Pull translations from Transifex
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: ubuntu:bionic
|
||||
image: ubuntu:jammy
|
||||
steps:
|
||||
- uses: supplypike/setup-bin@v3
|
||||
with:
|
||||
uri: https://github.com/transifex/cli/releases/download/v1.6.7/tx-linux-amd64.tar.gz
|
||||
name: tx
|
||||
version: 1.6.7
|
||||
- name: Install dependencies
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: >
|
||||
apt-get update && apt-get install -y
|
||||
git
|
||||
python3-pip
|
||||
ssh
|
||||
- name: Install tx
|
||||
run: pip3 install transifex-client==0.13.9
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1.2.0
|
||||
- name: git hackery
|
||||
|
@ -29,15 +31,15 @@ jobs:
|
|||
- name: tx init
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
run: tx init --no-interactive --force
|
||||
run: tx init
|
||||
- name: tx config
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
run: tx config mapping --execute -r clementine.clementineplayer -s en -t PO --expression 'src/translations/<lang>.po'
|
||||
run: tx add --organization davidsansome --project clementine --resource clementineplayer --file-filter 'src/translations/<lang>.po' --type PO src/translations/en.po
|
||||
- name: tx pull
|
||||
env:
|
||||
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
||||
run: tx pull --all -f --no-interactive
|
||||
run: tx pull -f -a
|
||||
- name: Setup git SSH
|
||||
uses: webfactory/ssh-agent@v0.4.1
|
||||
with:
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
/* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "Json.h"
|
||||
|
||||
// Qt version specific includes
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
#include <QJsonDocument>
|
||||
#include <QMetaProperty>
|
||||
#else
|
||||
#include <qjson/parser.h>
|
||||
#include <qjson/qobjecthelper.h>
|
||||
#include <qjson/serializer.h>
|
||||
#endif
|
||||
|
||||
namespace QJsonWrapper
|
||||
{
|
||||
|
||||
QVariantMap
|
||||
qobject2qvariant( const QObject* object )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QVariantMap map;
|
||||
if ( object == NULL )
|
||||
{
|
||||
return map;
|
||||
}
|
||||
|
||||
const QMetaObject* metaObject = object->metaObject();
|
||||
for ( int i = 0; i < metaObject->propertyCount(); ++i )
|
||||
{
|
||||
QMetaProperty metaproperty = metaObject->property( i );
|
||||
if ( metaproperty.isReadable() )
|
||||
{
|
||||
map[ QLatin1String( metaproperty.name() ) ] = object->property( metaproperty.name() );
|
||||
}
|
||||
}
|
||||
return map;
|
||||
#else
|
||||
return QJson::QObjectHelper::qobject2qvariant( object );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
qvariant2qobject( const QVariantMap& variant, QObject* object )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
for ( QVariantMap::const_iterator iter = variant.begin(); iter != variant.end(); ++iter )
|
||||
{
|
||||
QVariant property = object->property( iter.key().toLatin1() );
|
||||
Q_ASSERT( property.isValid() );
|
||||
if ( property.isValid() )
|
||||
{
|
||||
QVariant value = iter.value();
|
||||
if ( value.canConvert( property.type() ) )
|
||||
{
|
||||
value.convert( property.type() );
|
||||
object->setProperty( iter.key().toLatin1(), value );
|
||||
} else if ( QString( QLatin1String("QVariant") ).compare( QLatin1String( property.typeName() ) ) == 0 ) {
|
||||
object->setProperty( iter.key().toLatin1(), value );
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
QJson::QObjectHelper::qvariant2qobject( variant, object );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
parseJson( const QByteArray& jsonData, bool* ok )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QJsonParseError error;
|
||||
QJsonDocument doc = QJsonDocument::fromJson( jsonData, &error );
|
||||
if ( ok != NULL )
|
||||
{
|
||||
*ok = ( error.error == QJsonParseError::NoError );
|
||||
}
|
||||
return doc.toVariant();
|
||||
#else
|
||||
QJson::Parser p;
|
||||
return p.parse( jsonData, ok );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
toJson( const QVariant &variant, bool* ok )
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
||||
QJsonDocument doc = QJsonDocument::fromVariant( variant );
|
||||
if ( ok != NULL )
|
||||
{
|
||||
*ok = !doc.isNull();
|
||||
}
|
||||
return doc.toJson( QJsonDocument::Compact );
|
||||
#else
|
||||
QJson::Serializer serializer;
|
||||
QByteArray ret = serializer.serialize(variant);
|
||||
if ( ok != NULL )
|
||||
{
|
||||
*ok = !ret.isNull();
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/* Copyright 2014, Uwe L. Korn <uwelk@xhochy.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef QJSONWRAPPER_JSON_H
|
||||
#define QJSONWRAPPER_JSON_H
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
namespace QJsonWrapper
|
||||
{
|
||||
QVariantMap qobject2qvariant( const QObject* object );
|
||||
void qvariant2qobject( const QVariantMap& variant, QObject* object );
|
||||
QVariant parseJson( const QByteArray& jsonData, bool* ok = 0 );
|
||||
QByteArray toJson( const QVariant &variant, bool* ok = 0 );
|
||||
}
|
||||
|
||||
#endif // QJSONWRAPPER_JSON_H
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
project(clementine)
|
||||
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
cmake_policy(SET CMP0053 OLD)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
@ -18,10 +18,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
|||
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX 1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --stdlib=libc++")
|
||||
if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --stdlib=libc++")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
find_program(CCACHE_EXECUTABLE NAMES ccache)
|
||||
|
@ -347,11 +346,18 @@ include_directories("3rdparty/qsqlite")
|
|||
|
||||
# When/if upstream accepts our patches then these options can be used to link
|
||||
# to system installed qtsingleapplication instead.
|
||||
option(USE_SYSTEM_QTSINGLEAPPLICATION "Don't set this option unless your system QtSingleApplication library has been compiled with the Clementine patches in 3rdparty" OFF)
|
||||
option(USE_SYSTEM_QTSINGLEAPPLICATION "Use the system-provided QtSingleApplication library (needs to have clementine patches, but these seem to be in Qt5)" OFF)
|
||||
if(USE_SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions)
|
||||
find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6)
|
||||
find_library(QTSINGLECOREAPPLICATION_LIBRARIES Qt5Solutions_SingleCoreApplication-2.6)
|
||||
find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions REQUIRED)
|
||||
find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6 REQUIRED)
|
||||
add_library(qtsingleapplication INTERFACE)
|
||||
target_link_libraries(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_LIBRARIES)
|
||||
target_include_directories(qtsingleapplication INTERFACE QTSINGLEAPPLICATION_INCLUDE_DIRS)
|
||||
find_path(QTSINGLECOREAPPLICATION_INCLUDE_DIRS qtsinglecoreapplication.h PATH_SUFFIXES qt5/QtSolutions REQUIRED)
|
||||
find_library(QTSINGLECOREAPPLICATION_LIBRARIES Qt5Solutions_SingleCoreApplication-2.6 REQUIRED)
|
||||
add_library(qtsinglecoreapplication INTERFACE)
|
||||
target_link_libraries(qtsinglecoreapplication INTERFACE QTSINGLECOREAPPLICATION_LIBRARIES)
|
||||
target_include_directories(qtsinglecoreapplication INTERFACE QTSINGLECOREAPPLICATION_INCLUDE_DIRS)
|
||||
else(USE_SYSTEM_QTSINGLEAPPLICATION)
|
||||
add_subdirectory(3rdparty/qtsingleapplication)
|
||||
set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication)
|
||||
|
|
|
@ -41,7 +41,7 @@ Compile and install:
|
|||
|
||||
cd bin
|
||||
cmake ..
|
||||
make -j8
|
||||
make -j$(nproc)
|
||||
sudo make install
|
||||
|
||||
See the Wiki for more instructions and a list of dependencies:
|
||||
|
|
|
@ -88,17 +88,6 @@
|
|||
<item begin="</a" end=">"/>
|
||||
</exclude>
|
||||
</provider>
|
||||
<provider name="hindilyrics.net (Bollywood songs)" title="{title} ({album})" charset="utf-8" url="http://www.hindilyrics.net/lyrics/of-{Title}.html">
|
||||
<urlFormat replace=" _@;\/"'()[]" with="%20"/>
|
||||
<urlFormat replace="?" with=""/>
|
||||
<extract>
|
||||
<item begin="<div class=nm>Movie</div>:" end="</pre>"/>
|
||||
</extract>
|
||||
<exclude>
|
||||
<item begin="<span class=" end="">"/>
|
||||
</exclude>
|
||||
<invalidIndicator value="Couldn't find that page."/>
|
||||
</provider>
|
||||
<provider name="letras.mus.br" title="" charset="utf-8" url="https://www.letras.mus.br/winamp.php?musica={title}&artista={artist}">
|
||||
<urlFormat replace="_@,;&\/"" with="_"/>
|
||||
<urlFormat replace=" " with="+"/>
|
||||
|
@ -114,13 +103,6 @@
|
|||
</extract>
|
||||
<invalidIndicator value="ERROR"/>
|
||||
</provider>
|
||||
<provider name="loudson.gs" title="" charset="utf-8" url="http://www.loudson.gs/{a}/{artist}/{album}/{title}">
|
||||
<urlFormat replace=" _@,;&\/"" with="-"/>
|
||||
<urlFormat replace="." with=""/>
|
||||
<extract>
|
||||
<item tag="<div class="middle_col_TracksLyrics ">"/>
|
||||
</extract>
|
||||
</provider>
|
||||
<provider name="lyrics.com" title="{artist} - {title} Lyrics" charset="utf-8" url="http://www.lyrics.com/lyrics/{artist}/{title}.html">
|
||||
<urlFormat replace=" _@,;&\/"" with="-"/>
|
||||
<urlFormat replace="'." with=""/>
|
||||
|
@ -194,14 +176,6 @@
|
|||
</extract>
|
||||
<invalidIndicator value="Page not Found"/>
|
||||
</provider>
|
||||
<provider name="lyricstime.com" title="{artist} - {title} Lyrics" charset="iso-8859-1" url="http://www.lyricstime.com/{artist}-{title}-lyrics.html">
|
||||
<urlFormat replace=" _@,;&\/"'" with="-"/>
|
||||
<urlFormat replace="." with=""/>
|
||||
<extract>
|
||||
<item tag="<div id="songlyrics" >"/>
|
||||
<item tag="<p>"/>
|
||||
</extract>
|
||||
</provider>
|
||||
<provider name="lyriki.com" title="" charset="utf-8" url="http://www.lyriki.com/{artist}:{title}">
|
||||
<urlFormat replace=" _@,;&\/"" with="_"/>
|
||||
<urlFormat replace="." with=""/>
|
||||
|
@ -210,20 +184,6 @@
|
|||
<item tag="<p>"/>
|
||||
</extract>
|
||||
</provider>
|
||||
<provider name="metrolyrics.com" title="{artist} - {title} LYRICS" charset="utf-8" url="http://www.metrolyrics.com/{title}-lyrics-{artist}.html">
|
||||
<urlFormat replace=" _@,;&\/"" with="-"/>
|
||||
<urlFormat replace="'." with=""/>
|
||||
<extract>
|
||||
<item tag="<span id="lyrics">"/>
|
||||
</extract>
|
||||
<extract>
|
||||
<item tag="<div id="lyrics">"/>
|
||||
</extract>
|
||||
<exclude>
|
||||
<item tag="<h5>"/>
|
||||
</exclude>
|
||||
<invalidIndicator value="These lyrics are missing"/>
|
||||
</provider>
|
||||
<provider name="mp3lyrics.org" title="{artist} &quot;{title}&quot; Lyrics" charset="utf-8" url="http://www.mp3lyrics.org/{a}/{artist}/{title}/">
|
||||
<urlFormat replace=" _@,;&\/"" with="-"/>
|
||||
<urlFormat replace="'." with=""/>
|
||||
|
@ -251,13 +211,6 @@
|
|||
</exclude>
|
||||
<invalidIndicator value="We couldn't find that page."/>
|
||||
</provider>
|
||||
<provider name="seeklyrics.com" title="{artist} - {title} Lyrics" charset="iso-8859-1" url="http://www.seeklyrics.com/lyrics/{Artist}/{Title}.html">
|
||||
<urlFormat replace=" _@,;&\/'"" with="-"/>
|
||||
<urlFormat replace="." with=""/>
|
||||
<extract>
|
||||
<item tag="<div id="songlyrics">"/>
|
||||
</extract>
|
||||
</provider>
|
||||
<provider name="songlyrics.com" title="{title} LYRICS - {artist}" charset="utf-8" url="http://www.songlyrics.com/{artist}/{title}-lyrics/">
|
||||
<urlFormat replace=" ._@,;&\/"" with="-"/>
|
||||
<urlFormat replace="'" with="_"/>
|
||||
|
|
|
@ -18,6 +18,7 @@ BuildRequires: liblastfm-qt5-devel
|
|||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libappstream-glib
|
||||
BuildRequires: qtsingleapplication-qt5-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
|
@ -29,7 +30,6 @@ BuildRequires: pkgconfig(protobuf)
|
|||
BuildRequires: pkgconfig(sqlite3) >= 3.7
|
||||
BuildRequires: pkgconfig(taglib) >= 1.11
|
||||
BuildRequires: pkgconfig(glew)
|
||||
BuildRequires: pkgconfig(cryptopp)
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
|
@ -46,12 +46,13 @@ BuildRequires: pkgconfig(gstreamer-app-1.0)
|
|||
BuildRequires: pkgconfig(gstreamer-audio-1.0)
|
||||
BuildRequires: pkgconfig(gstreamer-base-1.0)
|
||||
BuildRequires: pkgconfig(gstreamer-tag-1.0)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libcdio)
|
||||
BuildRequires: pkgconfig(libchromaprint)
|
||||
BuildRequires: pkgconfig(libcryptopp)
|
||||
BuildRequires: pkgconfig(libgpod-1.0)
|
||||
BuildRequires: pkgconfig(libmtp)
|
||||
BuildRequires: pkgconfig(libnotify)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libudf)
|
||||
|
||||
# GStreamer codec dependencies
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include "core/song.h"
|
||||
|
||||
class TranscoderPreset;
|
||||
struct TranscoderPreset;
|
||||
|
||||
class OrganiseFormat {
|
||||
public:
|
||||
|
|
|
@ -41,16 +41,16 @@ class DigitallyImportedServiceBase : public InternetService {
|
|||
const QString& api_service_name,
|
||||
Application* app, InternetModel* model,
|
||||
bool has_premium, QObject* parent = nullptr);
|
||||
~DigitallyImportedServiceBase();
|
||||
~DigitallyImportedServiceBase() override;
|
||||
|
||||
static const char* kSettingsGroup;
|
||||
static const int kStreamsCacheDurationSecs;
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* parent);
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* parent) override;
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() override;
|
||||
|
||||
bool is_premium_account() const;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class IcecastService : public InternetService {
|
|||
|
||||
public:
|
||||
IcecastService(Application* app, InternetModel* parent);
|
||||
~IcecastService();
|
||||
~IcecastService() override;
|
||||
|
||||
static const char* kServiceName;
|
||||
static const char* kDirectoryUrl;
|
||||
|
@ -51,12 +51,12 @@ class IcecastService : public InternetService {
|
|||
Type_Genre,
|
||||
};
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
QWidget* HeaderWidget() const;
|
||||
QWidget* HeaderWidget() const override;
|
||||
|
||||
private slots:
|
||||
void LoadDirectory();
|
||||
|
|
|
@ -39,7 +39,7 @@ class IntergalacticFMServiceBase : public InternetService {
|
|||
const QString& name, const QUrl& channel_list_url,
|
||||
const QUrl& homepage_url,
|
||||
const QUrl& donate_page_url, const QIcon& icon);
|
||||
~IntergalacticFMServiceBase();
|
||||
~IntergalacticFMServiceBase() override;
|
||||
|
||||
enum ItemType {
|
||||
Type_Stream = 2000,
|
||||
|
@ -59,14 +59,14 @@ class IntergalacticFMServiceBase : public InternetService {
|
|||
const QString& url_scheme() const { return url_scheme_; }
|
||||
const QIcon& icon() const { return icon_; }
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
PlaylistItem::Options playlistitem_options() const;
|
||||
PlaylistItem::Options playlistitem_options() const override;
|
||||
QNetworkAccessManager* network() const { return network_; }
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() override;
|
||||
|
||||
bool IsStreamListStale() const { return streams_.IsStale(); }
|
||||
StreamList Streams();
|
||||
|
|
|
@ -34,7 +34,7 @@ class SavedRadio : public InternetService {
|
|||
|
||||
public:
|
||||
SavedRadio(Application* app, InternetModel* parent);
|
||||
~SavedRadio();
|
||||
~SavedRadio() override;
|
||||
|
||||
enum ItemType {
|
||||
Type_Stream = 2000,
|
||||
|
@ -57,10 +57,10 @@ class SavedRadio : public InternetService {
|
|||
static const char* kServiceName;
|
||||
static const char* kSettingsGroup;
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
void Add(const QUrl& url, const QString& name = QString(),
|
||||
const QUrl& url_logo = QUrl());
|
||||
|
|
|
@ -43,14 +43,14 @@ class JamendoService : public InternetService {
|
|||
|
||||
public:
|
||||
JamendoService(Application* app, InternetModel* parent);
|
||||
~JamendoService();
|
||||
~JamendoService() override;
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
QWidget* HeaderWidget() const;
|
||||
QWidget* HeaderWidget() const override;
|
||||
|
||||
LibraryBackend* library_backend() const { return library_backend_.get(); }
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class MagnatuneService : public InternetService {
|
|||
|
||||
public:
|
||||
MagnatuneService(Application* app, InternetModel* parent);
|
||||
~MagnatuneService();
|
||||
~MagnatuneService() override;
|
||||
|
||||
// Values are saved in QSettings and are indices into the combo box in
|
||||
// MagnatuneConfig
|
||||
|
@ -71,14 +71,14 @@ class MagnatuneService : public InternetService {
|
|||
|
||||
static QString ReadElementText(QXmlStreamReader& reader);
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
QWidget* HeaderWidget() const;
|
||||
QWidget* HeaderWidget() const override;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() override;
|
||||
|
||||
// Magnatune specific stuff
|
||||
MembershipType membership_type() const { return membership_; }
|
||||
|
@ -99,7 +99,7 @@ class MagnatuneService : public InternetService {
|
|||
|
||||
void Download();
|
||||
void Homepage();
|
||||
void ShowConfig();
|
||||
void ShowConfig() override;
|
||||
|
||||
private:
|
||||
void EnsureMenuCreated();
|
||||
|
|
|
@ -44,7 +44,7 @@ class PodcastService : public InternetService {
|
|||
|
||||
public:
|
||||
PodcastService(Application* app, InternetModel* parent);
|
||||
~PodcastService();
|
||||
~PodcastService() override;
|
||||
|
||||
static const char* kServiceName;
|
||||
static const char* kSettingsGroup;
|
||||
|
@ -57,12 +57,12 @@ class PodcastService : public InternetService {
|
|||
|
||||
enum Role { Role_Podcast = InternetModel::RoleCount, Role_Episode };
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* parent);
|
||||
bool has_initial_load_settings() const { return true; }
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
void ReloadSettings();
|
||||
void InitialLoadSettings();
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* parent) override;
|
||||
bool has_initial_load_settings() const override { return true; }
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
void ReloadSettings() override;
|
||||
void InitialLoadSettings() override;
|
||||
// Called by SongLoader when the user adds a Podcast URL directly. Adds a
|
||||
// subscription to the podcast and displays it in the UI. If the QVariant
|
||||
// contains an OPML file then this displays it in the Add Podcast dialog.
|
||||
|
@ -81,7 +81,7 @@ class PodcastService : public InternetService {
|
|||
void DeleteDownloadedData();
|
||||
void SetNew();
|
||||
void SetListened();
|
||||
void ShowConfig();
|
||||
void ShowConfig() override;
|
||||
|
||||
void SubscriptionAdded(const Podcast& podcast);
|
||||
void SubscriptionRemoved(const Podcast& podcast);
|
||||
|
|
|
@ -35,7 +35,7 @@ class RadioBrowserService : public InternetService {
|
|||
|
||||
public:
|
||||
RadioBrowserService(Application* app, InternetModel* parent);
|
||||
~RadioBrowserService(){};
|
||||
~RadioBrowserService() override{};
|
||||
|
||||
enum ItemType {
|
||||
Type_Stream = 2000,
|
||||
|
|
|
@ -39,7 +39,7 @@ class SomaFMServiceBase : public InternetService {
|
|||
const QString& name, const QUrl& channel_list_url,
|
||||
const QUrl& homepage_url, const QUrl& donate_page_url,
|
||||
const QIcon& icon);
|
||||
~SomaFMServiceBase();
|
||||
~SomaFMServiceBase() override;
|
||||
|
||||
enum ItemType {
|
||||
Type_Stream = 2000,
|
||||
|
@ -59,14 +59,14 @@ class SomaFMServiceBase : public InternetService {
|
|||
const QString& url_scheme() const { return url_scheme_; }
|
||||
const QIcon& icon() const { return icon_; }
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
|
||||
PlaylistItem::Options playlistitem_options() const;
|
||||
PlaylistItem::Options playlistitem_options() const override;
|
||||
QNetworkAccessManager* network() const { return network_; }
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() override;
|
||||
|
||||
bool IsStreamListStale() const { return streams_.IsStale(); }
|
||||
StreamList Streams();
|
||||
|
|
|
@ -530,6 +530,11 @@ void SubsonicLibraryScanner::OnGetAlbumFinished(QNetworkReply* reply) {
|
|||
|
||||
// Read song information
|
||||
while (reader.readNextStartElement()) {
|
||||
// skip multi-artist and multi-genre tags
|
||||
if ((reader.name() == "artists") || (reader.name() == "genres")) {
|
||||
reader.skipCurrentElement();
|
||||
continue;
|
||||
}
|
||||
if (reader.name() != "song") {
|
||||
ParsingError("song tag expected. Aborting scan.");
|
||||
return;
|
||||
|
|
|
@ -42,7 +42,7 @@ class SubsonicService : public InternetService {
|
|||
|
||||
public:
|
||||
SubsonicService(Application* app, InternetModel* parent);
|
||||
~SubsonicService();
|
||||
~SubsonicService() override;
|
||||
|
||||
enum LoginState {
|
||||
LoginState_Loggedin,
|
||||
|
@ -90,11 +90,11 @@ class SubsonicService : public InternetService {
|
|||
bool IsConfigured() const;
|
||||
bool IsAmpache() const;
|
||||
|
||||
QStandardItem* CreateRootItem();
|
||||
void LazyPopulate(QStandardItem* item);
|
||||
void ShowContextMenu(const QPoint& global_pos);
|
||||
QWidget* HeaderWidget() const;
|
||||
void ReloadSettings();
|
||||
QStandardItem* CreateRootItem() override;
|
||||
void LazyPopulate(QStandardItem* item) override;
|
||||
void ShowContextMenu(const QPoint& global_pos) override;
|
||||
QWidget* HeaderWidget() const override;
|
||||
void ReloadSettings() override;
|
||||
|
||||
void Login();
|
||||
void Login(const QString& server, const QString& username,
|
||||
|
@ -175,7 +175,7 @@ class SubsonicService : public InternetService {
|
|||
void OnLoginStateChanged(SubsonicService::LoginState newstate);
|
||||
void OnPingFinished(QNetworkReply* reply);
|
||||
|
||||
void ShowConfig();
|
||||
void ShowConfig() override;
|
||||
};
|
||||
|
||||
class SubsonicLibraryScanner : public QObject {
|
||||
|
@ -184,7 +184,7 @@ class SubsonicLibraryScanner : public QObject {
|
|||
public:
|
||||
explicit SubsonicLibraryScanner(SubsonicService* service,
|
||||
QObject* parent = nullptr);
|
||||
~SubsonicLibraryScanner();
|
||||
~SubsonicLibraryScanner() override;
|
||||
|
||||
void Scan();
|
||||
const SongList& GetSongs() const { return songs_; }
|
||||
|
|
|
@ -896,7 +896,7 @@ LibraryBackend::AlbumList LibraryBackend::GetAlbums(const QString& artist,
|
|||
QString last_artist;
|
||||
QString last_album_artist;
|
||||
while (query.Next()) {
|
||||
bool compilation = query.Value(3).toBool() | query.Value(4).toBool();
|
||||
bool compilation = query.Value(3).toBool() || query.Value(4).toBool();
|
||||
|
||||
Album info;
|
||||
info.artist = compilation ? QString() : query.Value(1).toString();
|
||||
|
|
|
@ -92,12 +92,10 @@ void MoodbarBuilder::Normalize(QList<Rgb>* vals, double Rgb::*member) {
|
|||
}
|
||||
|
||||
double avg = 0;
|
||||
int t = 0;
|
||||
for (const Rgb& rgb : *vals) {
|
||||
const double value = rgb.*member;
|
||||
if (value != mini && value != maxi) {
|
||||
avg += value / vals->count();
|
||||
t++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ void OutgoingDataCreator::CheckEnabledProviders() {
|
|||
<< "lyricstime.com"
|
||||
<< "lyricsreg.com"
|
||||
<< "lyricsmania.com"
|
||||
<< "metrolyrics.com"
|
||||
<< "azlyrics.com"
|
||||
<< "songlyrics.com"
|
||||
<< "elyrics.net"
|
||||
|
@ -106,7 +105,6 @@ void OutgoingDataCreator::CheckEnabledProviders() {
|
|||
<< "lyrics.com"
|
||||
<< "lyricsbay.com"
|
||||
<< "directlyrics.com"
|
||||
<< "loudson.gs"
|
||||
<< "teksty.org"
|
||||
<< "tekstowo.pl (Polish translations)"
|
||||
<< "vagalume.uol.com.br"
|
||||
|
|
|
@ -1729,13 +1729,11 @@ PlaylistItemList Playlist::RemoveItemsWithoutUndo(int row, int count) {
|
|||
endRemoveRows();
|
||||
|
||||
QList<int>::iterator it = virtual_items_.begin();
|
||||
int i = 0;
|
||||
while (it != virtual_items_.end()) {
|
||||
if (*it >= items_.count())
|
||||
it = virtual_items_.erase(it);
|
||||
else
|
||||
++it;
|
||||
++i;
|
||||
}
|
||||
|
||||
// Reset current_virtual_index_
|
||||
|
|
|
@ -34,12 +34,6 @@
|
|||
#undef AddJob
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
const char kWavHeaderRiffMarker[] = "RIFF";
|
||||
const char kWavFileTypeFormatChunk[] = "WAVEfmt ";
|
||||
const char kWavDataString[] = "data";
|
||||
} // namespace
|
||||
|
||||
Ripper::Ripper(int track_count, QObject* parent)
|
||||
: QObject(parent),
|
||||
track_count_(track_count),
|
||||
|
|
|
@ -90,10 +90,8 @@ void SongInfoView::ReloadSettings() {
|
|||
|
||||
QVariantList default_order;
|
||||
default_order << "lyrics.wikia.com"
|
||||
<< "lyricstime.com"
|
||||
<< "lyricsreg.com"
|
||||
<< "lyricsmania.com"
|
||||
<< "metrolyrics.com"
|
||||
<< "azlyrics.com"
|
||||
<< "songlyrics.com"
|
||||
<< "elyrics.net"
|
||||
|
@ -101,7 +99,6 @@ void SongInfoView::ReloadSettings() {
|
|||
<< "lyrics.com"
|
||||
<< "lyricsbay.com"
|
||||
<< "directlyrics.com"
|
||||
<< "loudson.gs"
|
||||
<< "teksty.org"
|
||||
<< "tekstowo.pl (Polish translations)"
|
||||
<< "vagalume.uol.com.br"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1262,10 +1262,14 @@ void MainWindow::TrackSkipped(PlaylistItemPtr item) {
|
|||
|
||||
const qint64 seconds_left = (length - position) / kNsecPerSec;
|
||||
const qint64 seconds_total = length / kNsecPerSec;
|
||||
const qint64 seconds_listened = position / kNsecPerSec;
|
||||
|
||||
if (((0.05 * seconds_total > 60 && percentage < 0.98) ||
|
||||
percentage < 0.95) &&
|
||||
seconds_left > 5) { // Never count the skip if under 5 seconds left
|
||||
(seconds_left > 5 &&
|
||||
5 < seconds_listened)) { // Never count the skip if under 5 seconds
|
||||
// left. Or we haven't listened for more than
|
||||
// 5 seconds.
|
||||
app_->library_backend()->IncrementSkipCountAsync(song.id(), percentage);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue