change how updateDuration happens
This commit is contained in:
parent
a658b40946
commit
feb102251e
2 changed files with 5 additions and 4 deletions
|
@ -275,7 +275,7 @@ angular.module('podcasts.models', ['podcasts.database', 'podcasts.utilities'])
|
||||||
var feedItem = _get(feedItemId, function(feedItem) {
|
var feedItem = _get(feedItemId, function(feedItem) {
|
||||||
feedItem.queued = 0;
|
feedItem.queued = 0;
|
||||||
|
|
||||||
var promise = db.put("feedItem", feedItem);
|
var promise = db.put("feedItem", feedItem)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
$rootScope.$broadcast('queueListRefresh');
|
$rootScope.$broadcast('queueListRefresh');
|
||||||
});
|
});
|
||||||
|
|
|
@ -110,9 +110,6 @@ angular.module('podcasts.services', ['podcasts.utilities', 'podcasts.queueList',
|
||||||
function updateSong(feedItem, $scope)
|
function updateSong(feedItem, $scope)
|
||||||
{
|
{
|
||||||
nowPlaying.title = feedItem.title;
|
nowPlaying.title = feedItem.title;
|
||||||
/*$timeout(function() {
|
|
||||||
player.nowPlaying.duration = audio.duration;
|
|
||||||
}, 100);*/
|
|
||||||
nowPlaying.currentFeedItem = feedItem;
|
nowPlaying.currentFeedItem = feedItem;
|
||||||
nowPlaying.description = feedItem.description;
|
nowPlaying.description = feedItem.description;
|
||||||
nowPlaying.feed = feedItem.feed;
|
nowPlaying.feed = feedItem.feed;
|
||||||
|
@ -122,6 +119,10 @@ angular.module('podcasts.services', ['podcasts.utilities', 'podcasts.queueList',
|
||||||
|
|
||||||
function updatePosition($scope)
|
function updatePosition($scope)
|
||||||
{
|
{
|
||||||
|
$timeout(function() {
|
||||||
|
nowPlaying.duration = audio.duration;
|
||||||
|
}, 500);
|
||||||
|
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
nowPlaying.position = audio.currentTime;
|
nowPlaying.position = audio.currentTime;
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue