Web-based TViX file browser/player/remote control 0.43

Web-based TViX file browser/player/remote control 0.43

Postby John » Mon Dec 08, 2008 6:48 pm

Here's version 0.43 of my TViX file browser to be used with badeip's firmware. Tested only with BadEIP_M-6×00_1.3.28 firmware, but should work on newer versions (or older provided Tclsh has been included or manually installed).

Also note that this rev is a *major* change in code. Hopefully there are few if any additional bugs, but I won't be surprised if you find one. Please notify me if you see anything so I can get it corrected in future revs.

Installation instructions
----------------------------
Extract the archive into /opt/opentvix/usr/local/wwwroot/ being sure that folder structures are preserved. I do so using a Samba share through badeip's root share, but if you want to use FTP and Linux commands it should work fine - but you're on your own.
Open a SSH prompt to your TViX (I'm using PuTTY for Windows, but you can use anything you'd like. Login name "root", password "opentvix" assuming you haven't changed it) and type:
Code: Select all
chmod 755 /usr/local/wwwroot/cgi-bin/filter.tcl
chmod 755 /usr/local/wwwroot/cgi-bin/navigate.tcl
chmod 755 /usr/local/wwwroot/cgi-bin/readfile.tcl
chmod 755 /usr/local/wwwroot/cgi-bin/send.tcl

to give the file execute permissions. Note - this release contains an additional file (filter.tcl) in the above list - if you have already installed previous versions, you will still have to set the permissions on this new file!

This version supports the toggling of IRd through the use of a check for a file's existence in /mnt/jffs2_apps/tvix/main. If you wish to install before badeip creates another rev of firmware, add the following into main (replacing any currently active lines that start ird):
Code: Select all
if [ -f  /opt/opentvix/ird_enable ]; then
   /mnt/jffs2_apps/tvix/main_exec /mnt/jffs2_apps/tvix/opentvix/usr/sbin/ird &
fi


If IRd has been disabled in the badeip firmware version you're using, it will need to be enabled for full functionality. Without it, you'll still be able to browse and stream, but will be unable to remotely control the TViX to play files on the TViX itself.

Open your web browser to http://<<TViX_Address>>/cgi-bin/navigate.tcl and start browsing.

Features List
----------------
* Ability to browse all media on the TViX internal hard drive and USB ports
* Ability to play media in your browser (Assuming the network overhead is compatible with your file... basic audio/pictures/video works fine. HD Video, not so well)
* Ability to select media to be played on the TViX (internal hard drive only)
* Ability to respect or override the TViX icon mode when displaying folder contents
* Display of "Now playing" at the top of the page when a file is being played
* Addition of floating TViX Remote Control to relay commands to the TViX
* Basic search functionality from the current directory - NOTE - This is currently case sensitive. If someone wants to compile a full-featured Unix find (rather than the busybox version), it would be appreciated (hint, hint). :-)
* [0.4] Dynamic filtering of current directory contents
* [0.4] Ability to toggle use of IRd via the web interface, and notification when not enabled


Known issues
---------------
* There are likely improvements/changes/additions that need to be made to the mime-types file. I made my own, and don't have one of every file of my own to try it out on. The incorrect mime type specified will prevent your computer from recognizing what type of file you're trying to play when playing the file at your computer.
* Determine if TViX is in that autoplay mode... I haven't tested it, but I believe it will likely start and pause your video if TViX automatically plays the folder contents when the directory is entered. If it's set to autoplay, I'll need to determine and build in logic to keep from pressing play. Maybe it won't be an issue after all though. Fingers crossed.
* Will not work if it has to traverse through a directory that has been sorted by date or length. Currently all directories must be sorted by name for this to work.
* If your TViX is currently viewing a networked or USB device, the web browser will be unable to properly trigger the playing of files on your hard drive - you must navigate to the hard drive device first (manually).

To-Do List
------------
* Resolve items on issues list
* Determine if the file that should be played is closer to the bottom of the list than the top, and navigate from the bottom up if so.
* Add advanced searching capabilities
* Recruit someone for graphic design. I'm not a web designer, I'm a developer... and it shows.
* Include options for showing file details (Datestamps, file sizes)
* Make the "Now Playing" update dynamically rather than just on page refresh
* Use more graphics from TViX for webpage display
* Add support for Network devices and be able to trigger files to be played within the USB devices

