Giter Site home page Giter Site logo

Comments (18)

sakithb avatar sakithb commented on September 27, 2024

I just installed Freetube and tried blacklisting it, and it worked as expected, the extension does not show up when opening Freetube if its is blacklisted. The last update was a total rewrite of the extension so it was rather a huge update, so can you try removing all blacklisted players and adding them one by one?

from media-controls.

aacater avatar aacater commented on September 27, 2024

The only app I want to block is freetube so my blacklist is empty except for it. I have removed and re-added it multiple times.

Since its just me, I'll continue to test. Like seeing if it happens on my laptop or if its just my desktop for some reason.

from media-controls.

aacater avatar aacater commented on September 27, 2024

Same behavior on my laptop. Also running Fedora Silverblue.

Also tested blocking Firefox, it works as expected. So it seems I am only having trouble with Freetube for some reason.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

Does the extension show the correct freetube icon?

from media-controls.

aacater avatar aacater commented on September 27, 2024

No, it does not. However the icon is show properly in the blacklist settings.

Screenshot from 2024-01-20 08-06-15

from media-controls.

aacater avatar aacater commented on September 27, 2024
  • I have discovered, for some reason, sometimes it works. I haven't tracked down the exact steps to reproduce it yet. But sometimes I will be using freetube and then notice its blacklisted properly. But if I restart freetube then it will be back to not blacklisted.
  • The icon in the extension will show up sometimes. I think it has something to do with switching between apps in the extension. Once I switch back to freetube, the icon is there. If I restart freetube the icon is missing again.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

I noticed that Freetube exposes two MPRIS services (this extensions uses these services to identify media players), one was called Freetube and the other was called chromium (this makes sense assuming Freetube uses Electron), maybe this plays a part in the issue, I am not sure, but I will look into it. The odd thing is I always get the correct Freetube icon in the extension. What is your freetube version?

from media-controls.

aacater avatar aacater commented on September 27, 2024

I am currently using v0.19.1 Beta.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

Im on the same version. It's really weird that it works for me, but not for you. Is you laptop on Fedora Silverblue as well?

from media-controls.

aacater avatar aacater commented on September 27, 2024

Yes, laptop is running Fedora Silverblue as well.


Random information/thoughts that may or may not be helpful:

  • I noticed freetube changes the window's name based on the video playing. Could that be interfering with the blacklist?
  • you can open multiple freetube windows to play multiple videos at once, but the extension only shows one freetube. The extension will show controls for the last video that was started/stopped.
    • next time I notice the blacklist working I am going to test if opening a second window breaks the blacklist.
    • Two windows does not break the blacklist.
  • this is happening on both X11 and wayland. I run X11 on my desktop and wayland on my laptop.

I am still trying to track down the exact circumstances of when blacklist works and when it doesn't. Currently it seems to work after a certain amount of time. Or something I do infrequently makes it work.

It definitely doesn't work right after I reboot and/or login. Which is weird to me, I would expect it to work then if at all...

Is there any debug logs I can provide or something like that?

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

Can you post the output of this command?
gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep -Poi "'org.mpris.Mediaplayer2\..+?'" | xargs -I{} gdbus introspect --session --dest {} --object-path /org/mpris/MediaPlayer2

This command will list all the active media players and fetch their information via gdbus. Make sure the freetube is open and playing a video before running this command.

from media-controls.

aacater avatar aacater commented on September 27, 2024

gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep -Poi "'org.mpris.Mediaplayer2\..+?'" | xargs -I{} gdbus introspect --session --dest {} --object-path /org/mpris/MediaPlayer2

