Merge pull request #614 from jb-alvarado/master
catch remote playlist error and get empty playlist
This commit is contained in:
commit
a55408543e
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,5 +25,4 @@ ffpapi.1.gz
|
|||||||
/dist/
|
/dist/
|
||||||
/public/
|
/public/
|
||||||
tmp/
|
tmp/
|
||||||
.vscode/
|
|
||||||
assets/playlist_template.json
|
assets/playlist_template.json
|
||||||
|
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"rust-lang.rust-analyzer",
|
||||||
|
"statiolake.vscode-rustfmt",
|
||||||
|
"tamasfe.even-better-toml",
|
||||||
|
]
|
||||||
|
}
|
20
.vscode/settings.json
vendored
Normal file
20
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"rust-analyzer.cargo.target": null,
|
||||||
|
"rust-analyzer.checkOnSave": true,
|
||||||
|
"rust-analyzer.cargo.buildScripts.overrideCommand": null,
|
||||||
|
"rust-analyzer.rustfmt.overrideCommand": null,
|
||||||
|
"rust-analyzer.inlayHints.chainingHints.enable": false,
|
||||||
|
"rust-analyzer.inlayHints.parameterHints.enable": false,
|
||||||
|
"rust-analyzer.inlayHints.typeHints.enable": false,
|
||||||
|
"rust-analyzer.diagnostics.disabled": ["unresolved-proc-macro"],
|
||||||
|
"[dockercompose]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
},
|
||||||
|
"[rust]": {
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.defaultFormatter": "statiolake.vscode-rustfmt"
|
||||||
|
},
|
||||||
|
"[yaml]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
}
|
||||||
|
}
|
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1217,7 +1217,7 @@ checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout"
|
name = "ffplayout"
|
||||||
version = "0.21.2"
|
version = "0.21.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"clap",
|
"clap",
|
||||||
@ -1239,7 +1239,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout-api"
|
name = "ffplayout-api"
|
||||||
version = "0.21.2"
|
version = "0.21.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-multipart",
|
"actix-multipart",
|
||||||
@ -1278,7 +1278,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ffplayout-lib"
|
name = "ffplayout-lib"
|
||||||
version = "0.21.2"
|
version = "0.21.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
@ -3458,7 +3458,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tests"
|
name = "tests"
|
||||||
version = "0.21.2"
|
version = "0.21.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
|
@ -4,7 +4,7 @@ default-members = ["ffplayout-api", "ffplayout-engine", "tests"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.21.2"
|
version = "0.21.3"
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
repository = "https://github.com/ffplayout/ffplayout"
|
repository = "https://github.com/ffplayout/ffplayout"
|
||||||
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
authors = ["Jonathan Baecker <jonbae77@gmail.com>"]
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 56db578d8cf69aee7fc573828016fa728315bf79
|
Subproject commit 52411f61ef25a1b11129a77d26d987f44c6ea543
|
@ -126,8 +126,14 @@ pub fn read_json(
|
|||||||
let headers = resp.headers().clone();
|
let headers = resp.headers().clone();
|
||||||
|
|
||||||
if let Ok(body) = resp.text() {
|
if let Ok(body) = resp.text() {
|
||||||
let mut playlist: JsonPlaylist =
|
let mut playlist: JsonPlaylist = match serde_json::from_str(&body) {
|
||||||
serde_json::from_str(&body).expect("Could't read remote json playlist.");
|
Ok(p) => p,
|
||||||
|
Err(e) => {
|
||||||
|
error!("Could't read remote json playlist. {e:?}");
|
||||||
|
JsonPlaylist::new(date.clone(), start_sec)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
playlist.path = Some(current_file);
|
playlist.path = Some(current_file);
|
||||||
playlist.start_sec = Some(start_sec);
|
playlist.start_sec = Some(start_sec);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user