171 Commits

Author SHA1 Message Date
Rafał Dzięgiel
28c1daf709 Save and offer resume only for local files
We do not know if the online URI still leads to the same file as before (or if different one leads to previous). Additionally we would also need to check if media is seekable. Disable for now to avoid problems.
2021-04-12 22:29:20 +02:00
Rafał Dzięgiel
aa49d25df5 Stop pipeline before replacing playlist 2021-04-12 19:28:12 +02:00
Rafał Dzięgiel
774687710f Add setting to enable YouTube adaptive streaming
For now hidden because other related YouTube settings like min/max resolution, codecs etc. are not done yet
2021-04-12 18:45:36 +02:00
Rafał Dzięgiel
901fc8d760 YT: try harder to find suitable DASH streams
Instead of searching for 1080p only, accept also other H.264 formats for DASH streaming
2021-04-12 17:41:42 +02:00
Rafał Dzięgiel
24bb9f298b Avoid situations with no menu in headerbar
Some shells might want to show menu button outside of the app. We do not support that.
2021-04-12 17:30:00 +02:00
Rafostar
2efa3e0bf6 YT: fix non-working best combined URIs
Fix an undefined variable introduced during recent code cleanup
2021-04-11 16:34:02 +02:00
Rafostar
92e3f7d93c YT: move info ready debug message before signal emit
Otherwise it will appear in wrong order in debug output and be misleading
2021-04-11 15:44:08 +02:00
Rafostar
85804ea297 Move YT related functions from player to youtube script 2021-04-11 15:35:41 +02:00
Rafostar
7cf86e92eb YT: resolve redirects on the Clapper side
Instead of providing URIs directly to GStreamer, follow redirects and provide that final URI. With this change souphttpsrc will not have to go through redirects from the beginning for each video segment.
2021-04-11 14:46:08 +02:00
Rafostar
b5711b145b Set Soup import version to 2.4
With Soup 3.0 release, there is a possibility of having both on the host. Set used version to 2.4 to avoid warnings and compatibility errors for now.
2021-04-10 21:41:28 +02:00
Rafał Dzięgiel
8d7fb761f7 Always reset auto fullscreen boolean value
Otherwise we would keep checking the settings with each playlist file and accidentally entered fullscreen when that setting value was changed in middle of playback.
2021-04-09 19:58:33 +02:00
Rafał Dzięgiel
aec2166c11 Only auto fullscreen with new playlist
This fixes a bug when player would enter fullscreen when changing playlist item
2021-04-09 19:34:17 +02:00
Rafał Dzięgiel
c21b214477 Tweak how auto fullscreen option works
When auto fullscreen is enabled, enter fullscreen on each media load
unless player is in floating mode in which probably user wants it to remain.
2021-04-09 19:11:34 +02:00
Rafał Dzięgiel
d9939a94c2 Fix some error messages not being displayed 2021-04-09 18:49:44 +02:00
Rafał Dzięgiel
dafa2cfdf5 Fix missing file extension in online URIs 2021-04-09 18:16:02 +02:00
Rafał Dzięgiel
ebe72f20b5 Hide end time together with title when stopped 2021-04-09 17:54:48 +02:00
Rafał Dzięgiel
fa1455556b Treat media without duration as live content 2021-04-09 16:07:11 +02:00
Rafał Dzięgiel
8fb6b971fe Always try to update end time after new media info 2021-04-09 13:53:43 +02:00
Rafał Dzięgiel
1bf46a2f12 Fix top time not showing up on fullscreen startup 2021-04-09 11:37:19 +02:00
Rafał Dzięgiel
a39c67e5e7 Check if local subtitle file exists before loading it
Otherwise GStreamer will error out and playback will stop. Non-existing subtitle file is common on Flatpak when user tries to open/drop a file from a folder that container does not have access to.
2021-04-09 10:55:06 +02:00
Rafał Dzięgiel
c767b3e4b2 Separate debug messages for YouTube 2021-04-08 12:09:42 +02:00
Rafał Dzięgiel
ec6157763b YT: do not try to get info again for current download 2021-04-08 11:05:20 +02:00
Rafał Dzięgiel
cca3077936 Fix startup window size on XOrg
The window size was restored too early which caused the window to be a little bigger then it should on each launch. Restore window size after that window was mapped.
2021-04-07 20:07:05 +02:00
Rafał Dzięgiel
b15b94fc90 Convenient ways of opening external subtitles
Play video with external subtiles by:
* selecting and opening both video+subs from file chooser/manager
* dropping subtitles file on player window
* opening subtiles from file chooser/manager while video plays
* send their file path/uri to player via WebSocket message
2021-04-07 16:33:21 +02:00
Rafał Dzięgiel
30a7229b33 API: add media info updated signal
Emit media info updated signal only when media info is initially created and when number/format of tracks changes later. This is needed for GUI to detect resolution change (adaptive streaming) or when user adds external subtitles to current video.
2021-04-06 18:49:08 +02:00
Rafał Dzięgiel
9502e062f4 Support "Default" theme
Adwaita was renamed to Default in latest GTK4 code.
We need to detect it and treat it the same way as we did for Adwaita.

