Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Jean-Baptiste Kempf
vlc
Commits
c5c44df6
Commit
c5c44df6
authored
Apr 25, 2018
by
Marvin Scholz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: playlist/appletrailers: Improve error handling
parent
fb6d424b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
share/lua/playlist/appletrailers.lua
share/lua/playlist/appletrailers.lua
+10
-1
No files found.
share/lua/playlist/appletrailers.lua
View file @
c5c44df6
...
...
@@ -50,6 +50,10 @@ function parse_json(url)
string
=
string
..
line
end
if
string
==
""
then
return
0
,
0
,
"Got empty response from server."
end
return
json
.
decode
(
string
)
end
...
...
@@ -72,7 +76,12 @@ function parse()
-- Found a video id
if
video_id
~=
nil
then
-- Lookup info from the json endpoint
local
info
=
filmid_info
(
video_id
)
local
info
,
_
,
err
=
filmid_info
(
video_id
)
if
err
~=
nil
then
vlc
.
msg
.
err
(
"Error to parse JSON response from Apple trailers: "
..
err
)
return
playlist
end
-- Parse data
if
info
[
"clips"
]
==
nil
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment