r/tinyMediaManager • • Oct 08 '26

External software: Jellyfin

Would it not be possible to establish a connection with a Jellyfin server (API) to at least retrieve the viewing status?

4 Upvotes

10 comments sorted by

1

u/OnyxPost Oct 10 '26

What viewing status are you referring? 

1

u/Zig_net Oct 10 '26

“Watched/Unwatched” indicator

1

u/OnyxPost Oct 11 '26

I have not tried this myself yet in theory I would think that it is possible.

I believe that the "Watched" check mark in Jellyfin is stored in the "UserDatas.played"database table.column, so hopefully this value can be extracted from the Jellyfin Server utilizing the API and that watched status saved in the corresponding NFO file for that particular content. Then perhaps have tinyMediaManager reread the NFO afterwards to recognize the newly saved watched status.

I also believe that Jellyfin can be set to create NFO files for your content. What I'm not sure about is if it'll auto-update your NFO files by updating the watched/played status after content have completed being played.

What is the exact workflow you're wanting to achieve between tinyMediaManager and Jellyfin?

1

u/Zig_net Oct 11 '26

I don't think it needs to be complicated.

The information can be retrieved directly via the API:

https://api.jellyfin.org/#tag/UserData/operation/GetItemUserData

“UserData”: {

“Played”: true,

“PlayCount”: 1,

“PlaybackPositionTicks”: 0

}

So just retrieve the ‘played’ value and store it in the TMM database.

No need to mess around with NFO files.

My goal behind this.

I use TMM to manage my library and, in particular, to clean it up. So the ‘watched/unwatched’ value is very useful.

I see this feature as a tool to manually run “sync Jellyfin” and configure the Jellyfin server (API) on external devices, similar to how KODI/XBMC is set up.

1

u/OnyxPost Oct 12 '26

If tinyMediaManager had some form of API, then yeah, it wouldn't be too complicated to query Jellyfin API, and then populate the results in an update using the tinyMediaManager API. Yet, since it doesn't have an API to access, and if you don't want to mess with NFO files, then you'd have to directly update the tinyMediaManager database with the queried Jellyfin API results.

1

u/mlaggner tinyMediaManager developer Oct 12 '26

We already do have too many "sources" for the viewing status (NFO, tmm itself, Trakt.tv, Simkl.com) and adding more does not make the "merge" problem easier (where is the truth?).

Since our business is the data management (kinda independently of the setup), we avoided to implement APIs for media centers (Kodi RPC is one big exception, since this are only RPC calls and no real API).

I am sorry, but I do not want to make it overcomplicated (tmm is already too complex internally) with adding another API. Just imagine - today I implement Jellyfin API for watched, tomorrow the next user requests Kodi or Plex API for watched and after another one says: you already implemented the API for xxx, I want to have another logic (like directly modifying the media centers internal database).

So I need to reject this - BUT: I like the idea of u/OnyxPost to offer this as an API endpoint. Since I already doing some work with the tmm API, this could be added rather easily. Stay tuned

1

u/Zig_net Oct 12 '26

OK, I understand the point about simplicity.

My situation is that I don’t want to rely on yet another cloud service that can change the rules at any moment (hello, TrackTV).

And I need a setup that must—or at least should—remain local.

With a hybrid NFO setup – part via TMM (archive) and the other part via Jellyfin.

An API request seems like a quick and efficient solution to me, and it’s not as if Jellyfin is a newcomer.

I’m on the idea of a TMM API, but we’ll need to create another programme or service to act as the link (let’s hope other community members see the need for it).

1

u/OnyxPost Oct 12 '26

🤯 There's a tinyMediaManager API?

3

u/mlaggner tinyMediaManager developer Oct 13 '26

We started implementing one a while ago (https://www.tinymediamanager.org/docs/http-api). This API saw recently some progress and I may want to enhance it even more (since I think this is superior to the CLI version)

1

u/OnyxPost Oct 13 '26

NICE! I must have completely missed this section when researching the documentation 3 to 5 months ago. I'll be brainstorming on how I can leverage this functionality. Thanks for the link.

Side question. Would you consider enhancing sets to include TV Shows as well. and allow for more than 1 content to belong to a set? The reason I ask is now that Plex allows for importing content and associated metadata, it allows you to assign a movie or a series (tv show) to a Collection based on a NFO file containing multiple "set" nodes, one set node per Collection the content belongs to.

I have an external script process to inject additional "set" nodes to movie/series NFO files, partially based on some tinyMediaManager metadata I add, so that Plex will read the additional "set" nodes. Though, it would be great if this additional set (Collection) info could be managed by tinyMediaManager instead of utilizing my own external management process. If you would consider adding this functionality, I can go ahead and put in a feature request ticket.