Giter Site home page Giter Site logo

mpris2client's Introduction

Hi

A CS student in the UK. Stuff i've done:

  • jfa-go (jellyfin-accounts go): A user management app for Jellyfin/Emby, with features like invites, automated password resets, and new user profiles. This is a rewrite of my quarantine project jellyfin-accounts in Go and Typescript instead of Python and Javascript.
  • buildrone: An app for publicly hosting software builds from Drone CI. Very janky, but useful for doing nightly releases for my software. See here for a running instance.
  • waybar-mpris: Waybar component/utility for displaying and controlling MPRIS2 music players individually.
  • go-scrobble: Personal Last.FM scrobbler for MPRIS2 players, using the same mpris2client library I wrote for waybar-mpris.
  • filaments: A clone of the New York Times' Strands game, with some multiplayer and archival features.

I also host some things on my gitea instance here.

mpris2client's People

Contributors

hrfee avatar

Watchers

 avatar  avatar

mpris2client's Issues

LICENSE for waybar-mpris

I'd like to package waybar-mpris, hopefully getting it on COPR, for Fedora. Fedora has a strict policy about FOSS, so I'd need to ensure that I'm following the packaging guidelines and explicitly declaring the license.

waybar-mpris is currently published without a license, so all rights are currently reserved for you and it's not FOSS by definition as you've not licensed the community to use, modify, or redistribute your work.

I'd appreciate you dropping a LICENSE on there for me :)

Error while getting player position from spotify

I'm a user of your great waybar module waybar-mpris
I currently face an error while using the module with the --position flag with the official spotify client.

❯ waybar-mpris --position
panic: interface conversion: interface {} is uint64, not int64

goroutine 1 [running]:
github.com/hrfee/mpris2client.(*Player).StringPosition(0xc0001360b0, 0xc00009cea0, 0x55b1e5528511)
	github.com/hrfee/[email protected]/mpris2.go:218 +0x285
main.playerJSON(0xc0001360b0, 0x55b1e55b8c38, 0xc000010058)
	git.hrfee.pw/hrfee/waybar-mpris/main.go:54 +0x1086
main.(*players).JSON(...)
	git.hrfee.pw/hrfee/waybar-mpris/main.go:121
main.main()
	git.hrfee.pw/hrfee/waybar-mpris/main.go:322 +0x7e7

I did some verification and the dbus interface returns an uint64 from spotify client metadata mpris:length while your code expects an int64

Here is what my dbus interfaces returns from spotify :

❯ dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'
   variant       array [
         dict entry(
            mpris:trackid            variant                spotify:track:3jwLYTAiYI8kWQB8BfQ6iM         )
         dict entry(
            mpris:length            variant                uint64 321034000
         )
         dict entry(
            mpris:artUrl            variant                https://open.spotify.com/image/ab67616d00001e022fb9075aafbfd405dc088078         )
         dict entry(
            xesam:album            variant                Pumple Snout         )
         dict entry(
            xesam:albumArtist            variant                array [
                  Frequent               ]
         )
         dict entry(
            xesam:artist            variant                array [
                  Frequent               ]
         )
         dict entry(
            xesam:autoRating            variant                double 0.2
         )
         dict entry(
            xesam:discNumber            variant                int32 1
         )
         dict entry(
            xesam:title            variant                Pumple Snout         )
         dict entry(
            xesam:trackNumber            variant                int32 1
         )
         dict entry(
            xesam:url            variant                https://open.spotify.com/track/3jwLYTAiYI8kWQB8BfQ6iM         )
      ]

The error happens with the casting here :

l = v.(int64)

Some more type checking might be necessary, do you have an idea of how it's possible to handle this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.