Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitles won't show from any source #3431

Closed
nammminn2 opened this issue Jun 18, 2021 · 2 comments
Closed

Subtitles won't show from any source #3431

nammminn2 opened this issue Jun 18, 2021 · 2 comments

Comments

@nammminn2
Copy link

Youtube and Dailynotion are a couple that the subtitles don't show for.

low-batt added a commit to low-batt/iina that referenced this issue Sep 12, 2021
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to low-batt/iina that referenced this issue Sep 12, 2021
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
@low-batt
Copy link
Contributor

Analysis

After enhancing the logging in this area of IINA, the log shows the following failure when searching for a subtitle while watching a stream from YouTube:

16:58:21.938 [onlinesub][d] Search subtitle from opensubtitles.org...
16:58:24.893 [opensub][d] OpenSub: logged in as user 
16:58:24.895 [onlinesub][e] Failed to obtain subtitles for https://www.youtube.com/watch?v=TEWZpUhDu8g from opensubtitles.org. Cannot get file handle. Error Domain=NSCocoaErrorDomain Code=4 "The file “watch” doesn’t exist." UserInfo={NSFilePath=/watch, NSUnderlyingError=0x60000172e820 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

IINA is attempting to calculate the special hash code supported by OpenSubtitles.org that can be used to locate subtitles for a movie. The IINA implementation is based on the sample source code provided by OpenSubtitles.org: Hash Source Codes

If no subtitles are found using the hash code then IINA will search OpenSubtitles.org again, this time using the filename of the file containing the movie.

Lookup by hash code is the best way to find the appropriate subtitles, but only if all the bytes of the video file are locally available to allow the hash code to be calculated. When streaming a movie IINA needs to fall back to search by text using the title of the movie.

Fixing

I have heard that there are plans to replace the current subtitle related code with a plugin based system. I understand that these changes I'm proposing may not be needed if the new code is ready to be merged. Feel free to discard my changes if they are not needed. Do make sure the issues being fixed are not present in the plugin system.

The proposed fix changes OpenSubSubtitle.hash to throw noResult if the movie is being streamed. This causes OnlineSubtitle.getSubtitle to fall back to using a text lookup. The commit also changes the method OpenSubSubtitle.requestIMDB to use the media title as the text for the lookup if the movie is being streamed. The method MainMenuActions.saveDownloadedSub had to be changed as well as the when the "Save Downloaded Subtitle" menu item is selected IINA copies the downloaded subtitles file to the same directory as the movie file, which won't work for streams. This method has been changed to copy the downloaded subtitles file to the user's ~/Movies directory when streaming movies.

With these changes I was able to download subtitles for movies streamed from YouTube and from Dailymotion, see them on the screen and save the downloaded subtitles file. These fixes only work if OpenSubtitles.org is used.

Logging has been enhanced to provide more details regarding failures. The underlying errors reported by lower level code are now propagated up the stack to allow OnlineSubtitle.getSubtitle to log more details about the failure. Not being able to connect to the subtitle server is specifically logged since that appears to be a common issue with OpenSubtitles.org. May want to consider updating the OSD to display "Cannot connect" for that case instead of the generic "Network error".

While doing this work several other subtitle related problems were noticed. I did not create separate issues for them as I was worried about generating merge conflicts if these changes were put in separate issues and fixes. Let me know if separate commits are preferred.

The method OnlineSubtitle.getSubtitle fails to display the OSD in certain cases when obtaining subtitles from shooter.cn. The commit moves the code to do this out of the default code block and after the switch statement which sets the OSD message to display.

Both OpenSubSubtitle.hash and ShooterSubtitle.hash fail to close a FileHandle in some cases. This same issue is seen in the sample source code provided by OpenSubtitles.org. The commit changes both these methods to use the defer keyword to guarantee the file is closed.

