~vicamo/media-hub/add-lib64-for-64bit-android

« back to all changes in this revision

Viewing changes to src/core/media/player_implementation.cpp

  • Committer: Bileto Bot
  • Author(s): Jim Hodapp
  • Date: 2016-06-28 01:45:13 UTC
  • mfrom: (195.1.3 track-length)
  • Revision ID: ci-train-bot@canonical.com-20160628014513-qrj8tyt4xup4ad6c
Export the current track length per the MPRIS spec. (LP: #1596245)

Show diffs side-by-side

added added

removed removed

Lines of Context:
408
408
        if (not metadata.is_set(media::Track::MetaData::TrackArtlUrlKey))
409
409
            metadata.set_art_url(get_uri_for_album_artwork(uri, metadata));
410
410
 
 
411
        if (not metadata.is_set(media::Track::MetaData::TrackLengthKey))
 
412
        {
 
413
            // Duration is in nanoseconds, MPRIS spec requires microseconds
 
414
            metadata.set_track_length(std::to_string(engine->duration().get() / 1000));
 
415
        }
 
416
 
411
417
        parent->meta_data_for_current_track().set(metadata);
412
418
    }
413
419