0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 21:13:04 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
jp9000
45015db9d8 file-updater: Fix warning parameter
The parameter was being passed as a pointer instead of being
dereferenced
2016-04-24 12:59:55 -07:00
jp9000
672d0b3716 file-updater: Only use SSL ALPN opt if curl version up to date 2016-04-23 08:17:47 -07:00
Richard Stanway
15bec2a4d2
file-updater: Add missing dstr_free calls 2016-04-22 18:16:53 +02:00
Richard Stanway
5ddc3d258e
file-updater: Fix format string 2016-04-21 02:06:23 +02:00
Richard Stanway
f7fce1c802
file-updater: Add support for HTTP 304 Not Modified using ETag, disable ALPN 2016-04-21 02:03:14 +02:00
jp9000
4a767e01ec deps/file-updater: Fix warning 2015-08-21 18:37:11 -07:00
jp9000
d3eaeda27c deps/file-updater: Add file updater util. lib
This allows plugins to update and cache data files from a remote source.

Here are the steps that occur when the API initiates an update check:

1.) It checks to see if the local files are greater than the cached
    files.  If the local version is newer (for whatever reason), it
    replaces the cached version(s) with the local version.

2.) A packages.json file is downloaded from the specified URL.  That
    packages.json file contains a version number and a list of files to
    be updated.

3.) If the downloaded package version is greater than the cached
    version, executes step 4-5 on each file.

4.) Checks the version for the file to update in packages.json, and if
    the version is greater than the cached version, proceeds to step 5,
    otherwise repeat step 4-5 for other files.

5.) Calls the callback given to the update function (if any) with the
    file information (file name, buffer, etc), and if the callback
    returns true, allows the cached file to be updated and replaced,
    otherwise goes back to step 4-6 for the rest of the files.

NOTE: Files are never modified directly.  All file saving/modification
is performed in a temporary directory, and then files are moved to their
destination.  This should eliminate any possibility of file corruption
(or at least dramatically reduce the possibility).
2015-08-19 15:48:04 -07:00