updated: pls use this patch [javascript browse_dir function]

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Albert
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 15 Mar 2006 08:17

updated: pls use this patch [javascript browse_dir function]

Postby Albert » 23 Mar 2006 09:16

Hello,
there is a problem in http VLM/mosaic - browse_dir javascript function (WinXP, IE 6, vlc-0.8.5-test1-20060323-0001-win32).

It is trying to use incompete directory names when trying to browse for input file (e.g. for mosaic):

Code: Select all

javascript:browse_path('C:\\ocuments and Settings\\lbert\\.');
instead of 'C:\\Documents and Settings\\Albert\\.

Albert

updated 23.3.2006
There is a miskate in functions.js
original

Code: Select all

function addslashes( str ){ return str.replace(/\'/g, '\\\''); } function escapebackslashes( str ){ return str.replace(/\\[^']/g, '\\\\'); }
new

Code: Select all

function addslashes( str ){ return str.replace(/\'/g, '\''); } function escapebackslashes( str ){ return str.replace(/\\/g, '\\\\'); }
It now allows you to browse directories and choose files, but than you have to add \ to the path for VLM :-(
I´ll try fix it next time.
Albert

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 24 Mar 2006 14:17

this breaks browsing or playing elements with a simple quote in their name. I'll try to see what's wrong in the original replace commands.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 24 Mar 2006 14:20

Hum, i can't reproduce the problem in firefox. Looks like it might be due to defective regexp handling in IE.

edit: hum no, it works fine when VLC server is on linux... i have to launch it on windows to test (... :cry: ...)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Albert
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 15 Mar 2006 08:17

regexp

Postby Albert » 24 Mar 2006 14:30

Hello,
I have no linux machine with up-to-date build, but I suppore, that it works fine in firefox/linux.
I tried to repair browsing in IE 6 and I know it needed one \ more.
You can see what was the problem with missing 1st letters and changing dir crash.
Albert

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 24 Mar 2006 14:41

Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

Albert
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 15 Mar 2006 08:17

VLM parsing - spaces in the paths or dshow FriendlyNames

Postby Albert » 29 Mar 2006 19:15

Hello,
there is still a problem with VLM parsing:
In IE 6 JavaScript browsing works quite good. The result is something like

Code: Select all

C:\Documents and Settings\Albert\960x480.png
Mozaic wizard (and VLC parsing engine) requires doubled backslashes:

Code: Select all

C:\\Documents and Settings\\Albert\\960x480.png
so one more backslash or rewriting VLM parsing is needed.

There is a problem with "spaces" in the path. Paths without spaces (e.g. c:\\temp\\movie.mpg) works, but paths with spaces don´t.

Code: Select all

http debug: executing vlm command: ## HTTP interface mosaic wizard ## http debug: executing vlm command: ################################## http debug: executing vlm command: http debug: executing vlm command: # Comment the following line if you don't want to reset your VLM configuration http debug: executing vlm command: del all http debug: executing vlm command: http debug: executing vlm command: # Background options http debug: executing vlm command: new bg broadcast enabled http debug: executing vlm command: setup bg input C:\\Documents and Settings\\Albert\\960x480.png http debug: executing vlm command: setup bg option sub-filter=mosaic http debug: executing vlm command: http debug: executing vlm command: # Mosaic options ... http debug: executing vlm command: # Launch everything http debug: executing vlm command: control bg play main debug: waiting for thread completion main debug: thread 4352 (input) created at priority 1 (input/input.c:261) main warning: drive letter C: found in source main debug: `C:\Documents' gives access `' demux `' path `C:\Documents' main debug: creating demux: access='' demux='' path='C:\Documents' main debug: looking for access_demux module: 1 candidate dvdnav warning: cannot open dvdnav main debug: creating access '' path='C:\Documents' main debug: looking for access2 module: 5 candidates vcd debug: trying .cue file: C:\Documents.cue access_file warning: C:\Documents: No such file or directory cdda debug: trying .cue file: C:\Documents.cue cdda warning: could not open C:\Documents main error: no suitable access module for `C:\Documents' main debug: thread times: real 0m0.109377s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 4352 joined (input/input.c:403) http debug: executing vlm command: http debug: executing vlm command: # end of mosaic batch http debug: executing vlm command:
I think that the same problem with "spaces" prevents VLC from playing DShow devices with space in the name by VLM.

Albert

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 29 Mar 2006 19:46

This should now be fixed ( https://trac.videolan.org/vlc/changeset/14969 ). Thanks for reporting (once more :p )
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests