Jellyfin Forum
Movie Remote Subtitle Management - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Client Development (https://forum.jellyfin.org/f-client-development)
+---- Forum: Roku Development (https://forum.jellyfin.org/f-roku-development)
+---- Thread: Movie Remote Subtitle Management (/t-movie-remote-subtitle-management)



Movie Remote Subtitle Management - 1hitsong - 2024-02-05

Goal
Give admin users a way to search for remote subtitles, select and download the one they want, and delete ones they don't want.

Context
I'll break this update into several chunks.
  1. Core functionality for movies only <-- I am here
  2. Redesign movie detail page to improve UX
  3. Add capability for TV episodes

2/6/2024
PR opened: https://github.com/jellyfin/jellyfin-roku/pull/1694

2/5/2024
Non-admin users see the movie detail view as it is today with no changes.
   

Admin users see a new button on the movie detail view, Edit Subtitles.
   

Clicking the Edit Subtitles button takes the user to the new subtitle view. The 2 functions of this view are to search for new subtitles, and manage your current subtitles.
   

On the left side, users can choose the language they want to search for. This value defaults to their Preferred subtitle language (set in the server settings).
   

Clicking the Search button searches configured remote subtitle providers (set in the server settings) and shows the found results to the user.
   

From the search results popup, if the user presses OK, the selected subtitle is downloaded to the server. If the user presses Cancel, the popup closes and nothing is downloaded.

There isn't a good way to know when the subtitle file is downloaded, processed by the server, and provided by the API. So we simply add a blurb of text indicating we're downloading, and the user will need to refresh the view to see if it's now available. This is as simple as pressing back and clicking the Edit Subtitles button again.

The My Subtitles section shows all found subtitles, even those that and embedded in the video. Users can move the cursor over to this section and view the list of subtitles. External subtitle files can be deleted from this location. We indicate the ones that can be deleted by showing a red trashcan icon when selected. Embedded subtitles will not have this icon and are not eligible for deletion.
   

If the user presses ok while hovering over a subtitle with a trash icon, we show them a deletion confirmation. This confirmation default to No, Cancel. If No is selected, the popup closes and nothing is deleted. If Yes is selected, the subtitle is removed from the My Subtitles section, and is deleted from the file system.
   

Please post any questions, thoughts, ideas, and any other feedback.


RE: Movie Remote Subtitle Management - cewert - 2024-02-07

Where do the subtitles get downloaded from? Do users need to install a plugin or provide API credentials for this to work?

This is really cool just curious how it all works. I tried searching the jellyfin docs for remote subtitles but no luck.


RE: Movie Remote Subtitle Management - 1hitsong - 2024-02-07

(2024-02-07, 12:17 AM)cewert Wrote: Where do the subtitles get downloaded from?

I misread your comment as "Where do they get downloaded to?" The answer to that question is: Mine were downloaded to the media folder, so they are side-by-side with the media file itself.

Quote:Do users need to install a plugin or provide API credentials for this to work?

I think there are multiple providers. I used the Open Subtitles plugin. I had to create an account and put my credentials in, but the API key is optional - it'll use a shared Jellyfin API key by default.

   


RE: Movie Remote Subtitle Management - cewert - 2024-02-07

Ohh very cool. I thought this was just client side but this downloads subtitles to the server for all clients to use.

Quote:Non-admin users see the movie detail view as it is today with no changes.

Would this be true for admin users without the plugin installed as well?


RE: Movie Remote Subtitle Management - 1hitsong - 2024-02-07

(2024-02-07, 02:30 AM)cewert Wrote: Would this be true for admin users without the plugin installed as well?

No.

There exists an API endpoint to see what plugins are installed, but there isn't only 1 possible plugin we can check for. There are any number of possible plugins that act as providers.

So until a search is performed, we have no way to if it's possible for users to get results.