Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
- [TheBosZ](https://github.com/thebosz)
- [qm3jp](https://github.com/qm3jp)
- [johnnyg](https://github.com/johnnyg)
- [Zn00t](https://github.com/Zn00t)

## Emby Contributors

Expand Down
18 changes: 17 additions & 1 deletion src/components/subtitleeditor/subtitleeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,24 @@ function searchForSubtitles(context, language) {
const apiClient = ServerConnections.getApiClient(currentItem.ServerId);
const url = apiClient.getUrl('Items/' + currentItem.Id + '/RemoteSearch/Subtitles/' + language);

apiClient.getJSON(url).then(function (results) {
apiClient.ajax({
url: url,
type: 'GET',
dataType: 'json',
timeout: 300000 // 5 minutes in milliseconds
}).then(function (results) {
renderSearchResults(context, results);
}).catch(function (error) {
loading.hide();

if (error.name === 'AbortError' || error.statusText.toLowerCase().includes('timeout')) {
toast(globalize.translate('SubtitleSearchTimeout'));
} else {
toast(globalize.translate('SubtitleSearchError'));
}

context.querySelector('.subtitleResults').innerHTML = '';
context.querySelector('.noSearchResults').classList.remove('hide');
});
}

Expand Down
4 changes: 3 additions & 1 deletion src/strings/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1866,5 +1866,7 @@
"ExtractTrickplayImagesHelp": "Trickplay images are similar to chapter images, except they span the entire length of the content and are used to show a preview when scrubbing through videos.",
"LabelExtractTrickplayDuringLibraryScan": "Extract trickplay images during the library scan",
"LabelExtractTrickplayDuringLibraryScanHelp": "Generate trickplay images when videos are imported during the library scan. Otherwise, they will be extracted during the trickplay images scheduled task. If generation is set to non-blocking this will not affect the time a library scan takes to complete.",
"LogLoadFailure": "Failed to load the log file. It may still be actively written to."
"LogLoadFailure": "Failed to load the log file. It may still be actively written to.",
"SubtitleSearchTimeout": "Subtitle search timed out. The provider may be slow - please try again.",
"SubtitleSearchError": "An error occurred while searching for subtitles."
}
4 changes: 3 additions & 1 deletion src/strings/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,7 @@
"Channels": "Channels",
"CinemaModeConfigurationHelp": "Cinema mode brings the theater experience straight to your living room with the ability to play trailers and custom intros before the main feature.",
"SelectAudioNormalizationHelp": "Track gain: adjusts the volume of each track so they playback with the same loudness. \nAlbum gain: adjusts the volume of all the tracks in an album only, keeping the album's dynamic range. Switching between \"Off\" and other options requires restarting the current playback.",
"ClearQueue": "Clear queue"
"ClearQueue": "Clear queue",
"SubtitleSearchTimeout": "Subtitle search timed out. The provider may be slow - please try again.",
"SubtitleSearchError": "An error occurred while searching for subtitles."
}
Loading