Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develmaster: commits for v0.3.5 #89

Merged
merged 12 commits into from
Apr 12, 2024
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<br />

#### Features:
- *A pull request for [the README.md](https://github.com/sailfishos-applications/flowplayer/blob/devel/README.md) which provides a list of features will be much appreciated.*
- Gap-less playback, optionally
- *A pull request for [the README.md](https://github.com/sailfishos-applications/flowplayer/blob/devel/README.md) which provides a full list of features will be much appreciated.*

<sup>Note that the functionality and / or ability to … may be broken (this is [known for internet radio](https://github.com/sailfishos-applications/flowplayer/issues/62)) due to API changes in recent SailfishOS releases.</sup><br />
Pull requests with fixes, improvements and enhancements are welcome!
Expand Down Expand Up @@ -36,7 +37,7 @@ If you want to translate FlowPlayer to a language it does not support yet or imp

The original [FlowPlayer for SailfishOS (2015 - 2016)](https://openrepos.net/content/cepiperez/flowplayer-0#content) started as a port of [FlowPlayer for MeeGo-Harmattan (2014)](https://openrepos.net/content/cepiperez/flowplayer#content). Both were solely written by [Matias Perez (CepiPerez)](https://github.com/CepiPerez). In 2021 Matias [released the source code of FlowPlayer](https://github.com/sailfishos-applications/flowplayer/commits/master?after=c4f36e1cb3a80b7c7b220a379c9bdaca3a300113+49) by creating this git repository at GitHub.

In 2023 [olf (Olf0)](https://github.com/Olf0) overhauled infrastructure aspects, such as this README, a [new OpenRepos page](https://openrepos.net/content/olf/flowplayer#content), the [Transifex integration](https://github.com/sailfishos-applications/flowplayer/pull/7), making the spec file suitable for [the Sailfish-OBS](https://build.sailfishos.org/) and [the SailfishOS:Chum community repository](https://build.sailfishos.org/project/show/sailfishos:chum) etc.
In 2023 [olf (Olf0)](https://github.com/Olf0) overhauled infrastructure aspects, such as this README, a [new OpenRepos page](https://openrepos.net/content/olf/flowplayer#content), the [Transifex integration](https://github.com/sailfishos-applications/flowplayer/pull/7), making the spec file suitable for [the SailfishOS-OBS](https://build.sailfishos.org/) and [the SailfishOS:Chum community repository](https://github.com/sailfishos-chum/main/blob/main/Metadata.md) etc.

<br />

Expand Down
6 changes: 5 additions & 1 deletion flowplayer.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ Exec=flowplayer
Name=FlowPlayer

[X-Sailjail]
Sandboxing=Disabled
OrganizationName=sailfishos-applications
# ApplicationName does not have to be identical to Name
ApplicationName=flowplayer
# Add the required permissions here
Permissions=UserDirs;Audio;Bluetooth;Internet;RemovableMedia
2 changes: 1 addition & 1 deletion qml/pages/CoverPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CoverBackground {
//x: Theme.paddingMedium
itemimg: playingRadio? currentSongInfo.imageurl : utils.thumbnail(currentSongInfo.artist, currentSongInfo.album)
textSize: Theme.fontSizeSmall
text: playingRadio? currentSongInfo.name : qsTr("Cover no found")
text: playingRadio? currentSongInfo.name : qsTr("Cover not found")
opacity: showBigCover? 0.4 : 1
}

Expand Down
2 changes: 1 addition & 1 deletion qml/pages/FullAlbumSearch.qml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Page {
ViewPlaceholder {
enabled: songlist.count===0 && loaded
Behavior on opacity { FadeAnimation {} }
text: qsTr("There's no missing covers in your music collection")
text: qsTr("There are no missing covers in your music collection")
}

}
Expand Down
5 changes: 5 additions & 0 deletions rpm/flowplayer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
* Fri Apr 12 2024 olf <[email protected]> - 0.3.5
- Add SailJail configuration (#77), originally by @poetaster
- Add Estonian translation (#86) by @tuplasuhveli
- Fix some source strings (#87, #88) by @tuplasuhveli

* Thu Mar 14 2024 olf <[email protected]> - 0.3.4
- Support Opus codec (#67) by @rubdos
- Add local cover art when importing tracks (#75) by @poetaster with contributions by @dcaliste and @Olf0
Expand Down
4 changes: 2 additions & 2 deletions rpm/flowplayer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name: flowplayer
Summary: Music Player for SailfishOS
# The <version> tag must adhere to semantic versioning: Among multiple other
# reasons due to its use for `qmake5` in line 104. See https://semver.org/
Version: 0.3.4
Version: 0.3.5
# The <release> tag comprises one of {alpha,beta,rc,release} postfixed with a
# natural number greater or equal to 1 (e.g., "beta3") and may additionally be
# postfixed with a plus character ("+"), the name of the packager and a release
Expand All @@ -21,7 +21,7 @@ Version: 0.3.4
# build at GitHub and OBS, when configured accordingly; mind the sorting
# (`adud` < `alpha`). For details and reasons, see
# https://github.com/storeman-developers/harbour-storeman/wiki/Git-tag-format
Release: release2
Release: release3
# The Group tag should comprise one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Applications/Multimedia
Expand Down
59 changes: 0 additions & 59 deletions src/FlowPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,61 +22,6 @@
bool isDBOpened;
bool databaseWorking;

static void migrateSettings()
{
const QString oldSettings = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/cepiperez/flowplayer.conf";
const QString newSettings = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + ".conf";
if (QFile::exists(oldSettings)) {
if (QDir().mkpath(QFileInfo(newSettings).path())
&& !QFile::rename(oldSettings, newSettings)) {
qWarning() << "unable to move old configuration from" << oldSettings << "to" << newSettings;
}
QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)).rmdir("cepiperez");
}
}

static void migrateDatabase()
{
const QString olderDb = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/cepiperez/flowplayer.db";
const QString oldDb = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/flowplayer/flowplayer/flowplayer.db";
const QString newDb = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/flowplayer.db";
if (QFile::exists(oldDb)) {
if (QDir().mkpath(QFileInfo(newDb).path())
&& !QFile::rename(oldDb, newDb)) {
qWarning() << "unable to move old database from" << oldDb << "to" << newDb;
}
QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/flowplayer").rmdir("flowplayer");
QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)).rmdir("flowplayer");
} else if (QFile::exists(olderDb)) {
if (QDir().mkpath(QFileInfo(newDb).path())
&& !QFile::rename(olderDb, newDb)) {
qWarning() << "unable to move old database from" << olderDb << "to" << newDb;
}
QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)).rmdir("cepiperez");
}
}

static void migrateCache()
{
const QString olderCache = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + "/flowplayer";
const QString oldCache = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + "/flowplayer/flowplayer";
const QString newCache = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
if (QFileInfo(oldCache).isDir()) {
if (QDir().mkpath(QFileInfo(newCache).path())
&& !QDir().rename(oldCache, newCache)) {
qWarning() << "unable to move old cache from" << oldCache << "to" << newCache;
}
QDir(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + "/flowplayer").rmdir("flowplayer");
QDir(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)).rmdir("flowplayer");
} else if (QFileInfo(olderCache).isDir()) {
if (QDir().mkpath(QFileInfo(newCache).path())
&& !QDir().rename(olderCache, newCache)) {
qWarning() << "unable to move old cache from" << olderCache << "to" << newCache;
}
QDir(QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation)).rmdir("flowplayer");
}
}

int main(int argc, char *argv[])
{
QTextCodec *linuxCodec = QTextCodec::codecForName("UTF-8");
Expand All @@ -86,10 +31,6 @@ int main(int argc, char *argv[])
app->setOrganizationName("sailfishos-applications");
app->setApplicationName("flowplayer");

migrateSettings();
migrateDatabase();
migrateCache();

QString lang;
QTranslator translator;

Expand Down
16 changes: 8 additions & 8 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void Utils::readLyrics(QString artist, QString song)
}
else
{
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
}
}
Expand Down Expand Up @@ -230,9 +230,9 @@ void Utils::downloaded(QNetworkReply *respuesta)
x = tmp.indexOf("<");
tmp.remove(x,tmp.length()-x);
tmp = tmp.trimmed();
//qDebug() << "Image founded... downloading... " << tmp;
//qDebug() << "Image found... downloading... " << tmp;
if (tmp=="") {
banner = tr("Album cover not founded");
banner = tr("Album cover not found");
emit bannerChanged();
return;
}
Expand All @@ -253,7 +253,7 @@ void Utils::downloaded(QNetworkReply *respuesta)
qDebug() << str;
if ( str.contains("was not found on this server") )
{
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
}
else
Expand All @@ -280,15 +280,15 @@ void Utils::downloaded(QNetworkReply *respuesta)
currentLyrics = tmp.replace("\n", "<br>");

if (currentLyrics.contains("<div ")) {
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
} else {
m_noLyrics = false;
}
}
else
{
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
}
m_lyricsonline = true;
Expand Down Expand Up @@ -317,7 +317,7 @@ void Utils::downloaded(QNetworkReply *respuesta)
}
else
{
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
}
m_lyricsonline = true;
Expand All @@ -341,7 +341,7 @@ void Utils::downloaded(QNetworkReply *respuesta)
}
else
{
currentLyrics = tr("No lyrics founded");
currentLyrics = tr("No lyrics found");
m_noLyrics = true;
}
m_lyricsonline = true;
Expand Down
2 changes: 1 addition & 1 deletion translations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ lrelease flowplayer.ts
```
If you want to test your translation before publishing, you should compile it and copy the resulting `.qm` file(s) to (requires root privileges):
```
/usr/share/flowplayer/translations
/usr/share/flowplayer/translations/
```
FlowPlayer tries to automatically load a translation file according to your system locale setting. You can also run the application with a selected locale from the terminal. For example, for the Swedish language the command is:
```
Expand Down
Loading
Loading