sjedruszkiewicz added a commit to sjedruszkiewicz/iina that referenced this issue Sep 25, 2021
Fix subtitles won't show, any source, iina#3431
CarterLi pushed a commit to CarterLi/iina that referenced this issue Nov 16, 2021
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Nov 16, 2021
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to low-batt/iina that referenced this issue Dec 13, 2021
These changes address review comments for the fix to issue iina#3431.

This commit will:

- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Remove reference to PlayerCore in low level subtitle methods
- Change subtitle classes to use an extension when defining the logger
  subsystem
CarterLi pushed a commit to CarterLi/iina that referenced this issue Dec 14, 2021
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Jan 19, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Jan 21, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 18, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 21, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Feb 28, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Apr 23, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to CarterLi/iina that referenced this issue Apr 23, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to CarterLi/iina that referenced this issue Apr 24, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to CarterLi/iina that referenced this issue Apr 27, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Apr 28, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to CarterLi/iina that referenced this issue May 1, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue May 5, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue May 9, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue May 17, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to CarterLi/iina that referenced this issue May 28, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
lhc70000 pushed a commit that referenced this issue May 29, 2022
* Fix subtitles won't show, any source, #3431

This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

* Switched to use of save panel for saving subtitle

These changes address review comments for the fix to issue #3431.

This commit will:

- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Remove reference to PlayerCore in low level subtitle methods
- Change subtitle classes to use an extension when defining the logger
  subsystem
@low-batt
Copy link
Contributor

Closing. Fixed in IINA 1.3.0.

CarterLi pushed a commit to CarterLi/iina that referenced this issue Jun 8, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
CarterLi pushed a commit to CarterLi/iina that referenced this issue Jun 13, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change MainMenuActions.saveDownloadedSub to copy downloaded subtitles
    from streamed files to "~/Movies"
- Change OnlineSubtitle.getSubtitle to correct a failure to display the
    OSD when using shooter.cn
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.
low-batt added a commit to low-batt/iina that referenced this issue Sep 18, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in Assrt methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR iina#3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
low-batt added a commit to low-batt/iina that referenced this issue Sep 24, 2022
Corrected problems detected in review.

This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in Assrt methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR iina#3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
low-batt added a commit to low-batt/iina that referenced this issue Oct 7, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in Assrt methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR iina#3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
low-batt added a commit to low-batt/iina that referenced this issue Oct 7, 2022
Corrected problems detected in review.

This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in Assrt methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR iina#3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
low-batt added a commit that referenced this issue Oct 8, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in AssrtSubtitle methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR #3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
lhc70000 pushed a commit that referenced this issue Oct 11, 2022
This commit will:

- Change OpenSubSubtitle.hash to throw noResult if the video is being
    streamed
- Change OpenSubSubtitle.requestIMDB to use the media title as the text
    for the lookup if the video is being streamed
- Change OpenSubSubtitle.hash and ShooterSubtitle.hash to ensure file
    is closed
- Improve logging when obtaining subtitles
- Change MainMenuActions.saveDownloadedSub to bring up a Save panel
  to ask the user where to save the downloaded subtitle file
- Change the "Save Downloaded Subtitle" menu item to end with an
  ellipsis to indicate the user will be prompted for additional
  information
- Change Utility.quickSavePanel to accept an optional filename
  parameter
- Add "Cannot connect" OSD message
- Add "Timed out" OSD message
- Change subtitle classes to use an extension when defining the logger
  subsystem
- Add parameter labels to trailing closures in AssrtSubtitle methods

With these changes subtitles can be downloaded and viewed for movies
streamed from YouTube and from Dailymotion when using OpenSubtitles.org.

This is a reimplementation of the fix in PR #3499 that was applied only
to the 1.3.0 branch to avoid merge conflicts with the plugin system.
The fix has been adapted to be compatible with the changes made to the
subtitle modules to support the plugin system.

The reimplementation also adds two new OSD messages for common failures
when connecting to opensubtitles.org and improves some of the logging.

This commit also eliminates Swift compiler build warnings due to
backward matching of unlabeled trailing closure being deprecated.
These warnings had been eliminated but were reintroduced during the
large merge of the plugin system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants