Skip to content

Commit

Permalink
Showing currently playing episode again in cover
Browse files Browse the repository at this point in the history
  • Loading branch information
scharel committed Jun 15, 2014
1 parent 08ac711 commit 5f06040
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 14 deletions.
41 changes: 35 additions & 6 deletions qml/cover/CoverPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,54 @@ CoverBackground {
icon.source: "BadVoltageW.png"
}

Timer {
id: updatingTimer
interval: 1500
}

Connections {
target: updatingLabel
onVisibleChanged: if (updatingLabel.visible === false) updatingTimer.restart()
}

Column {
y: 175
width: parent.width
x: Theme.paddingSmall
width: parent.width - Theme.paddingSmall
spacing: Theme.paddingSmall

Label {
id: updatingLabel
//opacity: feedModel.progress !== 1 ? 1 : 0
visible: feedModel.progress !== 1
anchors.horizontalCenter: parent.horizontalCenter
truncationMode: TruncationMode.Fade
//: While updating feed
text: feedModel.progress !== 1 ? qsTr("Updating...") :
//: Number of unseen episodes
(nUnSeen === 0 ? qsTr("No") : nUnSeen) + " " + qsTr("new Episode") + (nUnSeen > 1 ? qsTr("s") : qsTr(""))
text: qsTr("Updating...")
}

Label {
id: playingLabel
visible: !updatingLabel.visible && !player.stopped && !updatingTimer.running
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
truncationMode: TruncationMode.Fade
text: getPrettyNumber(player.season, player.episode) + ": " + settings.value("content/" + player.season + "/" + player.episode + "/title")
}

Label {
id: newEpisodesLabel
visible: !updatingLabel.visible && !playingLabel.visible
anchors.horizontalCenter: parent.horizontalCenter
truncationMode: TruncationMode.Fade
//: Number of unseen episodes
text: (nUnSeen === 0 ? qsTr("No") : nUnSeen) + " " + qsTr("unseen Episode") + (nUnSeen > 1 ? qsTr("s") : qsTr(""))
}

Label {
id: audioPositionLabel
opacity: !player.stopped ? 1 : 0
visible: !player.stopped
anchors.horizontalCenter: parent.horizontalCenter
truncationMode: TruncationMode.Fade
text: getTimeFromMs(player.position) + "/" + getTimeFromMs(player.duration)
}
}
Expand Down
3 changes: 3 additions & 0 deletions rpm/harbour-badvoltage.changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
# * date Author's Name <author's email> version-release
# - Summary of changes

* Sun Jun 15 2014 Scharel Clemens <scharelc@gmail.com> 0.2-3
- Showing currently playing episode again in cover

* Sat Jun 14 2014 Scharel Clemens <scharelc@gmail.com> 0.2-2
- New design for cover

Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-badvoltage.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name: harbour-badvoltage
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Bad Voltage
Version: 0.2
Release: 2
Release: 3
Group: Applications/Internet
License: GNU General Public License
URL: https://github.com/scharel/harbour-badvoltage
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-badvoltage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: harbour-badvoltage
Summary: Bad Voltage
Version: 0.2
Release: 2
Release: 3
# The contents of the Group field must be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
Group: Applications/Internet
Expand Down
2 changes: 1 addition & 1 deletion src/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Settings : public QObject {
_settings->beginGroup("app");
_settings->setValue("url", "http://scharel.github.io/harbour-badvoltage");
_settings->setValue("gitUrl", "https://github.com/scharel/harbour-badvoltage");
_settings->setValue("version", "0.2-2");
_settings->setValue("version", "0.2-3");
_settings->setValue("agent", QString("Bad Voltage for SailfishOS - ").append(_settings->value("version").toString()));
_settings->endGroup();
}
Expand Down
6 changes: 5 additions & 1 deletion translations/harbour-badvoltage-de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</message>
<message>
<source>new Episode</source>
<translation>neue Folge</translation>
<translation type="obsolete">neue Folge</translation>
</message>
<message>
<source>s</source>
Expand All @@ -48,6 +48,10 @@
<source></source>
<translation></translation>
</message>
<message>
<source>unseen Episode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EpisodePage</name>
Expand Down
8 changes: 4 additions & 4 deletions translations/harbour-badvoltage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
<extracomment>Number of unseen episodes</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<source>new Episode</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>s</source>
<translation type="unfinished"></translation>
Expand All @@ -46,6 +42,10 @@
<source></source>
<translation></translation>
</message>
<message>
<source>unseen Episode</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EpisodePage</name>
Expand Down

0 comments on commit 5f06040

Please sign in to comment.