Skip to content

Commit

Permalink
Version bump for elementaryos only
Browse files Browse the repository at this point in the history
  • Loading branch information
geigi committed Feb 14, 2018
1 parent ff418fd commit bd40f6a
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
app/
bin/
cozy/__pycache__
debian/build/
debian/com.github.geigi.cozy.debhelper.log
debian/com.github.geigi.cozy.substvars
Expand All @@ -19,4 +20,6 @@ peewee/
.vscode/.ropeproject
.vscode/tags
.tx
*.log
*.log
*.prof
*.pyc
3 changes: 3 additions & 0 deletions cozy/book_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def __create_popover(self):
self.duration_label = builder.get_object("duration_label")
self.remaining_label = builder.get_object("remaining_label")
self.remaining_text_label = builder.get_object("remaining_text_label")
self.played_text_label = builder.get_object("played_text_label")

self.duration = get_book_duration(self.book)
self.duration_label.set_text(tools.seconds_to_str(self.duration / self.ui.speed, False))
Expand Down Expand Up @@ -365,10 +366,12 @@ def update_time(self):
if progress == 0 or remaining < 15:
self.remaining_label.set_visible(False)
self.remaining_text_label.set_visible(False)
self.played_text_label.set_visible(False)
else:
if not self.remaining_label.get_visible():
self.remaining_label.set_visible(True)
self.remaining_text_label.set_visible(True)
self.played_text_label.set_visible(True)

percentage = progress / self.duration

Expand Down
4 changes: 3 additions & 1 deletion cozy/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
import logging
import uuid

log = logging.getLogger("db")
from peewee import __version__ as PeeweeVersion
if PeeweeVersion[0] == '2':
log.info("Using peewee 2 backend")
from peewee import BaseModel
ModelBase = BaseModel
else:
log.info("Using peewee 3 backend")
from peewee import ModelBase
from peewee import Model, CharField, IntegerField, BlobField, ForeignKeyField, FloatField, BooleanField, SqliteDatabase
from playhouse.migrate import SqliteMigrator, migrate
Expand All @@ -16,7 +19,6 @@

# first we get the data home and find the database if it exists
data_dir = os.path.join(GLib.get_user_data_dir(), "cozy")
log = logging.getLogger("db")
log.debug(data_dir)
if not os.path.exists(data_dir):
os.makedirs(data_dir)
Expand Down
15 changes: 15 additions & 0 deletions data/com.github.geigi.cozy.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
<url type="donation">https://www.patreon.com/geigi</url>
<update_contact>[email protected]</update_contact>
<releases>
<release version="0.5.0" timestamp="1518457439">
<description>
<ul>
<li>Display the progress and remaining time of your books</li>
<li>Click on the remaining time ;)</li>
<li>Support for album art in image files (thanks to oleg-krv)</li>
<li>Faster startup! (introducing album art cache)</li>
<li>Fixed mp3 disk number on imports</li>
<li>More small bugfixes</li>
<li>Some UI tweaks (also thanks to jnbr)</li>
<li>Support for peewee3 (tanks to jnbr)</li>
<li>Chinese translation</li>
</ul>
</description>
</release>
<release version="0.4.9" timestamp="1518457439">
<description>
<ul>
Expand Down
24 changes: 12 additions & 12 deletions data/ui/book_progress_element.ui
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">center</property>
<property name="margin_top">5</property>
<property name="margin_bottom">3</property>
<child>
<object class="GtkLabel" id="duration_label">
<object class="GtkLabel" id="remaining_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">21h32</property>
<property name="justify">right</property>
<property name="margin_left">5</property>
<property name="label">4h32</property>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -44,35 +45,34 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>
<property name="label" translatable="yes">remaining</property>
<property name="margin_right">5</property>
<property name="label" translatable="yes">of</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="remaining_label">
<object class="GtkLabel" id="duration_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>
<property name="label">4h32</property>
<property name="label">21h32</property>
<property name="justify">right</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="played_text_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>
<property name="label" translatable="yes">total</property>
<property name="label" translatable="yes">played</property>
</object>
<packing>
<property name="expand">False</property>
Expand All @@ -83,7 +83,7 @@
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
Expand Down
18 changes: 16 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
com.github.geigi.cozy (0.5.0) UNSTABLE; urgency=low

* Display the progress and remaining time of your books
* Try clicking on the remaining time ;)
* Support for album art in image files (thanks to oleg-krv)
* Faster startup! (introducing album art cache)
* Fixed mp3 disk number on imports
* Other bugfixes
* Some UI tweaks (thanks to jnbr)
* Support for peewee3 (tanks to jnbr)
* Chinese translation

-- Julian Geywitz <[email protected]> Wed, 12 Feb 2018 18:35:14 +0200

com.github.geigi.cozy (0.4.9) UNSTABLE; urgency=low

* Display the progress and remaining time of your books
Expand All @@ -7,7 +21,7 @@ com.github.geigi.cozy (0.4.9) UNSTABLE; urgency=low
* Fixed mp3 disk number on imports
* Other bugfixes
* Some UI tweaks (thanks to jnbr)
* Support for peewee3 (tanks to jnbr)<
* Support for peewee3 (tanks to jnbr)
* Chinese translation

-- Julian Geywitz <[email protected]> Wed, 12 Feb 2018 18:35:14 +0200
Expand All @@ -21,7 +35,7 @@ com.github.geigi.cozy (0.4.8) UNSTABLE; urgency=low
* Fixed mp3 disk number on imports
* Other bugfixes
* Some UI tweaks (thanks to jnbr)
* Support for peewee3 (tanks to jnbr)<
* Support for peewee3 (tanks to jnbr)
* Chinese translation

-- Julian Geywitz <[email protected]> Wed, 12 Feb 2018 18:35:14 +0200
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('cozy',
version: '0.4.9',
version: '0.5.0',
meson_version: '>= 0.40.0')

project_name = 'cozy'
Expand Down

0 comments on commit bd40f6a

Please sign in to comment.