Change Log
--------------
[0.21] Inclusion of missing files in 2.0 release and correction of major errors introduced with 2.0
[0.22] Specified sorting by name when navigating files. (Still assumes your TViX is sorted by name! If not, hit the right arrow to change directory sorting order)
[0.3] Resolved issue of needing an internal hard drive. Now supports USB devices.
[0.3] Fixed case-sensitivity issue when traversing directories
[0.3] Added proper handling of empty directories
[0.3] Added support for USB port browsing
[0.3] Added basic search from current directory function
[0.3] Removed display of ignored directories/files
[0.3] Fixed issue with it unable to process files or directories with an "&" in the name, as in "Adventures of Shark Boy & Lava Girl". But I'm sorry I did.
[0.3] Added caching of images
[0.4] Dynamic filtering of current directory contents
[0.4] Fixed quick-links to devices not going back to root folders of each device
[0.4] Fixed issue of being unable to navigate properly when root directory contains directories above the AUDIO folder
[0.4] IRd toggling via the web interface
[0.41] Rearranged the browser's impression of what the ASCII sort order should look like.
[0.41] Corrected issue with directories containing pairs of square brackets in them
[0.42] Corrected issue with files containing pairs of square brackets in them
[0.43] Corrected issue with directories and files that start with a period


I take no responsibility for any damage caused by installation of this program. The only file it ever touches is the config file for IRd, so risk should be very minimal. Although it works perfectly for me (with the exception of everything in the known issues list), your results may vary. Use at your own risk. Please contact me directly if you find any issues.

--John
Attachments
TViX_Browser_0.43.zip
Am I too late?
(103.75 KiB) Downloaded 221 times
Last edited by John on Wed Dec 10, 2008 7:50 pm, edited 4 times in total.
-- TViX 6500 - Selected not for its features, but for its potential
John
Member
 
Posts: 82
Joined: Wed Oct 01, 2008 5:13 pm
Location: Happy Valley, PA

Re: Web-based TViX file browser/player/remote control 0.4

Postby g4xl » Mon Dec 08, 2008 8:10 pm

Great work ..

thank john
g4xl
Member
 
Posts: 11
Joined: Mon Dec 01, 2008 9:35 pm

Re: Web-based TViX file browser/player/remote control 0.4

Postby John » Mon Dec 08, 2008 8:22 pm

Happy to do it... Please let me know if you actually try it out before badeip gets it into his next release - I'd sleep better at night knowing it works on someone else's TViX too. Though to be fair, I did this release more for myself than anyone else. I've been wanting to get the dynamic filtering in there for quite a while - I'll get *a lot* of use out of that one.

And thanks to badeip for sending me the debug log showing the folder before AUDIO folder problem. I've always known that would be an issue, but wasn't motivated enough to setup a test case to capture the log myself. Credit also goes to badeip for the shell code in main to support the ird toggling... and the numerous firmware releases that make this all possible in the first place!

Curious - has anyone done the work to be able to run this on anything other than a TViX 6500? I think the only things that should be needed are a tcl interpreter and the IR daemon... and I know the tcl portion is readily available if you can compile it. Just curious...
-- TViX 6500 - Selected not for its features, but for its potential
John
Member
 
Posts: 82
Joined: Wed Oct 01, 2008 5:13 pm
Location: Happy Valley, PA

Re: Web-based TViX file browser/player/remote control 0.4

Postby moxz » Tue Dec 09, 2008 6:45 am

Great work I think, I havent tried it out yet and I am also off to work. Hopefully I can test it out tonight in 1.3.65.
moxz
Member
 
Posts: 31
Joined: Fri Nov 14, 2008 3:33 pm

Re: Web-based TViX file browser/player/remote control 0.4

Postby badeip » Tue Dec 09, 2008 7:38 am

John,

Great work...it almost works.
As a developer, I am quite used to the phrase "it works for me" (coming from dubious colleagues. Not me of course :P) without taking actions to make sure that it works for everyone else.
The file browser almost works this time, so I really appreciate that you make an effort to get it working for others too.
Most of what I have done with the TViX was originally just for my self, but it's satisfying to see that other people can benefit from it too.

I'll send you a debug output.

Regards,

badeip.
badeip
Member
 
Posts: 376
Joined: Wed Mar 05, 2008 10:35 pm
Location: Norway

Re: Web-based TViX file browser/player/remote control 0.4

Postby John » Tue Dec 09, 2008 1:27 pm

Things always work for me - I'm just that kind of guy. (Perhaps the kind that closes their eyes when things go horribly pear shaped)

