• Home
  • Blog
  • Add-ons
  • Forum
  • Wiki
  • Developers
Nightingale - The tune of life, the tune of yours
  • Portal
  • Search
  • Member List
  • Calendar
  • Help
  • Portal
  • Search
  • Member List
  • Calendar
  • Help
Guest Hi, Guest
  • Login
  • Register
Login
Username:
Password: Lost Password?
 
Nightingale Forums Nightingale Feedback & Suggestions Add-on Suggestions Modify Rating with Command-Line/DBus

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Modify Rating with Command-Line/DBus
Frozen_byte Offline
Junior Member
**
Posts: 3
Threads: 1
Joined: Feb 2014
Reputation: 0
#1
02-17-2014, 11:18 AM
Some options are already possible (eg, play/pause/next/prev)

I would like to add or remove a star of the currently playing track, too.
Find
Reply
freaktechnik Offline
CCO (Chief Crashing Officer)
*******
Posts: 498
Threads: 24
Joined: Sep 2010
Reputation: 11
#2
02-17-2014, 10:25 PM
You seem to know D-Bus. I am sure you're aware that our D-Bus implementation is an implementation of the MPRIS standard. The more recent version of MPRIS, MPRIS 2 doens't allow writing of metadata. However we also implement an older version of MPRIS, MPRIS 1. If you ever Introspected the /Player object, you'd have noticed the Method "SetMetadata", which takes two arguments: a key and a value.
More specific:
org.mpris.MediaPlayer2.nightingale /Player getMetadata(in s key, in s value)


In order to set the rating, call getMetadata with an array like this: ['rating', '5']. The value is the number of stars. And rating is actually the only key that work together with this method.

If you don't use a Nightlybuild, I don't know how you found ngale's DBus API, but just in casE: you need a Nightlybuild (Nightingale 1.12.2a) in order to get the MPRIS API on Linux.
freaktechnik
Website Find
Reply
Frozen_byte Offline
Junior Member
**
Posts: 3
Threads: 1
Joined: Feb 2014
Reputation: 0
#3
02-18-2014, 07:58 AM (This post was last modified: 02-18-2014, 08:00 AM by Frozen_byte.)
Yes I found the DBus, but not your given method.

Code:
frozen_byte@Frozen-SRV ~> qdbus org.mpris.MediaPlayer2.nightingale /Player
signal void org.mpris.songbird.CapsChange(int)
fish: Job 1, “qdbus org.mpris.MediaPlayer2.nightingale /Player” terminated by signal SIGSEGV (Address boundary error)

d-feet also can not Find your given Object:

[Image: t6m3LSZ.jpg]

There is just one default object "/" with no specific Methods.
Find
Reply
freaktechnik Offline
CCO (Chief Crashing Officer)
*******
Posts: 498
Threads: 24
Joined: Sep 2010
Reputation: 11
#4
02-18-2014, 08:43 PM (This post was last modified: 02-18-2014, 08:53 PM by freaktechnik.)
Oh, I forgot to change the interface name to org.mpris.MediaPlayer2.nightingale in the mpris1 implementation. I'll fix it asap.

Edit: fixed in upstream. Path is now /org/mpris/MediaPlayer2/nightingale and interface is org.freedesktop.MediaPlayer .
freaktechnik
Website Find
Reply
Frozen_byte Offline
Junior Member
**
Posts: 3
Threads: 1
Joined: Feb 2014
Reputation: 0
#5
03-21-2014, 06:54 AM (This post was last modified: 03-21-2014, 07:04 AM by Frozen_byte.)
Sorry for my late answer, was on holidays *g*

I am on the lates nightly but still, I can not find your getMetadata() method =(

Well the B-Dus seems a bit buggy anyway, because the method List (in console) should show the same content as d-feet does.
Look at the -> Picture <-

Can anyone reproduce the error, or is it System-Related?
Find
Reply
freaktechnik Offline
CCO (Chief Crashing Officer)
*******
Posts: 498
Threads: 24
Joined: Sep 2010
Reputation: 11
#6
04-25-2014, 08:07 AM
Hi
I just reread the DBus spec and realized Nightingale wasn't replying to the Introspect requests correctly. If you try out a new Nightingly build that has been built after the time this post was written, you should get the full lists in the DBus inspectors.
Previously Nightingale didn't recursively show the interfaces/nodes of paths deeper down than the introspect requested, which is not what is expected. An introspect on / should return everything, as far as I understand the docs.
freaktechnik
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)
  • Return to Top
  • Lite (Archive) Mode
  • RSS Syndication
Current time: 03-30-2023, 08:44 AM Powered By MyBB, © 2002-2023 MyBB Group.
Design By AliReza_Tofighi In WhiteCrow Software Group.
white outlined nightingale project logo

Nightingale is free!
It is an Open Source project released under the terms of the GNU General Public License v2 (GPL v2).
For more details, please read the license information.

Follow us!
f  g  t

Support
  • Community Forum
  • Official Blog
  • Add-ons
  • Wiki
  • Help Forum
Contribute
  • Developer's Center
  • Translate Nightingale
  • Source Code
  • Report a Bug
Ressources
  • Download Nightingale
Linear Mode
Threaded Mode