Penguin-Subtitle-Player icon indicating copy to clipboard operation
Penguin-Subtitle-Player copied to clipboard

feature requests

Open gijsbers opened this issue 4 years ago • 8 comments

Thanks for such a very useful program!

  • Could it accept the .srt file from the command line? Like PenguinSubtitlePlayer title.srt.
  • Sometimes .srt files have <i> and </i> tags. Could these be used for italic font?
  • At end of movie the last sentence is displayed forever. Could this be cleared after 10 seconds or so?
  • It uses override redirect. When user goes to a different workspace then PenguinSubtitlePlayer is still displayed. It should only show on one and the same workspace.
  • Could it be minimizable with Alt+F9?
  • Could it be closable by window manager with Alt+F4?

Thank you!

gijsbers avatar Apr 14 '20 16:04 gijsbers

Thanks for the feature requests. Lots of them sound good.

* Could it accept the .srt file from the command line?
  Like `PenguinSubtitlePlayer title.srt`.

Good idea. And I suppose it is not hard to implement.

* Sometimes .srt files have `<i>` and `</i>` tags.
  Could these be used for italic font?

As far as I remember, yes. You may give it a try. Please let me know if they don't work.

* At end of movie the last sentence is displayed forever.
  Could this be cleared after 10 seconds or so?

The last line is displayed forever is because the timeline stopped moving. It is technically possible but we have to think about how to implement it.

* It uses override redirect. When user goes to a different
  workspace then PenguinSubtitlePlayer is still displayed.
  It should only show on one and the same workspace.

What OS are you using? In the experiments years ago, I found that the current setup was a good way to keep the "window" in front of any other programs (e.g. web browser). If you know how to maintain that while achieving what you want, please let me know.

* Could it be minimizable with Alt+F9?
* Could it be closable by window manager with Alt+F4?

If the program is in focus, I suppose it is possible. If the focus is on another window, e.g. web browser, and you want to use the hotkey, I suppose it is hard because this will require a cross-platform global key hook.

I have a feeling that Alt+F4 may work in Windows out of the box, but I'm not certain about this.

carsonip avatar Apr 15 '20 05:04 carsonip

Yes, <i> and </i> tags don't work. They show literally. No italic.

I use Linux + X11 + icewm. Applications with override redirect cause problems with window manager functionality. Applications are expected to conform to EWMH specifications. You could maybe move application to _NET_WM_STATE_ABOVE layer, which is above normal applications. _NET_CURRENT_DESKTOP gives the current workspace.

If you omit override redirect then window manager can do minimization, workspace and close.

gijsbers avatar Apr 15 '20 22:04 gijsbers

<i></i> works well on my end. e.g.

1
00:00:01,768 --> 00:00:44,497
I give <b><i>you the product</i></b>
that will carry Hooli

image

What version of Penguin Subtitle Player are you using? The latest is v1.2.1.

carsonip avatar Apr 20 '20 07:04 carsonip

PenguinSubtitlePlayer --version gives no output!? Oh there is some About hidden in the Settings: 1.2.1. Still no italics... Did you try on Linux?

gijsbers avatar Apr 21 '20 21:04 gijsbers

PenguinSubtitlePlayer --version gives no output!?

Thanks for the suggestion. I have added a proper command line parser for this purpose.

Still no italics... Did you try on Linux?

Yes I use Linux to capture the screenshot above.

Actually the HTML handling is done by Qt internally. I didn't do anything about it. The supported HTML tags are listed here: https://doc-snapshots.qt.io/qt5-5.9/richtext-html-subset.html

carsonip avatar Apr 22 '20 12:04 carsonip

* Could it accept the .srt file from the command line?
  Like `PenguinSubtitlePlayer title.srt`.

Done. With a proper command line parser.

* At end of movie the last sentence is displayed forever.
  Could this be cleared after 10 seconds or so?

Done. The progress will reset to 0:00 after the last line. This is the most common way among video / audio players.

The changes are available in the develop branch. Will publish a new release soon.

carsonip avatar Apr 22 '20 12:04 carsonip

v1.3.0 is released. Thanks for your feature requests!

carsonip avatar Apr 23 '20 12:04 carsonip

Wish for options:

  • -p, --paused : start paused
  • -a, --at TIME : start at position TIME

Accept multiple *.srt files on the command line and have a key or button to go to next or previous file, while preserving the current time offset. That way I can compare or evaluate different files easily.

gijsbers avatar Apr 28 '20 19:04 gijsbers