846 Commits

Author SHA1 Message Date
James Taylor
85cf943850
av-merge: Fix handling of QuotaExceededError
Many things fixed:
- Delete from end of video in addition to from beginning. Firefox
automatically deletes from the beginning already.
- Increment i in the while loop (oops)
- Calling .remove takes time for the sourceBuffer to perform, and
it will be in the updating=true state. Continuing to delete more
would give an error. Waits until the updateend event is fired
before deleting more segments.
- Retry appendBuffer if the quota was exceeded during a seek append

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-31 11:37:36 -05:00
4a45a699ae
fix "Security Error: Content, may not load data from blob" 2021-08-30 00:24:41 -05:00
7264bbeaed
licenses.html: update 2021-08-29 23:34:18 -05:00
James Taylor
a7527986c8
Fix embed page broken due to changes to jinja variables
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 23:24:32 -05:00
James Taylor
00c812ff4a
av-merge: Fix numDeleted not incremented during segment deletion
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 23:19:03 -05:00
James Taylor
2ae81f2a78
Add setting to prefer uni or pair sources and fix selection b/w them
pair_quality != uni_quality was the wrong condition to check,
since there are cases where the target_resolution is 360, and
there are no pair sources at 360, but there are some at other
resolutions, which would falsely select the pair sources.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 23:17:32 -05:00
James Taylor
99cb1c48ea
av-merge: Fix malformed mp4 fragments wrongly considered deleted
See comment within. They would be constantly rerequested and
av-merge would think it didn't have them, so it wouldn't
request subsequent segments

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:58:36 -05:00
James Taylor
c1dbc6c411
av-merge: print sourceBuffer.buffered in printDebuggingInfo
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:57:03 -05:00
James Taylor
92bdbf072e
av-merge: Fix error when switching qualities after endOfStream
After the video has been buffered to the end and
mediaSource.endOfStream() has been called, the close function
would perform some closing operations on the sourceBuffers
that gave InvalidStateError

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:55:41 -05:00
James Taylor
77fffee34f
av-merge: Add function to dump debugging info
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:54:27 -05:00
James Taylor
aacbf07ad7
av-merge: Use tickEnd+1 when calculating segment time ranges
tickEnd is inclusive, so two segments might have the following
ticks:

-- Segment 0 --
tickStart: 0
tickEnd: 44099

-- Segment 1 --
tickStart: 44100
tickEnd: 88199

When doing calculations in seconds about segment extent, there
were gaps between segment 0's end and segment 1's beginning. This
sometimes resulted in errors of not finding the corresponding
segment index inside these gaps.

Using (tickEnd+1)/this.sidx.timeScale is the correct method.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:50:10 -05:00
James Taylor
9d3ebca622
av-merge: End stream correctly when last segments do not overlap
In this video at 480p:
https://www.youtube.com/watch?v=6bnanI9jXps
There is an extremely tiny audio segment from
30.00018140589569 to 30.06981859410431
after the last video segment ends at 29.99998888888889. Call
end of stream when we have all segments until the end, instead
of calling it when we are playing the last segment.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:48:46 -05:00
James Taylor
ef867e3759
watch: Fix using_pair_sources being a list due to short-circuiting
In the case where pair_sources is empty due to a playability
error, using_pair_sources will be assigned to pair_sources
(empty list) because of short circuiting. Make it a bool

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 22:47:22 -05:00
309ff40943
watch.html: Move loose inline javascript into watch.js
The number of inline code blocks and the dependencies between them
became unmanageable.

From 9d96c07a3c2e68f1893634574c3be64e41a2c041 Mon Sep 17 00:00:00 2001
From: James Taylor <user234683@users.noreply.github.com>
2021-08-29 22:43:10 -05:00
James Taylor
56b17c634c
av-merge: Use console.warn and console.error
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:57:55 -05:00
James Taylor
dd01c8ca4c
av-merge: change QuotaExceeded messages to warnings
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:57:02 -05:00
James Taylor
81e61f9893
av-merge: buffer same duration of audio and video
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:56:00 -05:00
James Taylor
ae68c84a26
av-merge: Make segment fetching message more useful
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:54:32 -05:00
James Taylor
1c591b4457
av-merge: call mediaSource.endOfStream() so player pauses at end
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:53:21 -05:00
James Taylor
6e39ae19b6
Prevent Firefox from remembering quality select on page refresh
The video quality is only changed when the quality selector
changes. If it was changed and the user refreshes, Firefox
remembers the selected value, but since no change event is fired,
the select will display the wrong quality.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:51:41 -05:00
James Taylor
9f44e0474b
Integrate quality selection into Plyr
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:47:14 -05:00
ee581c56a3
fix missing data variable 2021-08-29 21:44:08 -05:00
James Taylor
5ff216d1ba
avmerge: Fix errors if close is called twice
This can happen if the quality is changed from an avmerge source
to an integrated source, and then changed back to an avmerge source

