You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2022-05-28 02:12:41,087 | WARNING | closing connection [discord_rpc.async_]
Traceback (most recent call last):
File "/usr/bin/discordrp-mpris", line 33, in <module>
sys.exit(load_entry_point('discordrp-mpris==0.3.2', 'console_scripts', 'discordrp-mpris')())
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 341, in main
loop.run_until_complete(wait_task)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/usr/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
return fut.result()
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 336, in main
return loop.run_until_complete(main_task)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 329, in main_async
return await instance.run()
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 91, in run
await self.tick()
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 141, in tick
replacements = self.build_replacements(player, metadata, position, length, state)
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 262, in build_replacements
replacements['length'] = cls.format_timestamp(length)
File "/usr/lib/python3.10/site-packages/discordrp_mpris/__main__.py", line 288, in format_timestamp
secs = microsecs // int(1e6)
TypeError: unsupported operand type(s) for //: 'str' and 'int'
The text was updated successfully, but these errors were encountered:
This is due to the fact that Amberol reports the microseconds duration as a string, you just need to handle the case that the length is a string and try to convert it to a number.
Thanks for creating the report. smplayer had a similar issue in that it violated the protocol by transmitting a float instead of an int for the position field (see #7).
We can deploy a similar workaround here, but fixing this upstream is of course preferred and I'd rather spend time on migrating to jeepney as the dbus library instead of dbussy because I found its API to be much cleaner. (That said, since I personally don't use this tool anymore, it has dropped a bit in priority for me.)
When playing audio with Amberol:
The text was updated successfully, but these errors were encountered: