Commit Graph

39 Commits

Author SHA1 Message Date
auouymous 41c312dd68 Change deprecated logger.warn() to logger.warning(). 2022-04-29 02:54:32 -06:00
Teemu Ikonen f26c26bcf9 mpris-listener: Don't set non-existant D-Bus properties
Improves commit 1aae54f14c.
2022-04-28 10:24:48 +03:00
Teemu Ikonen a87d2406b3 mpris-listener: Guard against negative 'pos' from D-Bus
If negative position values are received from MPRIS, treat them as 0.
2022-04-28 10:24:48 +03:00
Teemu Ikonen f97116d637 mpris-listener: Fix exceptions on logging 2022-04-04 11:42:17 +03:00
Teemu Ikonen 1aae54f14c mpris-listener: Fix exceptions with unsupported properties 2022-04-04 11:26:36 +03:00
Eric Le Lay d2db5b001c update extension doc links 2020-05-25 18:39:14 +02:00
Eric Le Lay 009833a809 Fix #788 mpris_listener playback position lost on VLC quit
Thanks @coffee-lord for the solution
2020-04-26 16:29:16 +02:00
auouymous 7e459c0101 Remove executable bit for files that shouldn't be executable. 2020-01-13 00:53:59 -07:00
Eric Le Lay 12fce98721 mpris-listener: fix missing kw arg + mpris:length not always there
- mpris:length missing in change event when double-clicking a folder in My Music

- 'sender' kwarg is not required in on_seeked
2018-12-15 22:38:52 +01:00
Eric Le Lay fe0b5c2052 mpris-listener: fix typo introduced when fixing lint errors 2018-10-13 17:42:46 +02:00
Eric Le Lay 4534e3624c make mpris-listener compatible with other players than VLC
tested with SMPlayer: not so great because SMPlayer has empty
xesam:url Metadata entry, so no way to know which episode is playing
2018-10-08 19:20:00 +02:00
Eric Le Lay 459410ddda mark episode finished after streaming completion 2018-10-06 16:17:25 +02:00
MarkusHackspacher f4c075c334 fix E127 continuation line over-indented for visual indent 2018-08-25 09:42:10 +02:00
MarkusHackspacher c99fca923e fix E231 missing whitespace after ',' 2018-05-29 22:54:05 +02:00
MarkusHackspacher eecfd64f63 fix E261 at least two spaces before inline comment 2018-05-17 08:39:56 +02:00
MarkusHackspacher 11bf9e3ef8 fix E401 multiple imports on one line 2018-05-05 23:50:37 +02:00
MarkusHackspacher 9adb9a7d22 fix E124 closing bracket does not match visual indentation
add e124 and E220 to E229 as E22 in setup.cfg
2018-05-01 14:22:18 +02:00
Eric Le Lay fa5a289396 finish fixing E226 2018-04-15 18:59:20 +02:00
MarkusHackspacher 41f07738ff fix W503 line break before binary operator 2018-03-04 20:27:00 +01:00
MarkusHackspacher 91e2ea9f85 Merge github.com:gpodder/gpodder into codestyle4 2018-02-17 08:09:53 +01:00
Eric Le Lay 798babad8f fix mpris-listener extension error from gpo 2018-02-15 20:59:33 +01:00
MarkusHackspacher a90fa0b521 fix W391 blank line at end of file 2018-02-11 21:51:40 +01:00
MarkusHackspacher 0c18a43d13 fix E302 and E303, only blank line change 2018-02-11 00:22:00 +01:00
MarkusHackspacher fcbaee227c Fix W291 trailing whitespace 2018-02-01 07:59:22 +01:00
MarkusHackspacher c1c841c08c Fix W293 blank line contains whitespace 2018-01-30 14:04:28 +01:00
Eric Le Lay 81d2c152aa Merge branch 'master' into gtk3
disable MPRIS listener on windows
2017-04-23 19:09:01 +02:00
Eric Le Lay 0b4a6de4f1 Merge pull request #273 from gpodder/freedesktop-detection
Disable MPRIS listener extension in Windows and macOS
2017-04-23 14:11:17 +02:00
Eric Le Lay 35870290ed Merge branch 'master' into gtk3 2017-04-23 13:44:56 +02:00
Thomas Perl 32c3e8cf51 Disable MPRIS listener extension in Windows and macOS 2017-04-16 10:25:46 +02:00
Eric Le Lay f34447aabe extension: entry in context-menu to resume playback
Uses the MPRIS2 dbus interface to enqueue and seek the episode
in supported media players.
2017-04-01 22:15:42 +02:00
Eric Le Lay d8bf98c69b python3 mpris-listener extension fix
At first, when self.pos is None, < and - raise exceptions.
Also, in on_playback_stopped, we must keep as str to call
startswith, etc.
2017-04-01 15:31:01 +02:00
Adam Voss 7b8e7b8779 Merge pull request #204 from elelay/mprisExtFix
MPRIS listener extension: fix error when VLC stops
2017-03-25 21:28:17 -05:00
Adam Voss bcfdc395d5 Ran `2to3` on 'share' and accepted appropriate changes 2017-03-25 19:25:49 -05:00
Adam Voss d2a9d58524 Changes since Python3 does floating point division
This was done based on a manual search for the '/' character.  No efforts were made to try to run all affected code paths.
2017-02-14 08:53:47 -06:00
Eric Le Lay 68702f7f27 MPRIS listener extension: fix error when VLC stops
then, there is no xesam:url.
Also consider all the mpris2 interfaces before logging a warning
about unexpected interface.
2017-01-08 17:39:52 +01:00
Dov Feldstern 458a049fd8 mpris listener: factor out check of whether update is needed (avoid for... else)
I'm not opposed to 'for... else' myself, but I admit that even so I still have
to check [1] every time to remember what Raymond Hettinger suggests the 'else'
*should* have been called (hint: 'nobreak')...

[1] https://www.youtube.com/watch?v=OSGv2VnC0go&t=15m50s
2014-05-05 00:32:56 +03:00
Dov Feldstern a3b2e8230f mpris listener: rename 'same_second' -> 'subsecond_difference'
'same_second' is a bit of a misleading name: it could be understood to check
whether or not two times are "in the same second" rather than whether two times
are "within a second of each other" (so, 1.999 and 2.001 might be thought to
fail this check).

Indeed, the function was originally implemented as "in the same second"; but
that implementation was incorrect in the context in which we use it, and the
implementation was fixed in [1]; unfortunately, the name was not changed as
part of that fix... Fixing the name, too, now.

[1] da2c5444fe

--HG--
extra : amend_source : 0da64760fe6926460641f9ef158bcd23963bf963
2014-05-04 19:45:36 +03:00
Dov Feldstern ae405f5f6a mpris listener: pass arguments to logging functions, instead of %-formatting
this allows the formatting to occur only when the specific logging is enabled

--HG--
extra : amend_source : 290ff6bdb429f67c19e9f6bf393e612b61e19ff7
2014-05-04 19:23:35 +03:00
Dov Feldstern 04dce36fa2 New extension: MPRIS Listener
This extension listens to notifications from MPRIS-capable media players and
translates them to gPodder's Media Player D-Bus API.
2014-05-04 02:59:25 +03:00