Your problem is an interesting one alright... The original issue was that it sorted things case-sensitive, whereas the TViX doesn't. I fixed that problem quite easily by just telling it not to do that. Unfortunately, there are a few characters --> [/]^_' that fall between the upper and lowercase letters in the ASCII chart. Tcl is taking that group and putting it at the top, before the alphabetic characters. TViX, on the other hand likes to put that set after the alphabet.

I'll rewrite ASCII and get a new version posted shortly.

--John
-- TViX 6500 - Selected not for its features, but for its potential
John
Member
 
Posts: 82
Joined: Wed Oct 01, 2008 5:13 pm
Location: Happy Valley, PA

Re: Web-based TViX file browser/player/remote control 0.41

Postby John » Tue Dec 09, 2008 3:53 pm

Version 0.41 now posted - resolving a storing issue with files or directories starting with one of _[\]^', as well as an issue with anything containing a pair of square brackets.

Thanks for the feedback!
--John
-- TViX 6500 - Selected not for its features, but for its potential
John
Member
 
Posts: 82
Joined: Wed Oct 01, 2008 5:13 pm
Location: Happy Valley, PA

Re: Web-based TViX file browser/player/remote control 0.41

Postby moxz » Tue Dec 09, 2008 5:11 pm

I have now put in the new program 0.41 but i can't get it working properly. It wont do the ir commands. I should have enabled it correctly but i will check that after dinner.
moxz
Member
 
Posts: 31
Joined: Fri Nov 14, 2008 3:33 pm

Re: Web-based TViX file browser/player/remote control 0.41

Postby John » Tue Dec 09, 2008 7:01 pm

Hi Moxz,

If it's not performing any IR commands at all, it's likely that your IR daemon is not running. open a command prompt to your TiVX using ssh and type:
Code: Select all
ps | grep ir


You should see a line that looks something like:
Code: Select all
  835 root        124 S   /mnt/jffs2_apps/tvix/opentvix/usr/sbin/ird

The numbers may be different, but the command part should be the same. If you don't see that, IRd (which is needed to send IR commands) is not running. The toggle I built into this version to enable/disable it will not work until badeip updates his firmware, or unless you manually update /mnt/jffs2_apps/tvix/main yourself.

If it's not running (I'm assuming that's your issue at this point), the simplest way at the moment is to type:
Code: Select all
vi /mnt/jffs2_apps/tvix/main

Then using your cursor keys, go down to the line labeled "#/mnt/jffs2_apps/tvix/main_exec /mnt/jffs2_apps/tvix/opentvix/usr/sbin/ird &". Put your cursor on the "#", and press x. The "#" should disappear. Then (assuming the line now just reads "/mnt/jffs2_apps/tvix/main_exec /mnt/jffs2_apps/tvix/opentvix/usr/sbin/ird &") press "ZZ" (must be capital letters) to save and close the file. Now reboot and try again.

If you find that the ird program is already running (appears when you do the ps command above), let me know and we'll troubleshoot the problem from the TViX Browser side.

--John
-- TViX 6500 - Selected not for its features, but for its potential
John
Member
 
Posts: 82
Joined: Wed Oct 01, 2008 5:13 pm
Location: Happy Valley, PA

Re: Web-based TViX file browser/player/remote control 0.41

Postby moxz » Tue Dec 09, 2008 7:38 pm

Thx John. I had a feeling it was that problem. I just didn't have time to search for at that moment. But now it works. It looks like it is working good with badeip's latest reales.
// MoxZ
Edit" Actually i found a problem when trying to start Batman-Gotham.Knight[2008]DvDrip-aXXo i get this error msg:
Content-type: text/plain
invalid command name "2008"

Edit2
I guess it has something to do with "[]" Not to good having them in file names but many releases do.

Edit3
BTW New firmware (beta) version 1.3.74 is out so hopefully badeip can include this remote control in that firmware =)

Edit4
Thx for quickupdate John now filenames with sqaurebrackets works like a charm.

Edit5
Actually it is not working like a charm. =( If i first select a movie and start to play it, then browse to something else and push that file name he goes to something complete different from what i pushed. I thought that it had something to do with me not stopping the movie first but it turned out that it does the same thing even if I stop a movie first.
Last edited by moxz on Tue Dec 09, 2008 9:36 pm, edited 5 times in total.
moxz
Member
 
Posts: 31
Joined: Fri Nov 14, 2008 3:33 pm

Next

Return to Releases

Who is online

Users browsing this forum: No registered users and 2 guests