More info in related GTK4 MR:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3079
2021-04-02 11:43:36 +02:00
Rafał Dzięgiel
6a9c77dfad Fix file paths in debug messages 2021-04-01 22:31:54 +02:00
Rafał Dzięgiel
133cda1b41 Fix forgotten ByteArray import during moving code 2021-04-01 22:31:22 +02:00
Rafał Dzięgiel
e68a7fe31a Work around GioFile promisify bug caused by GLib 2.68 2021-04-01 22:05:43 +02:00
Rafał Dzięgiel
7f69bee11c Move all file operations code to single file 2021-04-01 21:58:50 +02:00
Rafał Dzięgiel
295af9fd24 Improve debug messages for file operations 2021-04-01 20:20:42 +02:00
Rafał Dzięgiel
96e5c5aa7c Restore 5px button margins for TV mode
They were reduced too much recently, causing chapter marks to not fit properly onto the controls bar
2021-03-31 09:04:29 +02:00
Rafał Dzięgiel
66ce006f00 Move buttons margins to CSS and tweak them a little 2021-03-30 22:15:12 +02:00
Rafał Dzięgiel
a6316c940c YT: always use up to date timestamp 2021-03-26 11:52:32 +01:00
Rafał Dzięgiel
84d9cc7416 Add DBus init debug message 2021-03-26 11:42:41 +01:00
Rafał Dzięgiel
a3499e9b47 Remove unused variable 2021-03-24 21:20:15 +01:00
Rafał Dzięgiel
4a60e01131 Auto set brighter sliders on Adwaita dark only 2021-03-24 21:16:41 +01:00
Rafał Dzięgiel
b404eb2f56 Increase play/pause icon size only on Adwaita theme
Adwaita theme has unusually small media constrols icons, but other popular themes do not. Instead increasing those icons on every theme do it only for Adwaita where problem occurs.
2021-03-24 20:36:08 +01:00
Rafał Dzięgiel
254aa538a5 YT: fix expire calc for long movies
Do not multiply video length when calculating expiration date. Otherwise for very long movies we might end up with with a past date.
2021-03-24 20:02:19 +01:00
Rafał Dzięgiel
58cc45ec7d Support accels for menu items
Add support for keyboard shortcuts for menu items. Additionally enable a common Ctrl+O for opening new file(s) and Ctrl+U for opening an URI.

Closes #45
2021-03-24 14:07:20 +01:00
Rafał Dzięgiel
2e97fc362c Dash: add segment ranges only to streams that have them 2021-03-19 15:19:00 +01:00
Rafał Dzięgiel
d762a59cc4 YT: do not keep URI in temp data twice 2021-03-19 14:27:55 +01:00
Rafał Dzięgiel
b42843be1f YT: do not check playability of saved temp data
Saved video info is always playable, otherwise its not saved in first place.
2021-03-19 11:43:37 +01:00
Rafał Dzięgiel
6dc825dfb3 YT: reduce amount of temp data stored per video 2021-03-19 11:25:36 +01:00
Rafał Dzięgiel
e89b3599c9 Remove "escape" key handler
It was conflicting with GTK build-in escape key functionality for closing popovers
2021-03-19 10:29:44 +01:00
Rafał Dzięgiel
79e12a6e36 YT: support obtaining info from player API 2021-03-19 10:26:46 +01:00
Rafał Dzięgiel
36d4a5c848 YT: replace some URL chars with slashes instead encoding it
Avoid dashdemux string query omission bug by using URL path with slashes instead of query string
2021-03-18 09:40:46 +01:00
Rafał Dzięgiel
38e5bae199 Replace lookbehind regexp
This was only supported in latest GJS version
2021-03-18 09:28:00 +01:00
Rafał Dzięgiel
fcff4b4450 Store all temp files in app named temp subdirectory 2021-03-17 11:57:02 +01:00
Rafał Dzięgiel
4021745a56 YT: set the same user agent as in player client 2021-03-17 10:47:38 +01:00