iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
468 stars 30 forks source link

Windows 11 notification crash #259

Closed iamkroot closed 1 year ago

iamkroot commented 1 year ago
          https://bit.ly/3QbHbdD

with the new push

Originally posted by @panaris in https://github.com/iamkroot/trakt-scrobbler/issues/257#issuecomment-1756657481

iamkroot commented 1 year ago

@panaris Let's continue here

iamkroot commented 1 year ago

I think there is some bug where old code is still showing up for some reason. I suggest

  1. Stop the scrobbler with trakts stop
  2. Run pipx uninstall trakt-scrobbler
  3. Run pipx install git+https://github.com/iamkroot/trakt-scrobbler.git@master
  4. Start scrobbler with trakts start
panaris commented 1 year ago

Good call. that was indeed the problem. everything went right despite the strange errors. https://bit.ly/3rQGAEK WNDPROC return value cannot be converted to LRESULT Apart from this everything is right except the scrobbler for mpc-be can't start because of this: (from the logs) https://bit.ly/45zhV5g And a minor thing about the button in the notification is that it didnt copy the trakt code correctly (i think it missed the letters and copied only the numbers)

iamkroot commented 1 year ago

Looks like a bug in the dependency we use to create notifications https://github.com/jithurjacob/Windows-10-Toast-Notifications/issues/117

There's some fixes for it but the repo is inactive. We will probably need to change to a more maintained library. For now, you should be able to avoid this error by disabling all notifications from the config.

panaris commented 1 year ago

I also noticed that scrobble starts successfully but does not end when I stop watching or when the media ends, so it does not mark it as watched in trakt. Many errors bellow: GaAm71q

iamkroot commented 1 year ago

This seems to be related to the notifier issue- the traceback shows it errors out somewhere inside Win10Toast.

panaris commented 1 year ago

it's possible, because it shows no notifs other than the initial trakt one

iamkroot commented 1 year ago

Update: I'm looking into using a more up-to-date library for notifications on windows. Either desktop-notifier (that we already use for linux/mac) or win11toast. Both need us to set an App ID so Windows can show notifs. This link seems to be the closest to what we have.

panaris commented 1 year ago

https://pypi.org/project/Windows-Toasts/

this works for sure. i know because i follow closely another project

https://github.com/marticliment/WingetUI

iamkroot commented 1 year ago

@panaris Try reinstalling the master branch again. I've pushed a fix for this using desktop-notifier.

panaris commented 1 year ago

yes, it works now except button does nothing. i'll report any other issue i find

iamkroot commented 1 year ago

Please create a bug report for that! (It is surprising, since the button JustWorks TM for me)

panaris commented 1 year ago

yes, button doesnt work but click works fine (except the console opening for a millisecond)

ymyogev commented 1 year ago

Getting this error when I do step 3 @iamkroot , what am I missing? Sorry, not a Python-head

ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH? Cannot determine package name from spec 'git+https://github.com/iamkroot/trakt-scrobbler.git@master'. Check package spec for errors.

I think there is some bug where old code is still showing up for some reason. I suggest

3. Run `pipx install git+https://github.com/iamkroot/trakt-scrobbler.git@master`
panaris commented 1 year ago

do you have git installed? https://git-scm.com/book/en/v2/Getting-Started-Installing-Git