Close is called the first change, but on the last change, it's
called again because the avMerge object is still present, resulting
in InvalidStateError

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:03:36 -05:00
James Taylor
70eb5cc94f
avmerge: Remove obsolete shouldFetchNextSegment function
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:01:54 -05:00
James Taylor
fa3b78583f
avmerge: Close streams to avoid errors while changing quality
If a fetchRange network request finished after the quality was
changed, there would be a "InvalidStateError: An attempt was made
to use an object that is not, or is no longer, usable" because
appendSegment was trying to append to the sourceBuffer that was
unusable after the video src was changed to a new mediaSource.

Adds a close method to the AVMerge class to properly clean and
close everything so these sorts of errors won't happen.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 21:00:30 -05:00
James Taylor
d942883c78
avmerge: Buffer 50 mb ahead in video
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 20:54:06 -05:00
James Taylor
a7da23c6da
Add video quality selector
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 20:52:57 -05:00
James Taylor
c9a75042d2
Add support for more qualities, merging video+audio using MSE
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 18:48:56 -05:00
e4af99fd17
Revert "Add support for more qualities, merging video+audio using MSE"
This reverts commit d56df02e7b1eba86baf511289208295b1f6c5a50.
2021-08-29 18:48:01 -05:00
James Taylor
d56df02e7b
Add support for more qualities, merging video+audio using MSE
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-29 18:44:26 -05:00
0c106bb111
[frontend]: fix current version 2021-08-27 12:54:31 -05:00
59f32b31d9
[frontend]: improve current version 2021-08-27 12:06:41 -05:00
James Taylor
e76257f8b7
Fix comment reply url extraction due to youtube changes
Signed-off-by: Jesús <heckyel@hyperbola.info>
0.1.0
2021-08-23 18:42:16 -05:00
James Taylor
4e556efa3d
Fix comments extraction due to new response continuation key name
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-23 18:40:52 -05:00
740aea68f6
[pip]: fix dataclasses version 2021-08-14 23:19:50 -05:00
ee2ef432d8
[pip]: bump packages 2021-08-14 23:13:43 -05:00
06315e3e02
[opensearch]: improve 2021-08-14 18:36:17 -05:00
ef66da4d27
[embed]: minor fix 2021-08-14 16:47:49 -05:00
ccaf2b9f9f
[embed]: fix sha512sum 2021-08-14 16:45:52 -05:00
db1b23fea4
[librejs]: add mising plyr-start.js 2021-08-14 14:34:17 -05:00
5a09d53053
[Frontend]: fix macro 2021-08-14 13:50:40 -05:00
97ca52e77a
[get_app_version]: check git command 2021-08-11 11:14:54 -05:00
16f81de968
[comments]: pep8 2021-08-10 18:14:05 -05:00
0e896cbf34
[comments_info]: relax traceback message 2021-08-10 17:28:45 -05:00
f532386976
[plyr]: minor fix syntax 2021-08-09 22:11:50 -05:00
af1df31161
[plyr]: update 2021-08-09 22:09:04 -05:00
0e9c12b3a6
[plyr]: Remove unimportant files 2021-08-09 21:59:43 -05:00
James Taylor
40fcee52c0
Fix description extraction in search results
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-09 12:29:01 -05:00
James Taylor
6c6c469fbd
Prefix youtube URLs in video descriptions and channel about page
Closes #75

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-09 12:27:49 -05:00
James Taylor
2039972ab3
Fix (dis)like, music list extraction due to YouTube changes (again)
YouTube reverted the changes they made that prompted f9f5d5ba.

In case they change their minds again, this adds support for both
formats.

The liberal_update and conservative_update functions needed to be
modified to handle the cases of empty lists, so that
a successfully extracted 'music_list': [{'Author':...},...] will
not be overwritten by 'music_list': [] in the calls to
liberal_dict_update.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-08-09 12:13:52 -05:00