node /org/mpris/MediaPlayer2 {
};
node /org/mpris/MediaPlayer2 {
  interface org.freedesktop.DBus.Properties {
    methods:
      Get(in  s interface_name,
          in  s property_name,
          out v value);
      GetAll(in  s interface_name,
             out a{sv} properties);
      Set(in  s interface_name,
          in  s property_name,
          in  v value);
    signals:
      PropertiesChanged(s interface_name,
                        a{sv} changed_properties,
                        as invalidated_properties);
    properties:
  };
  interface org.freedesktop.DBus.Introspectable {
    methods:
      Introspect(out s xml_data);
    signals:
    properties:
  };
  interface org.freedesktop.DBus.Peer {
    methods:
      Ping();
      GetMachineId(out s machine_uuid);
    signals:
    properties:
  };
  interface org.mpris.MediaPlayer2 {
    methods:
      Raise();
      Quit();
    signals:
    properties:
      readonly b CanQuit = true;
      readonly b CanSetFullscreen = false;
      readonly b CanRaise = true;
      readonly b HasTrackList = false;
      readonly s Identity = 'Spotify';
      readonly s DesktopEntry = 'spotify';
      readonly as SupportedUriSchemes = ['spotify'];
      readonly as SupportedMimeTypes = [];
  };
  interface org.mpris.MediaPlayer2.Player {
    methods:
      Next();
      Previous();
      Pause();
      PlayPause();
      Stop();
      Play();
      Seek(in  x Offset);
      SetPosition(in  o TrackId,
                  in  x Position);
      OpenUri(in  s Uri);
    signals:
      Seeked(x Position);
    properties:
      readonly s PlaybackStatus = 'Paused';
      readwrite s LoopStatus = 'None';
      readwrite d Rate = 1.0;
      readwrite b Shuffle = true;
      readonly a{sv} Metadata = {'mpris:trackid': <'/com/spotify/track/6m4HWTYMRSJkaUuvXTaNmE'>, 'mpris:length': <uint64 203066000>, 'mpris:artUrl': <'https://i.scdn.co/image/ab67616d0000b273c3c0ca7a4929d96f2f1c5774'>, 'xesam:album': <'The Good, The Bad and The Ugly (Original Motion Picture Soundtrack) [Remastered Edition]'>, 'xesam:albumArtist': <['Ennio Morricone']>, 'xesam:artist': <['Ennio Morricone']>, 'xesam:autoRating': <0.54000000000000004>, 'xesam:discNumber': <1>, 'xesam:title': <"The Ecstasy of Gold - L'Estasi Dell'oro">, 'xesam:trackNumber': <20>, 'xesam:url': <'https://open.spotify.com/track/6m4HWTYMRSJkaUuvXTaNmE'>};
      readwrite d Volume = 0.4516060120546273;
      readonly x Position = 124503000;
      readonly d MinimumRate = 1.0;
      readonly d MaximumRate = 1.0;
      readonly b CanGoNext = true;
      readonly b CanGoPrevious = true;
      readonly b CanPlay = true;
      readonly b CanPause = true;
      readonly b CanSeek = true;
      readonly b CanControl = true;
  };
};

gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.ListNames | grep -Poi "'org.mpris.Mediaplayer2\..+?'"

'org.mpris.MediaPlayer2.chromium.instance2'
'org.mpris.MediaPlayer2.spotify'

gdbus introspect --session --dest org.mpris.MediaPlayer2.chromium.instance2 --object-path /org/mpris/MediaPlayer2

node /org/mpris {
  node MediaPlayer2 {
  };
};

These commands were run when I was playing a video in freetube and the extension's blacklist was not working properly.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

That's very weird, I guess the empty node is Freetube.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

Are you able to control freetube properly through the extension?

from media-controls.

aacater avatar aacater commented on September 27, 2024

Yes, the extension is able to control freetube properly.

Since freetube's node is empty, does that mean this is a freetube bug? Or maybe even gbus?

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

I think this is a chromium bug. I've noticed this issue in some chrome versions. Not sure if it is fixed in the latest.

from media-controls.

sakithb avatar sakithb commented on September 27, 2024

@aacater Is this fixed now?

from media-controls.

aacater avatar aacater commented on September 27, 2024

I think so. At least I haven't noticed it happening but I am also using freetube less.

Thanks!

from media-controls.

Related Issues (20)

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.