Skip to content

Commit

Permalink
More GStreamer fixes and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerego committed Feb 8, 2017
1 parent f444a91 commit 5304a00
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
hackclock (2.1.2-1) stable; urgency=low
hackclock (2.1.3-1) stable; urgency=low

* Fixed GStreamer issue introduced with v2.1.1
* Fixed YET ANOTHER GStreamer issue introduced with v2.1.1

-- DeckerEgo <[email protected]> Mon, 06 Feb 2017 21:50:00 -0500
-- DeckerEgo <[email protected]> Tue, 07 Feb 2017 22:15:00 -0500
7 changes: 4 additions & 3 deletions lib/hackclock/runapp/Libs/Clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ def __executeEvents(self):

def run(self):
while self.__running:
if self.tickFunc: self.tickFunc()
self.__executeEvents()

self.__waitLock.acquire()
totalWait = self.__RESOLUTION + self.additionalWait
self.additionalWait = 0
self.__waitLock.release()

if self.tickFunc: self.tickFunc()
self.__executeEvents()

time.sleep(totalWait / 1000.0)

def atTime(self, hour, minute, action):
Expand Down
1 change: 0 additions & 1 deletion lib/hackclock/runapp/Libs/GStreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def stop(self):
self.pl.set_state(gst.STATE_NULL)
if self.eventLoop:
self.eventLoop.quit()
gobject.threads_leave()

def isPlaying(self):
return gst.STATE_PLAYING in self.pl.get_state() if self.pl else False
Expand Down
5 changes: 3 additions & 2 deletions lib/hackclock/runapp/Libs/GoogleMusic.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ def __fetchTrackIDs(self, station_id):

def pop(self):
while self.__playlist:
track_id = self.__playlist.pop()

try:
track_id = self.__playlist.pop()
stream_url = self.__client.get_stream_url(track_id, quality='low')
return stream_url
except(exceptions.CallFailure):
logger.warning("Failed to fetch Stream URL for ID %s" % trackid)
logger.warning("Failed to fetch Stream URL for ID %s" % track_id)

raise IndexError("pop from empty list")

Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rm home/pi/hack-clock/backups/blocks_clock.*

cd ..
echo "Compressing file..."
tar Jcf hackclock_2.1.2.orig.tar.xz hack-clock/
tar Jcf hackclock_2.1.3.orig.tar.xz hack-clock/

cd hack-clock
dpkg-buildpackage -rfakeroot -uc -us
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def all_files(newroot, oldroot):

setup(
name='HackClock',
version='2.1.1',
version='2.1.3',
description='A hackable alarm clock for the Raspberry Pi',
author='DeckerEgo',
author_email='[email protected]',
Expand Down

0 comments on commit 5304a00

Please sign in to comment.