• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Easy way to access metadata of 'now playing' song

    Scheduled Pinned Locked Moved Technical Help
    3 Posts 3 Posters 1.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jonenone
      last edited by

      Hi,
      First of all, thanks for this great player!

      I am using strawberry to playback songs for my radio stream and I am trying to find out how I can extract metadata information of the currently playing song to forward it to my radio stream as well.

      Is there an easy way to access that data? I am on a mac, and I already tried monitoring ~/Library/Application Support/Strawberry/strawberry.db for changes, but could only find 'lastplayed' is updated once a song is finished.

      I also tried intercepting desktop notifications, but without any luck.

      I know this is sort of an unusual use case as I am not using Strawberry to stream to my radio server but another software, however, I would be really grateful for any hints!

      Many thanks!

      1 Reply Last reply
      Reply Quote 0
      • M
        mataha
        last edited by mataha

        +1

        My (rather crude) solution involves fetching currently playing song's data from Strawberry's window title.
        The code is roughly equivalent to the following (inline cmd, Windows):

        @chcp 65001 >nul 2>&1
        for /f "tokens=2,* skip=9 usebackq" %i in (
            `tasklist /v /fo list /fi "imagename eq strawberry.exe" 2^>nul`
        ) do @echo %j
        

        However, I can only extract the song's artist and title with this - not to mention it's not configurable.

        There must be a better way...

        jonasJ 1 Reply Last reply
        Reply Quote 0
        • jonasJ
          jonas @mataha
          last edited by

          I think it should be possible to enable D-Bus on macOS.
          Some instructions here: https://github.com/zbentley/dbus-osx-examples/blob/master/installation/README.md

          The macOS versions of Strawberry is compiled with MPRIS2 D-Bus support.
          I have never tested it though, so I can't say if it works or not.

          1 Reply Last reply
          Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Powered by NodeBB | Contributors