Compare commits

...

66 Commits

Author SHA1 Message Date
Clementine Buildbot 650bd81508 Automatic merge of translations from Transifex 2024-05-17 02:32:22 +00:00
Clementine Buildbot 7607ddcb96 Automatic merge of translations from Transifex 2024-05-12 02:33:06 +00:00
Clementine Buildbot e249911937 Automatic merge of translations from Transifex 2024-05-05 02:32:03 +00:00
Clementine Buildbot 4ae57a4b5d Automatic merge of translations from Transifex 2024-05-03 02:32:14 +00:00
Clementine Buildbot 2f3464403b Automatic merge of translations from Transifex 2024-04-25 02:31:15 +00:00
Clementine Buildbot f76dbffa6b Automatic merge of translations from Transifex 2024-03-24 02:30:19 +00:00
Clementine Buildbot fbb266adc2 Automatic merge of translations from Transifex 2024-03-15 02:29:14 +00:00
Clementine Buildbot 9638ac70b3 Automatic merge of translations from Transifex 2024-03-13 02:29:55 +00:00
Clementine Buildbot c93b4e1149 Automatic merge of translations from Transifex 2024-02-27 02:27:58 +00:00
Clementine Buildbot d014a315c9 Automatic merge of translations from Transifex 2024-02-23 02:28:36 +00:00
Isaiah W df4181940d oops (:
this is what I meant lol
2024-02-08 14:04:03 +00:00
Isaiah W ebe3c45476 Fix Instructions™
uses all of your cores if you have more than 8, or doesn't try to use more than you have if you have less (:
2024-02-08 14:04:03 +00:00
Clementine Buildbot 634910238d Automatic merge of translations from Transifex 2024-01-03 02:31:14 +00:00
Clementine Buildbot 62ed69fa3d Automatic merge of translations from Transifex 2023-12-19 02:32:39 +00:00
Clementine Buildbot dd0a94e8a6 Automatic merge of translations from Transifex 2023-12-09 02:30:35 +00:00
Clementine Buildbot 1566148c50 Automatic merge of translations from Transifex 2023-11-29 02:32:39 +00:00
Clementine Buildbot 98a520552b Automatic merge of translations from Transifex 2023-11-26 02:32:33 +00:00
Clementine Buildbot 5968648aa1 Automatic merge of translations from Transifex 2023-11-01 02:31:10 +00:00
Clementine Buildbot f3ddd7eee4 Automatic merge of translations from Transifex 2023-10-22 02:30:09 +00:00
Clementine Buildbot 19b44fb831 Automatic merge of translations from Transifex 2023-10-16 02:30:12 +00:00
Robert-André Mauchin 994d16effa Fix missing QTSINGLECOREAPPLICATION_LIBRARIES
In f3837f95db, QTSINGLECOREAPPLICATION_LIBRARIES was mistakenly removed, which prevents building with USE_SYSTEM_QTSINGLEAPPLICATION enabled.
2023-10-15 13:40:14 +01:00
xoza 4768cb9efb Skip subsonic multi-genre tags 2023-10-12 12:27:43 +01:00
Clementine Buildbot 7b678f26e0 Automatic merge of translations from Transifex 2023-10-02 02:29:29 +00:00
Marcus Müller 3f572a4139 RPM & CI: Build rpm packages against native qtsingleapplication
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-20 17:52:55 +01:00
Marcus Müller f3837f95db CMake: Re-enable usability of system QtSingleApplication
This seem to have gone broken over time.
As far as I can tell, upstream QtSingleApplication works fine!

Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-20 17:52:55 +01:00
Marcus Müller 6820a0a58d 3rdparty: remove unused libmygpo-qt
The -qt5 library is still there, and seems to be used.

Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 16:41:15 +01:00
Marcus Müller cfcddf7c0f src: remove unused variable
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
Marcus Müller 98e24f626b library: use boolean, not bitwise, operator on bools
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
Marcus Müller 8e47ab59e5 internet services: consistently use 'override'
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
Marcus Müller 63208b4e1f core/organisefmt: use same visibility for fwd decl as in def
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
Marcus Müller 20773dee29 CMake: Check for minimum version before setting the project name
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
John Maguire c2a5b9b07e Remove Kinetic build 2023-09-14 14:51:42 +01:00
Quentin Snow de7455eebd Adjusted MainWindow::TrackSkipped to only count song skips if listened to for 5 seconds. 2023-09-13 11:53:37 +01:00
Marcus Müller 2a14ec9d4d Lyrics Providers: Remove unreachable ones
This was determined programmatically by means of trying to do a simple
HTTP request to / of any of the URLs given:

```python
from lxml import etree
from urllib import parse
import requests
doc = etree.parse("ultimate_providers.xml")
root = doc.getroot()
for provider in root:
    parsed_url = parse.urlparse(provider.get("url"))
    url = f"{parsed_url.scheme}://{parsed_url.netloc}/"
    try:
        requests.head(url, timeout=5)
    except Exception as e:
        print(parsed_url.netloc)
```

Note that these were also removed from songinfoview as present, and from
outgoingdatacreator. The two lists there were found to be inconsistent,
but this isn't subject of this PR.

Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-12 13:33:01 +01:00
Clementine Buildbot 86e81cea05 Automatic merge of translations from Transifex 2023-08-26 02:27:18 +00:00
Clementine Buildbot 10570316dd Automatic merge of translations from Transifex 2023-07-22 02:34:48 +00:00
Clementine Buildbot ad8fd81ba9 Automatic merge of translations from Transifex 2023-07-18 02:50:36 +00:00
Clementine Buildbot 6ff5768634 Automatic merge of translations from Transifex 2023-07-15 02:51:38 +00:00
Clementine Buildbot 08bfb88912 Automatic merge of translations from Transifex 2023-07-14 02:50:44 +00:00
Clementine Buildbot d3108b32e8 Automatic merge of translations from Transifex 2023-07-13 02:50:56 +00:00
Clementine Buildbot 0701bef103 Automatic merge of translations from Transifex 2023-07-12 02:49:20 +00:00
Clementine Buildbot bf4ac0cb46 Automatic merge of translations from Transifex 2023-07-11 02:44:50 +00:00
John Maguire baf05335f9 Only push translations from master 2023-07-11 01:22:17 +01:00
John Maguire d21e9697d0 Disable mac builds temporarily 2023-07-10 23:42:29 +01:00
John Maguire ab057f8275 Migrate `tx pull` to new CLI 2023-07-10 20:52:39 +01:00
John Maguire 58325e45a7 Migrate `tx push` to new CLI 2023-07-10 20:52:29 +01:00
John Maguire 1d0cbc0ebb Remove support for Debian Stretch 2023-07-10 19:25:22 +01:00
Clementine Buildbot c83a0ac25f Automatic merge of translations from Transifex 2023-07-10 17:53:14 +00:00
John Maguire 351a5e2547 Build for Fedora 38 2023-04-07 11:59:53 +01:00
John Maguire 8773e8fe0a Bump runner for translations 2023-04-07 11:59:45 +01:00
Clementine Buildbot 3471134d52 Automatic merge of translations from Transifex 2023-02-10 03:06:03 +00:00
Clementine Buildbot 26192c3469 Automatic merge of translations from Transifex 2023-02-04 02:38:09 +00:00
Clementine Buildbot 982d8fbb63 Automatic merge of translations from Transifex 2023-01-16 02:39:34 +00:00
Clementine Buildbot 20cf7f793b Automatic merge of translations from Transifex 2023-01-15 02:39:29 +00:00
Clementine Buildbot ccf4f75c3d Automatic merge of translations from Transifex 2022-12-31 02:36:31 +00:00
Alexey Sokolov 65319d4952 Fix build: add zlib to deps where it's used
Ref https://bugs.gentoo.org/887105
2022-12-25 20:55:23 +00:00
John Maguire 9ef681b0e9 Build for Fedora 37 2022-12-09 18:32:11 +00:00
Clementine Buildbot dfeb1182f9 Automatic merge of translations from Transifex 2022-11-23 02:52:42 +00:00
Clementine Buildbot 384a8850d9 Automatic merge of translations from Transifex 2022-11-20 03:03:02 +00:00
adem 0fab612784 Replace play and pause with the single play/pause action in desktop file 2022-10-27 14:34:46 +01:00
Clementine Buildbot 336770bb95 Automatic merge of translations from Transifex 2022-10-27 03:08:37 +00:00
Andrei Stepanov 101f450aaa Update Russian translation in desktop file 2022-10-26 10:58:39 +01:00
Clementine Buildbot 6a440fe397 Automatic merge of translations from Transifex 2022-10-21 03:07:56 +00:00
John Maguire 3a506e0917 Add builder for Ubuntu 22.10 2022-10-20 21:56:08 +01:00
Clementine Buildbot c716ddb722 Automatic merge of translations from Transifex 2022-10-12 03:21:27 +00:00
Clementine Buildbot 519b33ed81 Automatic merge of translations from Transifex 2022-10-08 03:06:42 +00:00
97 changed files with 35239 additions and 221853 deletions

View File

@ -29,6 +29,11 @@ jobs:
container: container:
image: ubuntu:bionic image: ubuntu:bionic
steps: 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 - name: Install dependencies
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
@ -64,8 +69,6 @@ jobs:
qttools5-dev qttools5-dev
libsparsehash-dev libsparsehash-dev
ssh ssh
- name: Install tx
run: pip3 install transifex-client==0.13.9
- name: Checkout - name: Checkout
uses: actions/checkout@v1.2.0 uses: actions/checkout@v1.2.0
- name: git hackery - name: git hackery
@ -73,7 +76,7 @@ jobs:
- name: tx init - name: tx init
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx init --no-interactive --force run: tx init
- name: cmake - name: cmake
working-directory: bin working-directory: bin
run: cmake .. run: cmake ..
@ -83,7 +86,7 @@ jobs:
- name: tx config - name: tx config
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} 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 - name: tx push
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
@ -97,14 +100,14 @@ jobs:
- build_bionic_64 - build_bionic_64
- build_bullseye_64 - build_bullseye_64
- build_buster_64 - build_buster_64
- build_fedora_35
- build_fedora_36 - build_fedora_36
- build_fedora_37
- build_fedora_38
- build_focal_64 - build_focal_64
- build_jammy_64 - build_jammy_64
- build_mac # - build_mac
- build_mingw - build_mingw
- build_source - build_source
- build_stretch_64
steps: steps:
- uses: actions/checkout@v1.2.0 - uses: actions/checkout@v1.2.0
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
@ -228,6 +231,8 @@ jobs:
qt5-qtbase-devel qt5-qtbase-devel
qt5-qtx11extras-devel qt5-qtx11extras-devel
qt5-rpm-macros qt5-rpm-macros
qtsingleapplication-qt5-devel
qtsinglecoreapplication-qt5-devel
rpmdevtools rpmdevtools
sha2-devel sha2-devel
sparsehash-devel sparsehash-devel
@ -239,7 +244,7 @@ jobs:
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: cmake - name: cmake
working-directory: bin working-directory: bin
run: cmake .. run: cmake -DUSE_SYSTEM_QTSINGLEAPPLICATION=On ..
- name: Build source tarball - name: Build source tarball
working-directory: bin working-directory: bin
run: ../dist/maketarball.sh run: ../dist/maketarball.sh
@ -256,11 +261,11 @@ jobs:
name: release_fedora_36 name: release_fedora_36
path: ~/rpmbuild/RPMS/*/clementine-*.rpm path: ~/rpmbuild/RPMS/*/clementine-*.rpm
build_fedora_35: build_fedora_37:
name: Build Fedora 35 RPM name: Build Fedora 37 RPM
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: container:
image: fedora:35 image: fedora:37
env: env:
RPM_BUILD_NCPUS: "2" RPM_BUILD_NCPUS: "2"
steps: steps:
@ -300,6 +305,8 @@ jobs:
qt5-qtbase-devel qt5-qtbase-devel
qt5-qtx11extras-devel qt5-qtx11extras-devel
qt5-rpm-macros qt5-rpm-macros
qtsingleapplication-qt5-devel
qtsinglecoreapplication-qt5-devel
rpmdevtools rpmdevtools
sha2-devel sha2-devel
sparsehash-devel sparsehash-devel
@ -311,7 +318,7 @@ jobs:
run: git config --global --add safe.directory ${GITHUB_WORKSPACE} run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: cmake - name: cmake
working-directory: bin working-directory: bin
run: cmake .. run: cmake -DUSE_SYSTEM_QTSINGLEAPPLICATION=On ..
- name: Build source tarball - name: Build source tarball
working-directory: bin working-directory: bin
run: ../dist/maketarball.sh run: ../dist/maketarball.sh
@ -325,9 +332,84 @@ jobs:
run: rpmbuild -ba ../dist/clementine.spec run: rpmbuild -ba ../dist/clementine.spec
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: release_fedora_35 name: release_fedora_37
path: ~/rpmbuild/RPMS/*/clementine-*.rpm path: ~/rpmbuild/RPMS/*/clementine-*.rpm
build_fedora_38:
name: Build Fedora 38 RPM
runs-on: ubuntu-22.04
container:
image: fedora:38
env:
RPM_BUILD_NCPUS: "2"
steps:
- name: Install dependencies
run: >
dnf install --assumeyes
@development-tools
alsa-lib-devel
boost-devel
cmake
cryptopp-devel
dbus-devel
desktop-file-utils
fftw-devel
gcc-c++
gettext
git
glew-devel
gstreamer1-devel
gstreamer1-plugins-base-devel
hicolor-icon-theme
libappstream-glib
libcdio-devel
libchromaprint-devel
libgpod-devel
liblastfm-qt5-devel
libmtp-devel
libnotify-devel
openssh
pkgconfig
protobuf-compiler
protobuf-devel
pulseaudio-libs-devel
qca-qt5-devel
qca-qt5-ossl
qt5-linguist
qt5-qtbase-devel
qt5-qtx11extras-devel
qt5-rpm-macros
qtsingleapplication-qt5-devel
qtsinglecoreapplication-qt5-devel
rpmdevtools
sha2-devel
sparsehash-devel
sqlite-devel
taglib-devel
tar
- 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 -DUSE_SYSTEM_QTSINGLEAPPLICATION=On ..
- name: Build source tarball
working-directory: bin
run: ../dist/maketarball.sh
- name: Create rpmbuild directory
run: mkdir -p ~/rpmbuild/SOURCES
- name: Move source tarball
working-directory: bin
run: mv clementine-*.tar.xz ~/rpmbuild/SOURCES
- name: Build RPM
working-directory: bin
run: rpmbuild -ba ../dist/clementine.spec
- uses: actions/upload-artifact@v2
with:
name: release_fedora_38
path: ~/rpmbuild/RPMS/*/clementine-*.rpm
build_mingw: build_mingw:
name: Build Windows Installer name: Build Windows Installer
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -521,65 +603,6 @@ jobs:
name: release_mingw name: release_mingw
path: dist/windows/ClementineSetup*.exe 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: build_bionic_64:
name: Build Ubuntu Bionic 64-bit deb name: Build Ubuntu Bionic 64-bit deb
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -892,6 +915,7 @@ jobs:
path: bin/clementine_*.deb path: bin/clementine_*.deb
build_mac: build_mac:
if: false
name: Build Mac DMG name: Build Mac DMG
runs-on: macos-10.15 runs-on: macos-10.15
steps: steps:

View File

@ -6,20 +6,22 @@ on:
jobs: jobs:
pull_translations: pull_translations:
name: Pull translations from Transifex name: Pull translations from Transifex
runs-on: ubuntu-18.04 runs-on: ubuntu-22.04
container: container:
image: ubuntu:bionic image: ubuntu:jammy
steps: 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 - name: Install dependencies
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
run: > run: >
apt-get update && apt-get install -y apt-get update && apt-get install -y
git git
python3-pip
ssh ssh
- name: Install tx
run: pip3 install transifex-client==0.13.9
- name: Checkout - name: Checkout
uses: actions/checkout@v1.2.0 uses: actions/checkout@v1.2.0
- name: git hackery - name: git hackery
@ -29,15 +31,15 @@ jobs:
- name: tx init - name: tx init
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx init --no-interactive --force run: tx init
- name: tx config - name: tx config
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} 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 - name: tx pull
env: env:
TX_TOKEN: ${{ secrets.TX_TOKEN }} TX_TOKEN: ${{ secrets.TX_TOKEN }}
run: tx pull --all -f --no-interactive run: tx pull -f -a
- name: Setup git SSH - name: Setup git SSH
uses: webfactory/ssh-agent@v0.4.1 uses: webfactory/ssh-agent@v0.4.1
with: with:

View File

@ -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
}
}

View File

@ -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

View File

@ -15,4 +15,4 @@ ADD_LIBRARY(qtiocompressor STATIC
${IOCOMPRESSOR-SOURCES-MOC} ${IOCOMPRESSOR-SOURCES-MOC}
) )
target_link_libraries(qtiocompressor Qt5::Core) target_link_libraries(qtiocompressor Qt5::Core ${ZLIB_LIBRARIES})

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0.0)
project(clementine) project(clementine)
cmake_minimum_required(VERSION 3.0.0)
cmake_policy(SET CMP0053 OLD) cmake_policy(SET CMP0053 OLD)
include(CheckCXXCompilerFlag) include(CheckCXXCompilerFlag)
@ -76,9 +76,7 @@ pkg_check_modules(LIBPULSE libpulse)
pkg_check_modules(LIBXML libxml-2.0) pkg_check_modules(LIBXML libxml-2.0)
pkg_check_modules(TAGLIB taglib) pkg_check_modules(TAGLIB taglib)
if (WIN32) find_package(ZLIB REQUIRED)
find_package(ZLIB REQUIRED)
endif (WIN32)
find_library(LASTFM5_LIBRARIES lastfm5) find_library(LASTFM5_LIBRARIES lastfm5)
find_path(LASTFM5_INCLUDE_DIRS lastfm5/ws.h) find_path(LASTFM5_INCLUDE_DIRS lastfm5/ws.h)
@ -349,11 +347,18 @@ include_directories("3rdparty/qsqlite")
# When/if upstream accepts our patches then these options can be used to link # When/if upstream accepts our patches then these options can be used to link
# to system installed qtsingleapplication instead. # 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) if(USE_SYSTEM_QTSINGLEAPPLICATION)
find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions) find_path(QTSINGLEAPPLICATION_INCLUDE_DIRS qtsingleapplication.h PATH_SUFFIXES qt5/QtSolutions REQUIRED)
find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6) find_library(QTSINGLEAPPLICATION_LIBRARIES Qt5Solutions_SingleApplication-2.6 REQUIRED)
find_library(QTSINGLECOREAPPLICATION_LIBRARIES Qt5Solutions_SingleCoreApplication-2.6) 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) else(USE_SYSTEM_QTSINGLEAPPLICATION)
add_subdirectory(3rdparty/qtsingleapplication) add_subdirectory(3rdparty/qtsingleapplication)
set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication) set(QTSINGLEAPPLICATION_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication)

View File

@ -41,7 +41,7 @@ Compile and install:
cd bin cd bin
cmake .. cmake ..
make -j8 make -j$(nproc)
sudo make install sudo make install
See the Wiki for more instructions and a list of dependencies: See the Wiki for more instructions and a list of dependencies:

View File

@ -88,17 +88,6 @@
<item begin="&lt;/a" end="&gt;"/> <item begin="&lt;/a" end="&gt;"/>
</exclude> </exclude>
</provider> </provider>
<provider name="hindilyrics.net (Bollywood songs)" title="{title} ({album})" charset="utf-8" url="http://www.hindilyrics.net/lyrics/of-{Title}.html">
<urlFormat replace=" _@;\/&quot;'()[]" with="%20"/>
<urlFormat replace="?" with=""/>
<extract>
<item begin="&lt;div class=nm&gt;Movie&lt;/div&gt;:" end="&lt;/pre&gt;"/>
</extract>
<exclude>
<item begin="&lt;span class=" end="&quot;&gt;"/>
</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}&amp;artista={artist}"> <provider name="letras.mus.br" title="" charset="utf-8" url="https://www.letras.mus.br/winamp.php?musica={title}&amp;artista={artist}">
<urlFormat replace="_@,;&amp;\/&quot;" with="_"/> <urlFormat replace="_@,;&amp;\/&quot;" with="_"/>
<urlFormat replace=" " with="+"/> <urlFormat replace=" " with="+"/>
@ -114,13 +103,6 @@
</extract> </extract>
<invalidIndicator value="ERROR"/> <invalidIndicator value="ERROR"/>
</provider> </provider>
<provider name="loudson.gs" title="" charset="utf-8" url="http://www.loudson.gs/{a}/{artist}/{album}/{title}">
<urlFormat replace=" _@,;&amp;\/&quot;" with="-"/>
<urlFormat replace="." with=""/>
<extract>
<item tag="&lt;div class=&quot;middle_col_TracksLyrics &quot;&gt;"/>
</extract>
</provider>
<provider name="lyrics.com" title="{artist} - {title} Lyrics" charset="utf-8" url="http://www.lyrics.com/lyrics/{artist}/{title}.html"> <provider name="lyrics.com" title="{artist} - {title} Lyrics" charset="utf-8" url="http://www.lyrics.com/lyrics/{artist}/{title}.html">
<urlFormat replace=" _@,;&amp;\/&quot;" with="-"/> <urlFormat replace=" _@,;&amp;\/&quot;" with="-"/>
<urlFormat replace="'." with=""/> <urlFormat replace="'." with=""/>
@ -194,14 +176,6 @@
</extract> </extract>
<invalidIndicator value="Page not Found"/> <invalidIndicator value="Page not Found"/>
</provider> </provider>
<provider name="lyricstime.com" title="{artist} - {title} Lyrics" charset="iso-8859-1" url="http://www.lyricstime.com/{artist}-{title}-lyrics.html">
<urlFormat replace=" _@,;&amp;\/&quot;'" with="-"/>
<urlFormat replace="." with=""/>
<extract>
<item tag="&lt;div id=&quot;songlyrics&quot; &gt;"/>
<item tag="&lt;p&gt;"/>
</extract>
</provider>
<provider name="lyriki.com" title="" charset="utf-8" url="http://www.lyriki.com/{artist}:{title}"> <provider name="lyriki.com" title="" charset="utf-8" url="http://www.lyriki.com/{artist}:{title}">
<urlFormat replace=" _@,;&amp;\/&quot;" with="_"/> <urlFormat replace=" _@,;&amp;\/&quot;" with="_"/>
<urlFormat replace="." with=""/> <urlFormat replace="." with=""/>
@ -210,20 +184,6 @@
<item tag="&lt;p&gt;"/> <item tag="&lt;p&gt;"/>
</extract> </extract>
</provider> </provider>
<provider name="metrolyrics.com" title="{artist} - {title} LYRICS" charset="utf-8" url="http://www.metrolyrics.com/{title}-lyrics-{artist}.html">
<urlFormat replace=" _@,;&amp;\/&quot;" with="-"/>
<urlFormat replace="'." with=""/>
<extract>
<item tag="&lt;span id=&quot;lyrics&quot;&gt;"/>
</extract>
<extract>
<item tag="&lt;div id=&quot;lyrics&quot;&gt;"/>
</extract>
<exclude>
<item tag="&lt;h5&gt;"/>
</exclude>
<invalidIndicator value="These lyrics are missing"/>
</provider>
<provider name="mp3lyrics.org" title="{artist} &amp;quot;{title}&amp;quot; Lyrics" charset="utf-8" url="http://www.mp3lyrics.org/{a}/{artist}/{title}/"> <provider name="mp3lyrics.org" title="{artist} &amp;quot;{title}&amp;quot; Lyrics" charset="utf-8" url="http://www.mp3lyrics.org/{a}/{artist}/{title}/">
<urlFormat replace=" _@,;&amp;\/&quot;" with="-"/> <urlFormat replace=" _@,;&amp;\/&quot;" with="-"/>
<urlFormat replace="'." with=""/> <urlFormat replace="'." with=""/>
@ -251,13 +211,6 @@
</exclude> </exclude>
<invalidIndicator value="We couldn't find that page."/> <invalidIndicator value="We couldn't find that page."/>
</provider> </provider>
<provider name="seeklyrics.com" title="{artist} - {title} Lyrics" charset="iso-8859-1" url="http://www.seeklyrics.com/lyrics/{Artist}/{Title}.html">
<urlFormat replace=" _@,;&amp;\/'&quot;" with="-"/>
<urlFormat replace="." with=""/>
<extract>
<item tag="&lt;div id=&quot;songlyrics&quot;&gt;"/>
</extract>
</provider>
<provider name="songlyrics.com" title="{title} LYRICS - {artist}" charset="utf-8" url="http://www.songlyrics.com/{artist}/{title}-lyrics/"> <provider name="songlyrics.com" title="{title} LYRICS - {artist}" charset="utf-8" url="http://www.songlyrics.com/{artist}/{title}-lyrics/">
<urlFormat replace=" ._@,;&amp;\/&quot;" with="-"/> <urlFormat replace=" ._@,;&amp;\/&quot;" with="-"/>
<urlFormat replace="'" with="_"/> <urlFormat replace="'" with="_"/>

View File

@ -18,6 +18,7 @@ BuildRequires: liblastfm-qt5-devel
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme BuildRequires: hicolor-icon-theme
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
BuildRequires: qtsingleapplication-qt5-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gio-2.0)

View File

@ -15,6 +15,7 @@ GenericName[hi]=क्लेमेंटैन् संगीत वादक
GenericName[is]=Clementine tónlistarspilarinn GenericName[is]=Clementine tónlistarspilarinn
GenericName[pl]=Odtwarzacz muzyki Clementine GenericName[pl]=Odtwarzacz muzyki Clementine
GenericName[pt]=Reprodutor de músicas Clementine GenericName[pt]=Reprodutor de músicas Clementine
GenericName[ru]=Музыкальный проигрыватель Clementine
GenericName[sl]=Predvajalnik glasbe Clementine GenericName[sl]=Predvajalnik glasbe Clementine
GenericName[sr]=Клементина музички плејер GenericName[sr]=Клементина музички плејер
GenericName[sr@ijekavian]=Клементина музички плејер GenericName[sr@ijekavian]=Клементина музички плејер
@ -26,6 +27,7 @@ Comment[es]=Reproducción de música y flujos de Last.fm
Comment[is]=Spilar tónlist og streymi frá last.fm Comment[is]=Spilar tónlist og streymi frá last.fm
Comment[pl]=Odtwarzanie muzyki i strumieni last.fm Comment[pl]=Odtwarzanie muzyki i strumieni last.fm
Comment[pt]=Reprodução de músicas e emissões last.fm Comment[pt]=Reprodução de músicas e emissões last.fm
Comment[ru]=Прослушивание музыки и потоков last.fm
Comment[sl]=Predvaja glasbo in pretoke last.fm Comment[sl]=Predvaja glasbo in pretoke last.fm
Comment[sr]=Репродукује музику и last.fm токове Comment[sr]=Репродукује музику и last.fm токове
Comment[sr@ijekavian]=Репродукује музику и last.fm токове Comment[sr@ijekavian]=Репродукује музику и last.fm токове
@ -38,106 +40,58 @@ Terminal=false
Categories=AudioVideo;Player;Qt;Audio; Categories=AudioVideo;Player;Qt;Audio;
StartupNotify=false StartupNotify=false
MimeType=application/ogg;application/x-ogg;application/x-ogm-audio;audio/aac;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-wav;video/x-ms-asf;x-content/audio-player;x-scheme-handler/zune;x-scheme-handler/itpc;x-scheme-handler/itms;x-scheme-handler/feed; MimeType=application/ogg;application/x-ogg;application/x-ogm-audio;audio/aac;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/vnd.rn-realaudio;audio/vorbis;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-oggflac;audio/x-pn-realaudio;audio/x-scpls;audio/x-speex;audio/x-vorbis;audio/x-vorbis+ogg;audio/x-wav;video/x-ms-asf;x-content/audio-player;x-scheme-handler/zune;x-scheme-handler/itpc;x-scheme-handler/itms;x-scheme-handler/feed;
Actions=Play;Pause;Stop;StopAfterCurrent;Previous;Next; Actions=Play-Pause;Stop;StopAfterCurrent;Previous;Next;
[Desktop Action Play] [Desktop Action Play-Pause]
Name=Play Name=Play/Pause
Exec=clementine --play Exec=clementine --play-pause
Name[af]=Speel Name[be]=Прайграць/Прыпыніць
Name[be]=Прайграць Name[bg]=Възпроизвеждане/Пауза
Name[bg]=Възпроизвеждане Name[br]=Lenn/Ehan
Name[br]=Lenn Name[ca]=Reprodueix/Pausa
Name[ca]=Reprodueix Name[cs]=Přehrát/Pozastavit
Name[cs]=Přehrát Name[da]=Afspil/Pause
Name[da]=Afspil Name[de]=Wiedergabe/Pause
Name[de]=Wiedergabe Name[el]=Αναπαραγωγή/Παύση
Name[el]=Αναπαραγωγή Name[es]=Reproducir/Pausar
Name[es]=Reproducir Name[et]=Mängi/Paus
Name[et]=Mängi Name[eu]=Erreproduzitu/Pausarazi
Name[eu]=Erreproduzitu Name[fa]=پخش/مکث
Name[fa]=پخش Name[fi]=Toista/Keskeytä
Name[fi]=Toista Name[fr]=Lecture/Pause
Name[fr]=Lecture Name[ga]=Seinn/Cuir ar sos
Name[ga]=Seinn Name[gl]=Reproducir/Pausa
Name[gl]=Reproducir Name[he]=נגן/השהה
Name[he]=נגינה Name[hi]=गाना बजाएं/गाना रोकें
Name[hi]=गाना बजाएं Name[hr]=Pokreni reprodukciju/Pauza
Name[hr]=Pokreni reprodukciju Name[hu]=Lejátszás/Szünet
Name[hu]=Lejátszás Name[is]=Spila/Setja í bið
Name[is]=Spila Name[it]=Riproduci/Pausa
Name[it]=Riproduci Name[ja]=再生/一時停止
Name[ja]=再生 Name[kk]=Ойнату/Аялдату
Name[kk]=Ойнату Name[ko]=재생/일시 중지
Name[lt]=Groti Name[lt]=Groti/Pristabdyti
Name[lv]=Atskaņot Name[lv]=Atskaņot/Pauze
Name[ms]=Mainkan Name[nb]=Spill/Pause
Name[nb]=Spill Name[nl]=Afspelen/Pauze
Name[nl]=Afspelen Name[oc]=Lectura/Pausa
Name[oc]=Lectura Name[pl]=Odtwarzaj/Pauza
Name[pl]=Odtwarzaj Name[pt]=Reproduzir/Pausa
Name[pt]=Reproduzir Name[pt_BR]=Reproduzir/Pausar
Name[pt_BR]=Reproduzir Name[ro]=Redă/Pauză
Name[ro]=Redă Name[ru]=Играть/пауза
Name[ru]=Воспроизвести Name[sk]=Hrať/Pozastaviť
Name[sk]=Hrať Name[sl]=Predvajaj/Začasno ustavi
Name[sl]=Predvajaj Name[sr]=Пусти/Паузирај
Name[sr]=Пусти Name[sr@ijekavian]=Пусти/Паузирај
Name[sr@ijekavian]=Пусти Name[sr@ijekavianlatin]=Pusti/Pauziraj
Name[sr@ijekavianlatin]=Pusti Name[sr@latin]=Pusti/Pauziraj
Name[sr@latin]=Pusti Name[sv]=Spela upp/Gör paus
Name[sv]=Spela upp Name[tr]=Çal/Duraklat
Name[tr]=Çal Name[uk]=Відтворити/Призупинити
Name[uk]=Відтворити Name[vi]=Phát/Tạm dừng
Name[vi]=Phát Name[zh_CN]=播放/暂停
Name[zh_CN]=播放 Name[zh_TW]=播放/暫停
Name[zh_TW]=播放
[Desktop Action Pause]
Name=Pause
Exec=clementine --pause
Name[be]=Прыпыніць
Name[bg]=Пауза
Name[br]=Ehan
Name[ca]=Pausa
Name[cs]=Pozastavit
Name[el]=Παύση
Name[es]=Pausar
Name[et]=Paus
Name[eu]=Pausarazi
Name[fa]=ایست
Name[fi]=Keskeytä
Name[ga]=Cuir ar sos
Name[gl]=Pausa
Name[he]=השהייה
Name[hi]=गाना रोकें
Name[hr]=Pauza
Name[hu]=Szünet
Name[is]=Setja í bið
Name[it]=Pausa
Name[ja]=一時停止
Name[kk]=Аялдату
Name[ko]=일시중지
Name[lt]=Pristabdyti
Name[lv]=Pauze
Name[nl]=Pauze
Name[oc]=Pausa
Name[pl]=Pauza
Name[pt]=Pausa
Name[pt_BR]=Pausar
Name[ro]=Pauză
Name[ru]=Приостановить
Name[sk]=Pozastaviť
Name[sl]=Začasno ustavi
Name[sr]=Паузирај
Name[sr@ijekavian]=Паузирај
Name[sr@ijekavianlatin]=Pauziraj
Name[sr@latin]=Pauziraj
Name[sv]=Gör paus
Name[tr]=Duraklat
Name[uk]=Призупинити
Name[vi]=Tạm dừng
Name[zh_CN]=暂停
Name[zh_TW]=暫停
[Desktop Action Stop] [Desktop Action Stop]
Name=Stop Name=Stop
@ -322,7 +276,7 @@ Name[pl]=Dalej
Name[pt]=Seguinte Name[pt]=Seguinte
Name[pt_BR]=Próximo Name[pt_BR]=Próximo
Name[ro]=Următoarea Name[ro]=Următoarea
Name[ru]=Дальше Name[ru]=Следующий
Name[sk]=Ďalšia Name[sk]=Ďalšia
Name[sl]=Naslednji Name[sl]=Naslednji
Name[sr]=Следећа Name[sr]=Следећа

View File

@ -1268,7 +1268,6 @@ target_link_libraries(clementine_lib
${SQLITE_LIBRARIES} ${SQLITE_LIBRARIES}
Qocoa Qocoa
z
) )
link_directories( link_directories(
@ -1351,7 +1350,6 @@ target_link_libraries(clementine_lib qsqlite)
if (WIN32) if (WIN32)
target_link_libraries(clementine_lib target_link_libraries(clementine_lib
protobuf protobuf
${ZLIB_LIBRARIES}
tinysvcmdns tinysvcmdns
dsound dsound
) )

View File

@ -27,7 +27,7 @@
#include "core/song.h" #include "core/song.h"
class TranscoderPreset; struct TranscoderPreset;
class OrganiseFormat { class OrganiseFormat {
public: public:

View File

@ -41,16 +41,16 @@ class DigitallyImportedServiceBase : public InternetService {
const QString& api_service_name, const QString& api_service_name,
Application* app, InternetModel* model, Application* app, InternetModel* model,
bool has_premium, QObject* parent = nullptr); bool has_premium, QObject* parent = nullptr);
~DigitallyImportedServiceBase(); ~DigitallyImportedServiceBase() override;
static const char* kSettingsGroup; static const char* kSettingsGroup;
static const int kStreamsCacheDurationSecs; static const int kStreamsCacheDurationSecs;
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* parent); void LazyPopulate(QStandardItem* parent) override;
void ShowContextMenu(const QPoint& global_pos); void ShowContextMenu(const QPoint& global_pos) override;
void ReloadSettings(); void ReloadSettings() override;
bool is_premium_account() const; bool is_premium_account() const;

View File

@ -40,7 +40,7 @@ class IcecastService : public InternetService {
public: public:
IcecastService(Application* app, InternetModel* parent); IcecastService(Application* app, InternetModel* parent);
~IcecastService(); ~IcecastService() override;
static const char* kServiceName; static const char* kServiceName;
static const char* kDirectoryUrl; static const char* kDirectoryUrl;
@ -51,12 +51,12 @@ class IcecastService : public InternetService {
Type_Genre, Type_Genre,
}; };
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); 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: private slots:
void LoadDirectory(); void LoadDirectory();

View File

@ -39,7 +39,7 @@ class IntergalacticFMServiceBase : public InternetService {
const QString& name, const QUrl& channel_list_url, const QString& name, const QUrl& channel_list_url,
const QUrl& homepage_url, const QUrl& homepage_url,
const QUrl& donate_page_url, const QIcon& icon); const QUrl& donate_page_url, const QIcon& icon);
~IntergalacticFMServiceBase(); ~IntergalacticFMServiceBase() override;
enum ItemType { enum ItemType {
Type_Stream = 2000, Type_Stream = 2000,
@ -59,14 +59,14 @@ class IntergalacticFMServiceBase : public InternetService {
const QString& url_scheme() const { return url_scheme_; } const QString& url_scheme() const { return url_scheme_; }
const QIcon& icon() const { return icon_; } const QIcon& icon() const { return icon_; }
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); void LazyPopulate(QStandardItem* item) override;
void ShowContextMenu(const QPoint& global_pos); void ShowContextMenu(const QPoint& global_pos) override;
PlaylistItem::Options playlistitem_options() const; PlaylistItem::Options playlistitem_options() const override;
QNetworkAccessManager* network() const { return network_; } QNetworkAccessManager* network() const { return network_; }
void ReloadSettings(); void ReloadSettings() override;
bool IsStreamListStale() const { return streams_.IsStale(); } bool IsStreamListStale() const { return streams_.IsStale(); }
StreamList Streams(); StreamList Streams();

View File

@ -34,7 +34,7 @@ class SavedRadio : public InternetService {
public: public:
SavedRadio(Application* app, InternetModel* parent); SavedRadio(Application* app, InternetModel* parent);
~SavedRadio(); ~SavedRadio() override;
enum ItemType { enum ItemType {
Type_Stream = 2000, Type_Stream = 2000,
@ -57,10 +57,10 @@ class SavedRadio : public InternetService {
static const char* kServiceName; static const char* kServiceName;
static const char* kSettingsGroup; static const char* kSettingsGroup;
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); 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(), void Add(const QUrl& url, const QString& name = QString(),
const QUrl& url_logo = QUrl()); const QUrl& url_logo = QUrl());

View File

@ -43,14 +43,14 @@ class JamendoService : public InternetService {
public: public:
JamendoService(Application* app, InternetModel* parent); JamendoService(Application* app, InternetModel* parent);
~JamendoService(); ~JamendoService() override;
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); 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(); } LibraryBackend* library_backend() const { return library_backend_.get(); }

View File

@ -38,7 +38,7 @@ class MagnatuneService : public InternetService {
public: public:
MagnatuneService(Application* app, InternetModel* parent); MagnatuneService(Application* app, InternetModel* parent);
~MagnatuneService(); ~MagnatuneService() override;
// Values are saved in QSettings and are indices into the combo box in // Values are saved in QSettings and are indices into the combo box in
// MagnatuneConfig // MagnatuneConfig
@ -71,14 +71,14 @@ class MagnatuneService : public InternetService {
static QString ReadElementText(QXmlStreamReader& reader); static QString ReadElementText(QXmlStreamReader& reader);
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); 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 // Magnatune specific stuff
MembershipType membership_type() const { return membership_; } MembershipType membership_type() const { return membership_; }
@ -99,7 +99,7 @@ class MagnatuneService : public InternetService {
void Download(); void Download();
void Homepage(); void Homepage();
void ShowConfig(); void ShowConfig() override;
private: private:
void EnsureMenuCreated(); void EnsureMenuCreated();

View File

@ -44,7 +44,7 @@ class PodcastService : public InternetService {
public: public:
PodcastService(Application* app, InternetModel* parent); PodcastService(Application* app, InternetModel* parent);
~PodcastService(); ~PodcastService() override;
static const char* kServiceName; static const char* kServiceName;
static const char* kSettingsGroup; static const char* kSettingsGroup;
@ -57,12 +57,12 @@ class PodcastService : public InternetService {
enum Role { Role_Podcast = InternetModel::RoleCount, Role_Episode }; enum Role { Role_Podcast = InternetModel::RoleCount, Role_Episode };
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* parent); void LazyPopulate(QStandardItem* parent) override;
bool has_initial_load_settings() const { return true; } bool has_initial_load_settings() const override { return true; }
void ShowContextMenu(const QPoint& global_pos); void ShowContextMenu(const QPoint& global_pos) override;
void ReloadSettings(); void ReloadSettings() override;
void InitialLoadSettings(); void InitialLoadSettings() override;
// Called by SongLoader when the user adds a Podcast URL directly. Adds a // 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 // 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. // contains an OPML file then this displays it in the Add Podcast dialog.
@ -81,7 +81,7 @@ class PodcastService : public InternetService {
void DeleteDownloadedData(); void DeleteDownloadedData();
void SetNew(); void SetNew();
void SetListened(); void SetListened();
void ShowConfig(); void ShowConfig() override;
void SubscriptionAdded(const Podcast& podcast); void SubscriptionAdded(const Podcast& podcast);
void SubscriptionRemoved(const Podcast& podcast); void SubscriptionRemoved(const Podcast& podcast);

View File

@ -35,7 +35,7 @@ class RadioBrowserService : public InternetService {
public: public:
RadioBrowserService(Application* app, InternetModel* parent); RadioBrowserService(Application* app, InternetModel* parent);
~RadioBrowserService(){}; ~RadioBrowserService() override{};
enum ItemType { enum ItemType {
Type_Stream = 2000, Type_Stream = 2000,

View File

@ -39,7 +39,7 @@ class SomaFMServiceBase : public InternetService {
const QString& name, const QUrl& channel_list_url, const QString& name, const QUrl& channel_list_url,
const QUrl& homepage_url, const QUrl& donate_page_url, const QUrl& homepage_url, const QUrl& donate_page_url,
const QIcon& icon); const QIcon& icon);
~SomaFMServiceBase(); ~SomaFMServiceBase() override;
enum ItemType { enum ItemType {
Type_Stream = 2000, Type_Stream = 2000,
@ -59,14 +59,14 @@ class SomaFMServiceBase : public InternetService {
const QString& url_scheme() const { return url_scheme_; } const QString& url_scheme() const { return url_scheme_; }
const QIcon& icon() const { return icon_; } const QIcon& icon() const { return icon_; }
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); void LazyPopulate(QStandardItem* item) override;
void ShowContextMenu(const QPoint& global_pos); void ShowContextMenu(const QPoint& global_pos) override;
PlaylistItem::Options playlistitem_options() const; PlaylistItem::Options playlistitem_options() const override;
QNetworkAccessManager* network() const { return network_; } QNetworkAccessManager* network() const { return network_; }
void ReloadSettings(); void ReloadSettings() override;
bool IsStreamListStale() const { return streams_.IsStale(); } bool IsStreamListStale() const { return streams_.IsStale(); }
StreamList Streams(); StreamList Streams();

View File

@ -530,6 +530,11 @@ void SubsonicLibraryScanner::OnGetAlbumFinished(QNetworkReply* reply) {
// Read song information // Read song information
while (reader.readNextStartElement()) { while (reader.readNextStartElement()) {
// skip multi-artist and multi-genre tags
if ((reader.name() == "artists") || (reader.name() == "genres")) {
reader.skipCurrentElement();
continue;
}
if (reader.name() != "song") { if (reader.name() != "song") {
ParsingError("song tag expected. Aborting scan."); ParsingError("song tag expected. Aborting scan.");
return; return;

View File

@ -42,7 +42,7 @@ class SubsonicService : public InternetService {
public: public:
SubsonicService(Application* app, InternetModel* parent); SubsonicService(Application* app, InternetModel* parent);
~SubsonicService(); ~SubsonicService() override;
enum LoginState { enum LoginState {
LoginState_Loggedin, LoginState_Loggedin,
@ -90,11 +90,11 @@ class SubsonicService : public InternetService {
bool IsConfigured() const; bool IsConfigured() const;
bool IsAmpache() const; bool IsAmpache() const;
QStandardItem* CreateRootItem(); QStandardItem* CreateRootItem() override;
void LazyPopulate(QStandardItem* item); 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;
void Login(); void Login();
void Login(const QString& server, const QString& username, void Login(const QString& server, const QString& username,
@ -175,7 +175,7 @@ class SubsonicService : public InternetService {
void OnLoginStateChanged(SubsonicService::LoginState newstate); void OnLoginStateChanged(SubsonicService::LoginState newstate);
void OnPingFinished(QNetworkReply* reply); void OnPingFinished(QNetworkReply* reply);
void ShowConfig(); void ShowConfig() override;
}; };
class SubsonicLibraryScanner : public QObject { class SubsonicLibraryScanner : public QObject {
@ -184,7 +184,7 @@ class SubsonicLibraryScanner : public QObject {
public: public:
explicit SubsonicLibraryScanner(SubsonicService* service, explicit SubsonicLibraryScanner(SubsonicService* service,
QObject* parent = nullptr); QObject* parent = nullptr);
~SubsonicLibraryScanner(); ~SubsonicLibraryScanner() override;
void Scan(); void Scan();
const SongList& GetSongs() const { return songs_; } const SongList& GetSongs() const { return songs_; }

View File

@ -896,7 +896,7 @@ LibraryBackend::AlbumList LibraryBackend::GetAlbums(const QString& artist,
QString last_artist; QString last_artist;
QString last_album_artist; QString last_album_artist;
while (query.Next()) { 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; Album info;
info.artist = compilation ? QString() : query.Value(1).toString(); info.artist = compilation ? QString() : query.Value(1).toString();

View File

@ -92,12 +92,10 @@ void MoodbarBuilder::Normalize(QList<Rgb>* vals, double Rgb::*member) {
} }
double avg = 0; double avg = 0;
int t = 0;
for (const Rgb& rgb : *vals) { for (const Rgb& rgb : *vals) {
const double value = rgb.*member; const double value = rgb.*member;
if (value != mini && value != maxi) { if (value != mini && value != maxi) {
avg += value / vals->count(); avg += value / vals->count();
t++;
} }
} }

View File

@ -98,7 +98,6 @@ void OutgoingDataCreator::CheckEnabledProviders() {
<< "lyricstime.com" << "lyricstime.com"
<< "lyricsreg.com" << "lyricsreg.com"
<< "lyricsmania.com" << "lyricsmania.com"
<< "metrolyrics.com"
<< "azlyrics.com" << "azlyrics.com"
<< "songlyrics.com" << "songlyrics.com"
<< "elyrics.net" << "elyrics.net"
@ -106,7 +105,6 @@ void OutgoingDataCreator::CheckEnabledProviders() {
<< "lyrics.com" << "lyrics.com"
<< "lyricsbay.com" << "lyricsbay.com"
<< "directlyrics.com" << "directlyrics.com"
<< "loudson.gs"
<< "teksty.org" << "teksty.org"
<< "tekstowo.pl (Polish translations)" << "tekstowo.pl (Polish translations)"
<< "vagalume.uol.com.br" << "vagalume.uol.com.br"

View File

@ -1729,13 +1729,11 @@ PlaylistItemList Playlist::RemoveItemsWithoutUndo(int row, int count) {
endRemoveRows(); endRemoveRows();
QList<int>::iterator it = virtual_items_.begin(); QList<int>::iterator it = virtual_items_.begin();
int i = 0;
while (it != virtual_items_.end()) { while (it != virtual_items_.end()) {
if (*it >= items_.count()) if (*it >= items_.count())
it = virtual_items_.erase(it); it = virtual_items_.erase(it);
else else
++it; ++it;
++i;
} }
// Reset current_virtual_index_ // Reset current_virtual_index_

View File

@ -34,12 +34,6 @@
#undef AddJob #undef AddJob
#endif #endif
namespace {
const char kWavHeaderRiffMarker[] = "RIFF";
const char kWavFileTypeFormatChunk[] = "WAVEfmt ";
const char kWavDataString[] = "data";
} // namespace
Ripper::Ripper(int track_count, QObject* parent) Ripper::Ripper(int track_count, QObject* parent)
: QObject(parent), : QObject(parent),
track_count_(track_count), track_count_(track_count),

View File

@ -90,10 +90,8 @@ void SongInfoView::ReloadSettings() {
QVariantList default_order; QVariantList default_order;
default_order << "lyrics.wikia.com" default_order << "lyrics.wikia.com"
<< "lyricstime.com"
<< "lyricsreg.com" << "lyricsreg.com"
<< "lyricsmania.com" << "lyricsmania.com"
<< "metrolyrics.com"
<< "azlyrics.com" << "azlyrics.com"
<< "songlyrics.com" << "songlyrics.com"
<< "elyrics.net" << "elyrics.net"
@ -101,7 +99,6 @@ void SongInfoView::ReloadSettings() {
<< "lyrics.com" << "lyrics.com"
<< "lyricsbay.com" << "lyricsbay.com"
<< "directlyrics.com" << "directlyrics.com"
<< "loudson.gs"
<< "teksty.org" << "teksty.org"
<< "tekstowo.pl (Polish translations)" << "tekstowo.pl (Polish translations)"
<< "vagalume.uol.com.br" << "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

View File

@ -1262,10 +1262,14 @@ void MainWindow::TrackSkipped(PlaylistItemPtr item) {
const qint64 seconds_left = (length - position) / kNsecPerSec; const qint64 seconds_left = (length - position) / kNsecPerSec;
const qint64 seconds_total = length / kNsecPerSec; const qint64 seconds_total = length / kNsecPerSec;
const qint64 seconds_listened = position / kNsecPerSec;
if (((0.05 * seconds_total > 60 && percentage < 0.98) || if (((0.05 * seconds_total > 60 && percentage < 0.98) ||
percentage < 0.95) && 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); app_->library_backend()->IncrementSkipCountAsync(song.id(), percentage);
} }
} }