FC2Live sends cookies with value "deleted" to invalidate previously set values. In the same request
they send new values, too. That confused OkHttp. We now use a custom cookie jar for FC2Live, which
ignores cookies with the value "deleted"
This is necessary, because there are models, who stream on different
sites with the same name as mentioned in #141. In that case it can
happen that a recording for each site would be started within the same
minute and one recording would overwrite the other.
The heartbeat has to sent every now and again to keep the stream going.
Otherwise you will get a 403 after a few minutes when trying to access
the playlist.
Implementing #142.
This has feature has the disadvantage, that the recording is always detected as still
recording, because the finished state is assumed by the existence of the playlist file.
End the websocket download if a model changes state from online. Also
properly close both sockets and set isAlive to false, if the download is
closed or fails
Since the JavaFX integrated browser does not work reliably for recaptcha and in general does not behave like standard browsers, I now use an external browser for the logins. The dependency to javafx-web has been removed.
The external browser is based on electron, which uses chromium as internal browser. The implementation can be found at https://github.com/0xboobface/ctbrec-minimal-browser
The browser is a minimal browser, which only shows the web page content without any other controls. It is launched by ctbrec in a new process and remote controlled over a socket connection. I first tried to control it via
stdin/stdout, but it turns out, that stdin is not supported by electron on windows.
This is the first version with working downloads for SD and HD. These
dowloads only work, if you are logged in. So at the moment you have to set the
session ID in the settings to make this work. The session ID can be copied
from a valid session in a browser.
Add createDownload to Model. This method is called by the recorder to create
and then start a download. It is a method of Model so that each site and
each download can create a specialized download.
For some reason streamate playlists can go back in time. This change
makes sure, that we don't download segments multiple times as a
consequence of the time travelling ;)
When a Streamate model is added by URL, make sure, that the ID is
loaded, so that saving and loading works properly, since the ID is saved
as site specific data.
Add a setting to toggle live previews. When switched off, the thumbnails
won't show the trigger and the recording table won't show the column.
I did this, because the MediaPlayer sometimes bugs out. It then opens a
lot of connections and further tries to open a stream end in an
exception in the playlist parser.
Sometimes the PP was started before the last segments were downloaded.
This could cause unexpected effects. E.g. the playlist generator would
fail, because the number of segments chained during playlist generation.
This was used for Chaturbate, because the filename format was known.
With several camsites the filename format can differ and this is not a
good solution anymore. Instead we now just sort filename. To make sure,
the files have the right order, HlsDownload now creates a prefix for
each segment.
isOnline contained a check for playlistUrl != null, because sometimes
the playlistUrl is null even though the model is online, but it prevents
the followed tab from working correctly
Add synchronized modifier to the login methods, so that only one thread
at a time tries to login. All the following threads then should be able
to use the session cookies
Server and client now create a runnable for post-processing steps,
which run in a thread pool. This ensures, that the steps run linearly so
that RecordingStateChange events make sense, too.