Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a8de45a9
Commit
a8de45a9
authored
Oct 21, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web intf: fix uri decoding when browsing.
And now make use of URI
parent
7e326833
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
share/lua/http/js/controlers.js
share/lua/http/js/controlers.js
+5
-5
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+10
-4
No files found.
share/lua/http/js/controlers.js
View file @
a8de45a9
...
...
@@ -163,16 +163,16 @@ function sendCommand(params,append){
}
}
function
browse
(
dir
){
dir
=
dir
==
undefined
?
'
~
'
:
dir
;
dir
=
dir
==
undefined
?
'
file://
~
'
:
dir
;
$
.
ajax
({
url
:
'
requests/browse.xml
'
,
data
:
'
dir
=
'
+
encodeURIComponent
(
dir
),
data
:
'
uri
=
'
+
encodeURIComponent
(
dir
),
success
:
function
(
data
,
status
,
jqXHR
){
var
tgt
=
browse_target
.
indexOf
(
'
__
'
)
==-
1
?
browse_target
:
browse_target
.
substr
(
0
,
browse_target
.
indexOf
(
'
__
'
));
$
(
'
#browse_elements
'
).
empty
();
$
(
'
element
'
,
data
).
each
(
function
(){
if
(
$
(
this
).
attr
(
'
type
'
)
==
'
dir
'
||
$
.
inArray
(
$
(
this
).
attr
(
'
name
'
).
substr
(
-
3
),
video_types
)
!=-
1
||
$
.
inArray
(
$
(
this
).
attr
(
'
name
'
).
substr
(
-
3
),
audio_types
)
!=-
1
){
$
(
'
#browse_elements
'
).
append
(
createElementLi
(
$
(
this
).
attr
(
'
name
'
),
$
(
this
).
attr
(
'
type
'
),
$
(
this
).
attr
(
'
path
'
),
$
(
this
).
attr
(
'
name
'
).
substr
(
-
3
)));
$
(
'
#browse_elements
'
).
append
(
createElementLi
(
$
(
this
).
attr
(
'
name
'
),
$
(
this
).
attr
(
'
type
'
),
$
(
this
).
attr
(
'
uri
'
),
$
(
this
).
attr
(
'
name
'
).
substr
(
-
3
)));
}
});
$
(
'
[opendir]
'
).
dblclick
(
function
(){
...
...
@@ -195,7 +195,7 @@ function browse(dir){
case
'
#mobile
'
:
break
;
default
:
sendCommand
(
'
command=in_play&input=
file://
'
+
encodeURIComponent
(
$
(
this
).
attr
(
'
openfile
'
)));
sendCommand
(
'
command=in_play&input=
'
+
encodeURIComponent
(
$
(
this
).
attr
(
'
openfile
'
)));
break
;
}
$
(
'
#window_browse
'
).
dialog
(
'
close
'
);
...
...
@@ -212,7 +212,7 @@ function browse(dir){
$
(
'
[openfile]
'
).
click
(
function
(){
switch
(
tgt
){
case
'
#mobile
'
:
sendCommand
(
'
command=in_play&input=
file://
'
+
encodeURIComponent
(
$
(
this
).
attr
(
'
openfile
'
)),
"
window.location='mobile.html'
"
);
sendCommand
(
'
command=in_play&input=
'
+
encodeURIComponent
(
$
(
this
).
attr
(
'
openfile
'
)),
"
window.location='mobile.html'
"
);
break
;
default
:
break
;
...
...
share/lua/intf/modules/httprequests.lua
View file @
a8de45a9
...
...
@@ -341,15 +341,21 @@ getbrowsetable = function ()
local
uri
=
_GET
[
"uri"
]
--uri takes precedence, but fall back to dir
if
uri
then
dir
=
vlc
.
strings
.
make_path
(
uri
)
if
uri
==
"file://~"
then
dir
=
uri
else
dir
=
vlc
.
strings
.
make_path
(
uri
)
end
else
dir
=
_GET
[
"dir"
]
end
--backwards compatibility with old format driveLetter:\\..
--this is forgiving with the slash type and number
local
position
=
string.find
(
dir
,
'%a:[\\/]*%.%.'
,
0
)
if
position
==
1
then
dir
=
""
end
if
dir
then
local
position
=
string.find
(
dir
,
'%a:[\\/]*%.%.'
,
0
)
if
position
==
1
then
dir
=
""
end
end
local
result
=
{}
--paths are returned as an array of elements
...
...
@@ -357,7 +363,7 @@ getbrowsetable = function ()
result
.
element
.
_array
=
{}
if
dir
then
if
dir
==
"~"
then
dir
=
vlc
.
misc
.
homedir
()
end
if
dir
==
"~"
or
dir
==
"file://~"
then
dir
=
vlc
.
misc
.
homedir
()
end
-- FIXME: hack for Win32 drive list
if
dir
~=
""
then
dir
=
common
.
realpath
(
dir
..
"/"
)
...
...
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