rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ScorpAL

Pages: 1
1
HTML & templates / Suggest: HFS + MediaInfo
« on: August 10, 2009, 12:41:45 PM »
Hi.

Idea:
Show info of media files on Templates.
MyFile.avi | Duration: 1 hour 32 min | Resolution: 760 x 250 | any other info...

Why?
We have large media collection.
For example - a lot of movies.
Before download user wan't know what he get (Quality, Lenght, Format, Codec info e.t.c.)

How:
I don't know how  ;)
I am not programmer. Just usability expert.
But I think it will be posible if HFS interract with mediainfo.dll

What is MediaInfo?
MediaInfo supplies technical and tag information about a video or audio file.
It is free software (free of charge and free access to source code: GPL or LGPL licence)
http://mediainfo.sourceforge.net/en


What you think about this idea?
How to dificult release this?

2
HFS ~ HTTP File Server / Re: Content caching allowing
« on: July 28, 2009, 08:33:01 AM »
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>

Put this in the <head/> of your template. Or easier, just use ctrl+f5 to refresh ignoring cache in most browsers.

It's just for HTML, but not for images loaded with JS.

3
In my case I show thumbs for some files from virtual and real folders.

Example:
movie1.avi shown at template as movie1.jpg
movie2.avi shown at template as movie2.jpg

How to disable loging files with some extensions (*.jpg) if this files stored at separate folders?
Note: I can't manualy set parameter "Don't log" for each JPG. I have 30 and more JPG's at folders.


I have one idea...
If I choose file filter for root folder as *.mkv;*.avi why HFS log other files?
May be in this case log only *.mkv;*.avi?

4
HFS ~ HTTP File Server / Re: Content caching allowing
« on: July 23, 2009, 03:03:58 PM »
Hi.
How to temporary disable cache headers?
I need it just for testing my template.

How to set max-age for files with some extension?

5
HTML & templates / Re: Check file exist
« on: July 18, 2009, 08:29:10 AM »
Wow!!!

AvvA, than you very much!

Code: [Select]
{.if|{.filesize|%item-folder%%item-name%.inf.}|it has pair|it has no pair.}It's work!

6
HTML & templates / Re: Check file exist
« on: July 17, 2009, 07:08:49 PM »
Hm...
I try put some file to HFS folder near hfs executable (hfs242.exe) and renam eit to test.inf

Then in template use {.filesize|test.inf.}. It's work! It show me file size.

One problem... I put file at that folder just for experiment.
Realy my HFS executable stored separate from folder archive.

Rejetto, can you add some function (macros) like {.checkFile.} or {.fileexist.} that can work with virtual filesystem?

I try explain my idea.

I have a large collection of movies rhat I wank share for my friend over home network.
Some movies has covers (jpg files).

File system like this one:

Folder "Shared movies" stored separate from HFS executable file at another local disk and contain

movie1.avi <- movie file
movie1.jpg <- movie cover
movie2.avi <- movie file
movie2.jpg <- movie cover
movie3.avi <- movie file (this movie have no cover)
movie4.avi <- movie file (this movie have no cover)
movie5.avi <- movie file
movie5.jpg <- movie cover

Now I try create template where each movie listed as cover image with link to movie file.
If movie has no cover then cover for this movie should be standart predesigned jpg.

Any ideas?

7
HTML & templates / Re: Check file exist
« on: July 17, 2009, 06:09:57 PM »
Hm...
The problem that {.filesize|%item-name%.inf.} or {.filesize|%item-name%.txt.} (or {.filesize|%item-name%.} with disabled "Hide file extensions in listing" option) always show 0 (ZERO).

May be filesize does not work at that build?

8
HTML & templates / Re: Check file exist
« on: July 16, 2009, 08:02:35 AM »
Perhaps go read the wiki ^^

http://www.rejetto.com/wiki/index.php/HFS:_Template_macros

Wiki has no document any feature like this.

Wiki has only:
can access but only for current item.
load but... Wiki has no example how it can check exist file or not.
filesize but... result on privious post.

9
HTML & templates / Re: Check file exist
« on: July 16, 2009, 06:04:39 AM »
you can do this only with HFS 2.3
Yep. I use HFS 2.3 (242).

> Trim ".txt" from filename

right click on folder > flags > hide file extension...

It's clear. I use it.

> and check has this file pair with extension .inf or not.
> If yes - show *.txt file name and text "It has pair" ;)
> If no - show *.txt file name and text "It has no pair"

{.if|{.filesize|%item-name%.inf.}|it has pair|it has no pair.}
this doesn't actually check file existence, but i hope it will fit your needs (won't work with zero byte files)

Early I try this method. But...

Hm... Strange... Always show It has no pair.

test1.txt
test1.inf

%item-name% show us test1
%item-name%.inf show test1.inf
{.filesize|%item-name%.inf.} show 0

But test1.inf not empty (~50 - 100Kb)

{.filesize|%item-name%.txt.} show 0 but this file not empty.

All my code for example:
Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  <title>HFS %folder%</title>
  <link rel="shortcut icon" href="favicon.ico" />
</head>

<body>

<div id=folder>%folder%</div>
<div id=body>
%up%
<hr />
%files%
</div>

</body>
</html>

[up]
<a class=big href="..">UP</a>

[nofiles]
<div class=big>No file</div>

[files]

%list%

[file]
<a href="%item-url%">%item-name%</a> %item-size%<br />

{.if|{.filesize|%item-name%.inf.}|it has pair|it has no pair.}<br />
{.filesize|%item-name%.inf.}
%item-name%.tbn<br /><br />

[folder]
<a href="%item-url%"><strong>%item-name%</strong></a><br />

[link]
<a href="%item-url%">%item-name%</a><br />

10
HTML & templates / Check file exist
« on: July 15, 2009, 04:25:52 PM »
Hi... All day I try find any example how to check if file exist or not.

Problem description:

We have three files at folder. For example first is test.txt second is test.inf and third is test2.txt

Folder file mask is *.txt. That need for showing only *.txt files in file list (test.txt and test2.txt).
But all files (*.txt and *.inf) loaded to HFS.

At this way we can list test.txt and test2.txt files but have url access to test.inf file  ;)

What need:
Trim ".txt" from filename and check has this file pair with extension .inf or not.
If yes - show *.txt file name and text "It has pair" ;)
If no - show *.txt file name and text "It has no pair"

Can you help me?

Pages: 1