Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
885391aa
Commit
885391aa
authored
Mar 25, 2012
by
Edward Wang
Committed by
Jean-Baptiste Kempf
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
luahttp: Improve code and fix sloppy error
Close #6489 Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
8f56ee23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
share/lua/http/js/common.js
share/lua/http/js/common.js
+13
-2
No files found.
share/lua/http/js/common.js
View file @
885391aa
...
...
@@ -15,7 +15,7 @@ var audio_types = [
];
var
playlist_types
=
[
"
asx
"
,
"
b4s
"
,
"
cue
"
,
"
ifo
"
,
"
m3u
"
,
"
m3u8
"
,
"
pls
"
,
"
ram
"
,
"
rar
"
,
"
sdp
"
,
"
vlc
"
,
"
xspf
"
,
"
zip
"
,
"
conf
"
,
"
sdp
"
,
"
vlc
"
,
"
xspf
"
,
"
zip
"
,
"
conf
"
];
var
stream_server
=
window
.
location
.
hostname
;
...
...
@@ -75,7 +75,18 @@ function isMobile() {
}
function
createElementLi
(
name
,
type
,
dir
,
ext
)
{
var
icon
=
type
==
"
dir
"
&&
name
==
'
..
'
?
'
Back-48.png
'
:
(
type
==
'
dir
'
?
"
Folder-48.png
"
:
(
$
.
inArray
(
ext
,
video_types
)
!=
-
1
?
"
Video-48.png
"
:
(
$
.
inArray
(
ext
,
audio_types
)
!=
-
1
?
"
Audio-48.png
"
:
(
$
.
inArray
(
ext
,
playlist_types
)
!=
-
1
?
"
Other-48.png
"
)));
var
icon
=
"
Other-48.png
"
;
if
(
type
==
"
dir
"
&&
name
==
'
..
'
)
icon
=
"
Back-48.png
"
;
else
if
(
type
==
'
dir
'
)
icon
=
"
Folder-48.png
"
;
else
if
(
$
.
inArray
(
ext
,
video_types
)
!=
-
1
)
icon
=
"
Video-48.png
"
;
else
if
(
$
.
inArray
(
ext
,
audio_types
)
!=
-
1
)
icon
=
"
Audio-48.png
"
;
else
if
(
$
.
inArray
(
ext
,
playlist_types
)
!=
-
1
)
// TODO: Playlist-48.png
icon
=
"
Other-48.png
"
;
var
open
=
type
==
"
dir
"
?
"
opendir='
"
+
dir
+
"
'
"
:
(
type
==
"
file
"
?
"
openfile='
"
+
dir
+
"
'
"
:
"
opendev='
"
+
dir
+
"
'
"
);
var
str
=
"
<li class='system_icon ui-widget-content'
"
+
open
+
"
><img src='images/
"
+
icon
+
"
' width='48px' height='48px' title='
"
+
name
+
"
' alt='
"
+
name
+
"
' style='border: none;background:none;'/><div style='font-size:10px;border:none;background:none;'>
"
+
name
+
"
</div></li>
"
;
return
str
;
...
...
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