z411 / trackma

Open multi-site list manager for Unix-like systems. (ex-wMAL)
https://z411.github.io/trackma
GNU General Public License v3.0
776 stars 81 forks source link

Tracker doesn't update progress #280

Closed clavinet closed 7 years ago

clavinet commented 7 years ago

Since the latest release (0.7), the tracker won't automatically update progress. This is especially strange since it worked fine in 0.6.2 and even shows a notification, "now playing episode 9, will update in 120 seconds", but then doesn't actually update it.

z411 commented 7 years ago

What tracker are you using? (This is shown in the console at the start) What happens when the timer hits 0? Does it shown any message or warning?

clavinet commented 7 years ago

Local with SMPlayer. i'm not sure what you mean by timer, but after 120 seconds when it should update the progress by default, nothing happens.

z411 commented 7 years ago

Which interface are you using? The new interfaces in version 0.7 should have a timer in the status bar that shows the remaining time until update. In the console it should also show some message when attempting to update.

And by tracker I mean the type of tracker; inotify, pyinotify or polling. In the console, after starting Trackma it should output "Tracker: Using <...>" in the console.

Could you paste the full console output?

clavinet commented 7 years ago

It's using pyinotify. I'm using the QT interface, when playing a file it says "Engine: File in cache: [filename]" but there is no timer.

oguska commented 7 years ago

Got same problem here at qt and gtk, tracker doesn't checks players ? I'm using mpv but can't see any update timer or such, manuel updating thru the list works. Engine: Time: 0.06655550003051758 Tracker (pyinotify): Initializing... Tracker (pyinotify): Enabling tracker... Tracker (pyinotify): Using pyinotify. Ready. Engine: Getting Ao no Exorcist: Kyoto Fujouou-hen 2 from library... Engine: Found. Starting player... Engine: File in cache: /nfs/sata/Downloads/Anime/[HorribleSubs] Ao no Exorcist - Kyoto Fujouou-hen - 02 [1080p].mkv

z411 commented 7 years ago

@nekoswag @oguska What do you see here? tracker

oguska commented 7 years ago

@z411 My trackma says Tracker : Listen , if there is a debug mode i can post detailed log here too. ekran goruntusu - 2017-02-16 16-58-24

clavinet commented 7 years ago

My status bar is the same as oguska's.

z411 commented 7 years ago

@nekoswag Are you also using an NFS mount?

clavinet commented 7 years ago

No, it's a local file system on the machine where this happens.

4re commented 7 years ago

This happens to me too. Everything is the same as them, but I just gave up on it and I'm using polling right now. :/

z411 commented 7 years ago

I tried on Gentoo and fresh installs of Arch and Lubuntu and it works in all of them. I'll add debugging information so we can pinpoint the problem.

oguska commented 7 years ago

I was firstly using trackma-gtk then today i started to use trackma-qt then this happened.So i cleared my .trackma folder in /home/user then started fresh instance with trackma-qt , problem is gone both with lsof and pyinotify.I clearly don't know what caused this but probably change in ui platform.

Tracker (pyinotify): Initializing...
Tracker (pyinotify): Enabling tracker...
Tracker (pyinotify): Using pyinotify.
Ready.
Engine: Getting Handa-kun 3 from library...
Engine: Found. Starting player...
Engine: File in cache: /nfs/sata/Downloads/Anime/[HorribleSubs] Handa-kun - 03 [1080p].mkv
Tracker (pyinotify): Will update Handa-kun 3 in 120 seconds
Engine: Updating show Handa-kun to episode 3...
Data: Saving queue...
Data: Saving cache...
Data: Queued update for Handa-kun
z411 commented 7 years ago

Was it fixed after you switched the UI, or after you cleared the .trackma folder?

oguska commented 7 years ago

It is fixed after the cleaning.

z411 commented 7 years ago

@oguska So it's surely something related to configuration.

@nekoswag @4re Could any of the people still with the problem post their ~/.trackma/config.json?

clavinet commented 7 years ago

{ "auto_date_change": true, "auto_status_change": true, "auto_status_change_if_scored": true, "autoretrieve": "always", "autoretrieve_days": 3, "autosend": "minutes", "autosend_at_exit": true, "autosend_hours": 5, "autosend_minutes": 60, "autosend_size": 5, "debug_disable_lock": true, "library_autoscan": true, "player": "smplayer", "plex_host": "localhost", "plex_port": "32400", "searchdir": "/media/nas/anime", "tracker_enabled": true, "tracker_interval": 10, "tracker_not_found_prompt": false, "tracker_process": "mplayer|mplayer2|mpv|smplayer", "tracker_type": "local", "tracker_update_close": false, "tracker_update_prompt": false, "tracker_update_wait_s": 120 }

z411 commented 7 years ago

I can't reproduce the issue. I added some debugging messages, please pull the latest commit and try running either the Qt or the CLI interface with the -d command line argument.

trackma -d

Then try playing a video. Then please post the full console output.

You can also enter the command tracker in the CLI interface to see the tracker status while you're playing the video, that would be helpful too.

4re commented 7 years ago

I'm getting this log from running the cli interface in debug mode.

This is a new config generated from scratch, same problem as the old one.

And I don't recall it being like this before, but now saving options with the qt5 interfaces results in a crash.

$ trackma-qt
Trackma-qt v0.7
Icon theme "elementary" not found.
Icon theme "gnome" not found.
Engine: Scanning local library...
Tracker (pyinotify): Initializing...
Tracker (pyinotify): Using pyinotify.
Ready.
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/trackma/ui/qtui.py", line 2241, in s_save
    self._save()
  File "/usr/lib64/python3.5/site-packages/trackma/ui/qtui.py", line 2183, in _save
    engine.set_config('plex_host',         self.plex_host.text())
RuntimeError: wrapped C/C++ object of type QLineEdit has been deleted
Abortado
z411 commented 7 years ago

@4re Thanks, that's very helpful. I could reproduce the problem so I submitted a fix for the process name matching, could you pull the latest commit and test if it fixes the issue on your end?

4re commented 7 years ago

Welp, sorry for the late response. It no longer complains about no player running, but it still does not update it. When I noticed it the spam just ate everything, last line repeated endlessly is [D] Tracker (pyinotify): Sending last state 1 ({'type': None, 'my_progress': 6, 'id': 33836, 'titles': ['Seiren', 'Seiren'], 'total': 12, 'title': 'Seiren'}, 7). And tracker info is stalled at: libmal: Updating show Seiren... This is the same for every show.

This was with trackma-qt, later I will give a try with cli interface.

4re commented 7 years ago

OK, this is a little bit strange, it actually updated Seiren, but it didn't update the show before it, Masamune-kun no Revenge, so now I'm a little bit lost here. I will watch some more shows tonight and report. :/

4re commented 7 years ago

It looks a little bit random, sometimes shows are updated, sometimes they aren't. This is for a show that didn't update using cli (https://paste.kde.org/plf03kd5h/msvfz1), and I assure you the player didn't stop playing it.

z411 commented 7 years ago

It's... probably picking up CLOSE events from other applications. I just noticed the mistake in my logic. I assume you're seeding them with a torrent client, or using software that's constantly reading those files? If so, that would also explain the OPEN events.

z411 commented 7 years ago

Just pushed a commit that fixes that issue. Please check if it fixes the issue for you.

4re commented 7 years ago

OK, I think I properly tested it and seems to be working right, thank you! :)

z411 commented 7 years ago

Great. I assume that was the problem others were experiencing. Marked as fixed.