tubearchivist / tubearchivist-jf-plugin

Metadata for your TubeArchivist library on Jellyfin.
GNU General Public License v3.0
116 stars 6 forks source link

[Feature request]: Send watch state to TA. #7

Closed xusiai closed 3 weeks ago

xusiai commented 5 months ago

Would it be feasible to add support for sending watched state to TubeArchivist? Since videos can be configured for automatic removal after being set to watched in TA it would be nice if this feature continued to work when the actual media consumption is done in Jellyfin.

Emporea commented 4 months ago

Will this include sync back and forth? This would include several things to consider so it doesnt mess up the watched state of either instance.

ITSecUK commented 3 months ago

I would also be keen on this as a way to more easily manage the removal of watched videos. I might just start deleting in Jellyfin after watching, then set a cron for TA to update its metadata (cant set that cron in the settings page).

I was thinking it might be possible to adapt an existing jellyfin music scrobble plugin such as: https://github.com/lyarenei/jellyfin-plugin-listenbrainz but I have not yet had time to look into this further, and dont have experience with C# but just wanted to note down the idea incase anyone else is more familiar with that!

In response to the previous comment from @Emporea, I think bidirectional sync would be much harder, I would be fine with just jellyfin to TA sync personally, that would solve my usecase.

diablo581 commented 2 months ago

I might just start deleting in Jellyfin after watching, then set a cron for TA to update its metadata (cant set that cron in the settings page).

Can you elaborate on this some please? This is kind of my use case.

ITSecUK commented 2 months ago

@diablo581 I ended up going a different way and I just use the TA interface instead, the only downside of that is I cant watch on my TV easily.

Under settings > actions there is an option "Rescan filesystem" which will clean up any deleted files, but there are two things I didnt get around to finding out:

  1. If you delete a video, I didn't confirm that its not re-added next time TA scans the channel (hopefully not)
  2. how you can best call that endpoint from cron.

You can either figure out if you can add a new task somehow similar to how the app does it here: https://github.com/tubearchivist/tubearchivist/blob/24b57406ab9700be73eaa900b3920526337ef161/tubearchivist/config/management/commands/ta_startup.py#L261

Or worst case you could just hit the API /api/task-name/rescan_filesystem/ as the webapp does: https://github.com/tubearchivist/tubearchivist/blob/24b57406ab9700be73eaa900b3920526337ef161/tubearchivist/static/script.js#L488

Good luck!!

DarkFighterLuke commented 1 month ago

@ITSecUK your use case has little to do with the main feature request, it's a particular use case not even specifically related to this plugin. Anyway, the video removal would continue to work if TA deletes watched videos somehow, because the plugin would set those videos as watched.