rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: klaxnek on August 28, 2015, 08:57:54 PM

Title: HFSFLIX
Post by: klaxnek on August 28, 2015, 08:57:54 PM
HFSFLIX

Screenshots album: http://imgur.com/a/1aiyy

This template is only intented to watch online content ala Netflix.

Be warned that this template is really personalized.
It will not work properly if you don't customize it with your series and follow some rules with the naming structure of the movie folder.

Sorry for my english and the shitty Javascript code, but it works ;)

------------------------------------

You'll need 2 root folders:
- Movies
- Series

------------------------------------

MOVIES
Movie folder structure:
/Movies/Movie_Folder (Year)/Movie_Title.mp4     <-- Movie in .mp4
/Movies/Movie_Folder (Year)/Movie_Title.eng.srt <-- English subtitles
/Movies/Movie_Folder (Year)/Movie_Title.spa.srt <-- Spanish subtitles

* Subtitles
The movie player supports (JW Player 7) supports different subtitles.
I've added support for english and spanish languages and I've made english subtitles as default (you can change it easily or add new languages in the template).

All the movie posters are grabbed from http://yts.to automatically.
Therefore, you'll need to name your movie folder the same way as the image of the movie poster in yts.to
For example (pay attention to uppercase/lowercase in movie title):
/Movies/american ninja 2 the confrontation (1987)/American.Ninja.2.The.Confrontation.1987.720p.BluRay.x264.YIFY.mp4
/Movies/american ninja 2 the confrontation (1987)/American.Ninja.2.The.Confrontation.1987.720p.BluRay.x264.YIFY.eng.srt
/Movies/american ninja 2 the confrontation (1987)/American.Ninja.2.The.Confrontation.1987.720p.BluRay.x264.YIFY.spa.srt

The movie info is grabbed from www.omdbapi.com automatically.

Customize movie posters or weird titles:
Take a look at urlcaratulamovie function in template. For example...
if (moviemod==="Alien_DC") url = baseurl + "Alien_1979_Dir_Cut";
else if (moviemod==="Alien_Resurrection_DC") url = baseurl + "Alien_Resurrection_1997_Special_Edition";
else if (moviemod==="Alien_3_DC") url = baseurl + "Alien_3_1992_Special_Edition";

------------------------------------

SERIES
* Banners
I've downloaded the series banners from http://www.thetvdb.com/ and moved them to icons folder with the same naming.
You can make the template grab automatically from thetvdb.com changing the template (I've downloaded them to /icons because thetvdb.com fails too much...):
Change:
function urlcaratulaserie(serie) {
   var base="/icons/";
To:
function urlcaratulaserie(serie) {
   var base="http://www.thetvdb.com/";
   

Then you have to add your series manually in the template, with the series name and the banner image filename:
   switch(serie) {
      case "Better Call Saul": url="273181-g3"; break;
      case "Daredevil": url="281662-g6"; break;
      case "Dragon Ball Super": url="295068-g5"; break;
      
------------------------------------

The player will only work with mp4 files.
To convert your mkv to mp4 you can create 2 .bat files:

.mkv with DD2.0 audio to .mp4 (no reenconding):
for %%a in ("*.mkv") do ffmpeg -i "%%a" -c:v copy -c:a copy "%%~na.mp4"

.mkv with DD5.1 (AC3) audio to .mp4 (it reencodes the audio to aac 384k with the same number channels)
for %%a in ("*.mkv") do ffmpeg -i "%%a" -strict experimental -c:v copy -c:a aac -b:a 384k "%%~na.mp4"

The control bar of the player is set to width 99%, so you can move your pointer to your right lower corner in fullscreen.

------

(http://i.imgur.com/XLCktqF.png)
(http://i.imgur.com/b8lK5JU.jpg)
(http://i.imgur.com/jMuf3td.png)
(http://i.imgur.com/tR9ScpR.png)
(http://i.imgur.com/yOY3t9o.jpg)
(http://i.imgur.com/uFTSeDa.png)
(http://i.imgur.com/SxsfjnZ.png)
Title: Re: HFSFLIX
Post by: LeoNeeson on August 30, 2015, 12:20:22 PM
Nice, look's promising, thanks for sharing. :)
Title: Re: HFSFLIX
Post by: Rupom141 on August 30, 2015, 05:22:35 PM
AWESOME :D
Title: Re: HFSFLIX
Post by: asmodeo on August 31, 2015, 01:57:47 AM
Just the kind of thing I always wanted.  You rock :)
Title: Re: HFSFLIX
Post by: Colossus on November 11, 2015, 02:59:34 PM
------------------------------------

The player will only work with mp4 files.
To convert your mkv to mp4 you can create 2 .bat files:

.mkv with DD2.0 audio to .mp4 (no reenconding):
for %%a in ("*.mkv") do ffmpeg -i "%%a" -c:v copy -c:a copy "%%~na.mp4"

.mkv with DD5.1 (AC3) audio to .mp4 (it reencodes the audio to aac 384k with the same number channels)
for %%a in ("*.mkv") do ffmpeg -i "%%a" -strict experimental -c:v copy -c:a aac -b:a 384k "%%~na.mp4"

The control bar of the player is set to width 99%, so you can move your pointer to your right lower corner in fullscreen.

------


Im not quite understanding what to do with this? Put it in the same directory as the title *.mkv? run it then wait an hour?
Can you give a further explanation please :)

Thanks
Title: Re: HFSFLIX
Post by: Colossus on November 11, 2015, 03:00:58 PM
Cant you just change the JWPlayer to accept .MKV and .AVI files? if so how?
Title: Re: HFSFLIX
Post by: bmartino1 on November 11, 2015, 09:37:01 PM
adding mimetypes / permissions...

http://www.rejetto.com/forum/hfs-~-http-file-server/information-(mime-types)-embed-pdfsvideo-and-audio/

http://stackoverflow.com/questions/17018119/how-to-play-mkv-file-in-browser
"*.mkv" "video/x-matroska"
Title: Re: HFSFLIX
Post by: Colossus on November 13, 2015, 06:51:09 AM
Silly me - My *.mkv was set as "matroska" instead of "x-matroska"

After doing some editing under the [file] adding
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/icons/movie.png"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','video');"><img src="/icons/play_netflix.png" width=32/></a>

And with them mimes set correctly (attached)
i still cant seem to get the player to work with AVI or MKV - ???

"Error Loading Player: No playable sources found" was the error i got trying to play AVI and MKV files
Title: Re: HFSFLIX
Post by: bmartino1 on November 13, 2015, 03:56:24 PM
hmm, interesting.

One of many issue i see:

Mime types are correct, but your not using "open directly in browser", this is essential to make it play with in the HTML code on the site.
(other wise, it is set to do what HFS is programmed to do, be a "File Server")

My first issue is in the picture where is says "playable source not found"
(this leads me to believe that a player / html code is not installed to player it, or is not working to play it
So, first i need to know if you actual have a "codex" that plays the media, such as VLC:
Is vlc installed http://filehippo.com/download_vlc_32/
*(Are you able to open the files before hfs server hosting them?)

It looks like you just copied the "mp3/mp4" setting to make the AVI / MKV, this is a pretty big and advance html doc, and since you copped one for music, i would be surprised if it is not calling the correct player to player the other file....

So lets take a look at html severing video files...
http://v4e.thewikies.com/
http://www.rejetto.com/forum/hfs-~-http-file-server/serving-video-files/msg1059473/?topicseen#msg1059473
As you may need to update or use a better video player:
If you use generator up top and want the "flash players" offline: it is available:

https://drive.google.com/file/d/0B9u5dgydfOEuai1pSEJfMFRDb3M/edit?usp=sharing

---html samble code:
<br />
<p>video here</p>
<object type="application/x-shockwave-flash" data="Path to player.zip/flowplayer-3.2.18.swff" width="700" height="500">
   <param name="movie" value="Path to player.zip/flowplayer-3.2.18.swf" />
   <param name="allowFullScreen" value="true" />
   <param name="wmode" value="transparent" />
   <param name="flashVars" value="config={'playlist':[{'url':'Your video here(encoded...)','autoPlay':false}]}" />
<!-- example of encoded 'http%3A%2F%2F192.168.1.254%2Fvideo%2Ftitle.mp4', -->
<!-- example path: 'http://192.168.1.254/video/title.mp4' -->

   <span title="No video playback capabilities, please download the video below">Video</span>
</object>
<br />
-----------------------

So here is what i would advise:


Also as i see that there was "tv - shows"
Be careful when sharing and servicing files like that over the web, as it may break copy right codes....
http://www.boutell.com/newfaq/creating/musicrights.html
(same concept applies ...) :P
Title: Re: HFSFLIX
Post by: Colossus on November 16, 2015, 05:59:49 AM
hmm, interesting.

One of many issue i see:

Mime types are correct, but your not using "open directly in browser", this is essential to make it play with in the HTML code on the site.
(other wise, it is set to do what HFS is programmed to do, be a "File Server")
I did actually try it with and without to see if it made a difference.... It didnt :P

My first issue is in the picture where is says "playable source not found"
(this leads me to believe that a player / html code is not installed to player it, or is not working to play it
So, first i need to know if you actual have a "codex" that plays the media, such as VLC:
Is vlc installed http://filehippo.com/download_vlc_32/
*(Are you able to open the files before hfs server hosting them?)
Yes, I have tried playing them outside of HFS and the files have worked, i have removed the AVI list as obviously no point having it in

It looks like you just copied the "mp3/mp4" setting to make the AVI / MKV, this is a pretty big and advance html doc, and since you copped one for music, i would be surprised if it is not calling the correct player to player the other file....

So lets take a look at html severing video files...
http://v4e.thewikies.com/
http://www.rejetto.com/forum/hfs-~-http-file-server/serving-video-files/msg1059473/?topicseen#msg1059473
As you may need to update or use a better video player:
If you use generator up top and want the "flash players" offline: it is available:

https://drive.google.com/file/d/0B9u5dgydfOEuai1pSEJfMFRDb3M/edit?usp=sharing

---html samble code:
<br />
<p>video here</p>
<object type="application/x-shockwave-flash" data="Path to player.zip/flowplayer-3.2.18.swff" width="700" height="500">
   <param name="movie" value="Path to player.zip/flowplayer-3.2.18.swf" />
   <param name="allowFullScreen" value="true" />
   <param name="wmode" value="transparent" />
   <param name="flashVars" value="config={'playlist':[{'url':'Your video here(encoded...)','autoPlay':false}]}" />
<!-- example of encoded 'http%3A%2F%2F192.168.1.254%2Fvideo%2Ftitle.mp4', -->
<!-- example path: 'http://192.168.1.254/video/title.mp4' -->

   <span title="No video playback capabilities, please download the video below">Video</span>
</object>
<br />
-----------------------

So here is what i would advise:

  • Check the box open directly in browser
  • Double check play ability with a file you are going to test
  • Maybe add a better HTML player
  • Look at links in post...

Also as i see that there was "tv - shows"
Be careful when sharing and servicing files like that over the web, as it may break copy right codes....
http://www.boutell.com/newfaq/creating/musicrights.html
This is a LAN Media Server only ;)
(same concept applies ...) :P

If i update the player from JS to HTML wont it break the rest of the template? I dont want to move it around and break it lol would there be any problems?
Title: Re: HFSFLIX
Post by: Colossus on November 16, 2015, 08:06:21 AM
How do i replace the player?
Title: Re: HFSFLIX
Post by: bmartino1 on November 16, 2015, 04:01:24 PM
After same looking i have found that the issue with this template is that it is using specific JavaScript and only using the html player know as "jwplayer"
(i've upgrade to the latest jwpalyer version 7, and it won't player the file, but doesn't give the errors...)
http://content.jwplatform.com/libraries/w6fiDaoL.js
this leads me to believe that the html player won't play the files...

So, Unfortunate:
JW Player supports very few files...
http://support.jwplayer.com/customer/portal/articles/1403635-media-format-support

So i'm revamping this template with a better video player and will re post when done.
Title: Re: HFSFLIX
Post by: bmartino1 on November 17, 2015, 06:03:26 AM
How do i replace the player?

That's hard to answer...
So what i have done was create a spot where the "new player" will be, and set it above the original one in the template jwplayer...

You should now have the capabilities to use java script / html  "onclick events" and are able to trace the html files down to what is loading when....
Use the "Web console"

so, hear are some help full path locations:

edit the template look Under

[files]

This is where you will add the file to load into the player (was unable to figure it out 100%...)
the template done't have the file paths set yet it is using hfs macro %item-url% which need to go the the video player...
The creator of the post is using java script to manipulate the page in doing that, i'm not a jquery / java script coder, I know quite a bit of html / php....

also in the template, you will find html code for <center> this is the spot that all the files loads to form the script and the "click event"
so i crate the player above that....

So, thus, this is as far as i can and what i'm going to go with it...
*Link has been upgraded and updated....

https://drive.google.com/file/d/0B9u5dgydfOEuc2xFdnRxbGFlS0k/view?usp=sharing

Don't really have files to test the full template(the IMBM and other netflix like stuff), and this is the bare min you need to get things running

(i work in a custom location, i try to make things run anywhere, but i may put an exact location rom time to time...)
extract to the root of "c:"
path: "c:\hfs\*.*"
*Should work in any location, but untested...

Here is what i have done:
I've added the "players", but not a way to put the file to be played into it left html / hfs comments in the template!
Added RARW live template / additional html players
Added file vfs Structure in accordance to forum descriptions

Menu > html template > edit (F6)
Edit hfs.tpl to make changes to entire template

Here is a part of the test tpl unfinished...
-----------------
<!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=iso-8859-1'>
<meta name="robots" content="noindex,nofollow" />
<title>HFSFLIX %folder%</title>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Droid+Sans" />
<style type="text/css">\n%style%\n</style>
<link rel="shortcut icon" href="/template/hfsflix/favicon.ico" />
<script type="text/javascript" src="/template/hfsflix/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/template/hfsflix/2.1/jquery.min.js"></script>
</head>
<body>

<!-- Calls Potential Player Files NEED THIS -->
<script type="text/javascript" src="/template/global/topup/jquery.topup.packed.js"></script>
<script type="text/javascript" src="/template/global/live.script.js"></script>
<script type="text/javascript" src="/template/global/video-js/video.js"></script>
<script type="text/javascript" src="/template/hfsflix/jwplayer.js"></script>
<script src="/template/global/flowplayer/flowplayer-3.2.18.swf"></script>

<!-- Diable adds ??? must of been his jwplayer... probally don't need this -->
<style>.afs_ads{display:none !important;} .jw-captions {bottom: 0em !important;} .jw-skin-seven .jw-controlbar {width:99.9%; opacity:0.6;}</style>
<!-- UNKNOWN WHY - Not needed! assume login token acsess... probally don't need this -->
<script>jwplayer.key='dYZaZhVg8YMcuroFV8/9r+trIPGjiF5hrf264w==';</script>

<!-- HFS Macro Called defiend later at bottom... -->
%login-link%
%loggedin%
%upload-link%

<!-- HFS Flix top left path location -->
<div class=big id="titulo" style="padding-top:10px;padding-left:15px;">{.breadcrumbs|{:<a href="%bread-url%">{.if|{.%bread-name%=.}|Home|%bread-name%.}/</a>:} .}</div>
<div class=body>

<!-- New video player here -->
<!-- onclick run script at the playe location code -->
<center>
<p> I'm the new player spot, still a work in progress </p>
<object type="application/x-shockwave-flash" data="/template/global/flowplayer/flowplayer-3.2.18.swf" width="1280" height="600">
   <param name="movie" value="/template/global/flowplayer/flowplayer-3.2.18.swf" />
   <param name="allowFullScreen" value="true" />
   <param name="wmode" value="transparent" />
   <param name="flashVars" value="config={'playlist':[{'url':'%item-url%','autoPlay':false}]}" />
</object>
</center>

<script>
</script>
<!-- New video player here -->
<hr style="border-color:red;">
<br />

<center>
<div id="player" class="jwplayer" tabindex="0" ></div>
<div class="playertitle" id="playertitle"></div>
<div class="poster" id="poster"></div>
</center>



<!-- JS JWPLAYER html video player -->
<center>
<div id="player" class="jwplayer" tabindex="0" ></div>
<div class="playertitle" id="playertitle"></div>
<div class="poster" id="poster"></div>
</center>
<br />

<!-- JS HFSFlix script to put files into player and add netflix video extras -->
{.comment|
   NOTE: This part is complex, do not touch unless you are certain that you understand how it works!
.}
<script>
$(document).ready(function(){
    $('.img-zoom').hover(function() {
        $(this).addClass('transition');
 
    }, function() {
        $(this).removeClass('transition');
    });
});

document.getElementById('player').style.display='none';

function player(url, title, format) {
    var div = document.getElementById('playertitle');
    div.innerHTML = "<div style='margin-top:30px;'></div>" + title + "<div style='margin-top:70px;margin-bottom:70px'><hr style='border-color:red;'></div>";
    document.getElementById('player').style.display='block';
    document.getElementById('playertitle').style.display='block';
   var playerInstance = jwplayer('player');
   switch(format) {
      case 'video':   playerwidth = 1280;
                  playerheight = 720;
                  break;
      case 'audio':   playerwidth = 600;
                  playerheight = 33;
                  break;
   }
   playerInstance.setup({
      file: url,
      skin: {
         name: "seven"
      },
      width: playerwidth,
      height: playerheight,
      autostart: true,
      tracks: [{
              file: url.substr(0, url.lastIndexOf(".")) + ".eng.srt",
              label: "English",
              kind: "captions",
              "default": true,
            },{
              file: url.substr(0, url.lastIndexOf(".")) + ".spa.srt",
              label: "Spanish",
              kind: "captions"
            }],
      captions: {
        color: '#FFFFFF',
        fontSize: 20,
        edgeStyle: "raised",
        backgroundOpacity: 0
      }
   });
   playerInstance.play();
}

function capitalizeEachWord(str) {
   var words = str.split(" ");
   var arr = Array();
   for (i in words) {
      temp = words;
      temp = temp.charAt(0).toUpperCase() + temp.substring(1);
      arr.push(temp);
      }
   return arr.join(" ");
}

function urlcaratulaserie(serie) {
   var base="/template/hfsflix/";
   switch(serie) {
      case "Better Call Saul": url="273181-g3"; break;
      case "Daredevil": url="281662-g6"; break;
      case "Dragon Ball Super": url="295068-g5"; break;
      case "Fear the Walking Dead": url="290853-g4"; break;
      case "Hardcore Pawn": url="183831-g2"; break;
      case "Homeland": url="247897-g21"; break;
      case "House of Cards": url="262980-g5"; break;
      case "Humans": url="292124-g2"; break;
      case "Manhattan": url="278468-g8"; break;
      case "Minority Report": url="295680-g4"; break;
      case "Mr. Robot": url="289590-g5"; break;
      case "Orange Is The New Black": url="264586-g7"; break;
      case "Orphan Black": url="260315-g8"; break;
      case "Saint Seiya Omega": url="257997-g"; break;
      case "Silicon Valley": url="277165-g5"; break;
      case "South Park": url="75897-g7"; break;
      case "The Walking Dead": url="153021-g43"; break;
      case "True Detective": url="270633-g7"; break;
      case "Under The Dome": url="264492-g4"; break;
      case "Vikings": url="260449-g16"; break;
   }
   return base+url+".jpg";
}

function urlcaratulamovie(movie) {
   movie = movie.replace(" [1080p]", "");
   var moviemod = movie.substring(0,movie.length-7);
   var year = movie.substring(movie.length-5,movie.length-1);
   moviemod=moviemod.split(' ').join('_');
   baseurl="http://s.ynet.io/assets/images/movies/";
   baseurlhttps="https://s.ynet.io/assets/images/movies/";
   if (moviemod==="Alien_DC") url = baseurl + "Alien_1979_Dir_Cut";
   else if (moviemod==="Alien_Resurrection_DC") url = baseurl + "Alien_Resurrection_1997_Special_Edition";
   else if (moviemod==="Alien_3_DC") url = baseurl + "Alien_3_1992_Special_Edition";
   else if (moviemod==="Aliens_DC") url = baseurl + "Aliens_1986_Special_Edition";
   else if (moviemod==="Babylon_A.D.") url = baseurl + "Babylon_A_D_EXTENDED_2008";
   else if (moviemod==="Big") url = baseurl + "Big_1988_Extended";
   else if (moviemod==="Blade_Runner") url = baseurlhttps + "Blade_Runner_1982";
   else if (moviemod==="Darkman") url = baseurlhttps+"Darkman_1990";
   else if (moviemod==="Dawn_of_the_Dead") url = baseurlhttps + "Dawn_of_the_Dead_UNRATED_2004";
   else if (moviemod==="Jaws") url = baseurlhttps + "Jaws_Quadrilogy_1975";
   else if (moviemod==="Paranormal_Activity_3") url = baseurlhttps + "Paranormal_Activity_3_2011_UNRATED";
   else if (moviemod==="Terminator_2_Judgment_Day") url = baseurlhttps + "Terminator_2_Judgment_Day_1991_DC";
   else if (moviemod==="Terminator_Salvation") url = baseurlhttps + "Terminator_Salvation_2009_DC";
   else if (moviemod==="The_Hills_Have_Eyes" || moviemod==="The_Hills_Have_Eyes_II") url = baseurlhttps + "The_Hills_Have_Eyes_duology_2006";
   else if (moviemod==="The_Ring" || moviemod==="The_Ring_II") url = baseurlhttps + "The_Ring_Duology_2002";
   else url = baseurl + moviemod + "_" + year;
   url = url + "/medium-cover.jpg";
   if (moviemod==="Sharknado_3_Oh_Hell_No") url = "https://s-media-cache-ak0.pinimg.com/736x/3d/2b/dd/3d2bddc6452e663cd0e4a054df3f9a47.jpg";
   return url;
}

function jsonomdbmovie(movie, year) {
   baseurl="http://www.omdbapi.com/?t=";
   jsonurl = baseurl + movie + "&y=" + year;
   if(movie==="Alien+3+DC") jsonurl=baseurl+"Alien%C2%B3&y=1992";
   if(movie==="Alien+DC") jsonurl=baseurl+"Alien&y=1979";
   if(movie==="Alien+Resurrection+DC") jsonurl=baseurl+"Alien+resurrection";
   if(movie==="Aliens+DC") jsonurl=baseurl+"Aliens";
   if(movie==="Kick+Ass") jsonurl=baseurl+"Kick-Ass";
   if(movie==="Legion") jsonurl=baseurl+"Legion";
   if(movie==="Saw+UNRATED") jsonurl=baseurl+"saw";
   if(movie==="Saw+II+UNRATED") jsonurl=baseurl+"saw ii";
   if(movie==="Saw+III+UNRATED") jsonurl=baseurl+"saw iii";
   if(movie==="Saw+IV+UNRATED") jsonurl=baseurl+"saw iv";
   if(movie==="Saw+V+UNRATED") jsonurl=baseurl+"saw v";
   if(movie==="Saw+VI+UNRATED") jsonurl=baseurl+"saw vi";
   if(movie==="Saw+VII+UNRATED") jsonurl=baseurl+"saw 3d";
   if(movie==="Sin+City+RECUT+EXTENDED+AND+UNRATED") jsonurl=baseurl+"sin city";
   if(movie==="Spider_Man_Trilogy") jsonurl=baseurl+"spider-man";
   jsonurl=jsonurl+"&plot=full&r=json";
   return jsonurl;
}

function mostrarcaratula() {
   var div = document.getElementById('poster');
   var x = document.getElementsByTagName('a');
   if(x[2].innerHTML === "Movies/" && x[3].innerHTML.indexOf("Filename") == -1) {
      var movie = x[3].innerHTML.substring(0,x[3].innerHTML.length-8);
      var year = x[3].innerHTML.substring(x[3].innerHTML.length-6,x[3].innerHTML.length-2);
      
      document.getElementById('poster').style.display='block';
         
      $.getJSON(jsonomdbmovie(movie.split(' ').join('+'),year), function(data) {
            imdb = "<table style='float:left'><tr><td style='vertical-align:top; padding-top:9px'><a href='http://www.imdb.com/title/"+ data.imdbID + "/' target='_blank'><img style='float:left; margin-bottom:20px;' src='" + urlcaratulamovie(movie+" ("+year+")") + "' \></a></td>";
            if(data.Title != undefined) {
               imdb = imdb + "<td style='vertical-align:top'><div style='float:left; padding-left:20px; text-align:left;'>"
               imdb = imdb + "<table><tr><td><span style='color:black; font-size:26pt'>" + data.Title + "</span>";
               imdb = imdb + "<span style='color:gray'> (" + data.Year + ")</span></td></tr>";
               imdb = imdb + "<tr><td><span style='color:gray'>" + data.Genre + "</span></td></tr></table><br\>";
               
               imdb = imdb + "<table><tr><td style='padding-right:20px'>Runtime</td>" + "<td><span style='color:gray'>" + data.Runtime + "</span></td></tr>";
               imdb = imdb + "<tr><td>Director</td>" + "<td><span style='color:gray'>" + data.Director + "</span></td></tr>";
               imdb = imdb + "<tr><td>Actors</td>" + "<td><span style='color:gray'>" + data.Actors + "</span</td></tr>";
               imdb = imdb + "<tr><td>Country</td>" + "<td><span style='color:gray'>" + data.Country + "</span></td></tr>";
               imdb = imdb + "<tr><td>Rated</td>" + "<td><span style='color:gray'>" + data.Rated + "</span></td></tr></table><br/>";

               imdb = imdb + "<table><tr><td>Plot</td></tr><tr><td><span style='color:dimgray'>" + data.Plot + "</span></td></tr></table><br/>";
               imdb = imdb + "<table><tr><td><img src='/template/hfsflix/imdb.png'\></td><td><span style='color:gray'>" + data.imdbRating + "</span></td>";
               imdb = imdb + "<td style='padding-left:20px'></td><td><img src='/template/hfsflix/metacritic.png'\></td><td><span style='color:gray'>" + data.Metascore + "</span></td></tr></table><br\>";
               
               imdb = imdb + "</div></td>"
            }
            imdb = imdb + "</tr>";
            div.innerHTML = imdb;
      });
   } else if(x[2].innerHTML === "Series/" && x[3].innerHTML.indexOf("Filename") == -1) {
      var serie = x[3].innerHTML.substring(0,x[3].innerHTML.length-1);
      div.innerHTML = "<img style='float:left; margin-bottom:20px;' src='" + urlcaratulaserie(serie) + "' \>";
      document.getElementById('poster').style.display='block';
   }
}

function listfolder(itemname, itemurl) {
   if(document.getElementById('titulo').innerText === "Home/Series/") {
      document.write("<a href='"+itemurl+"'><img class='img-zoom' style='float:left;' alt='"+itemname+"' src='" + urlcaratulaserie(itemname) + "' title='" + capitalizeEachWord(itemname) + "'\>");
   } else if(document.getElementById('titulo').innerText === "Home/Movies/") {
      document.write("<a href='"+itemurl+"'><img class='img-zoom' src='" + urlcaratulamovie(itemname) + "' alt='" + capitalizeEachWord(itemname) + "' title='"+ capitalizeEachWord(itemname) + "' \>");
   } else if(document.getElementById('titulo').innerText === "Home/") {
      if(itemname==="Movies") {
         document.write("<table><tr><td><a href='" + itemurl + "'><div style='float:left'><img class='img-zoom' src='/template/hfsflix/home-movies-icon.png' \></div></td>");
      }
      if(itemname==="Series") {
         document.write("<td><a href='" + itemurl + "'><div style='float:left'><img class='img-zoom' src='/template/hfsflix/home-tvshows-icon.png' \></div></td></tr>");
         document.write("<tr><td><center><span class=big style='color:black'>Movies</span></center></td>");
         document.write("<td><center><span class=big style='color:black'>Series</span></center></td></tr></table><br><br><br>");
      }
   } else {
      document.write("<tr><td class=row><a href='"+itemurl+"'><div style='float:left'>");
      document.write("<img align=top src='/template/hfsflix/folder_black.png'/></div>");
      document.write("<div style='margin-left:43px;padding-top:7px;'><b>" + itemname + "</b></div></a>");
   }
}

function listfiles(itemname) {
   if(document.getElementById('titulo').innerText === "Home/Series/") {
      document.write("<table>")
   } else if(document.getElementById('titulo').innerText === "Home/Movies/") {
      document.write("<table>");
   } else if(document.getElementById('titulo').innerText === "Home/") {
      document.write("<table>");
   } else {
      document.write("<br\><p align='center'><table cellpadding=6>");
      document.write("<th><a><span class=column>Filename</span></a><th><th>");
   }
}
</script>

<!-- HFS Macro Called defiend later at bottom... -->
%folder-comment%
%files%

</body>
</html>

[file]
{.switch|%item-ext%|,
|mkv|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/mkv.png" height="32" width="32"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick=""><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|avi|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/movie.png" height="32" width="32"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick=""><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|mp4|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/movie.png"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','video');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
|mp3|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/mp3.png"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','audio');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
/switch.}

-----------------
Title: Re: HFSFLIX
Post by: Colossus on November 18, 2015, 03:42:38 PM
Now that would all work well, if it worked well :P

I too am running into troubles... It seems the player sits on every page - which then breaks the rest of the coding.

There has to be a way to change that JWplayer without breaking the code!

Youve done a great job though thank you very much! Ill see if i can play around with it and get it to work.
Title: Re: HFSFLIX
Post by: Colossus on November 18, 2015, 04:39:30 PM
@Bmartino1

If i do not want the movies to point to the OMDB & IMDB but instead have the Movies Posters running from the path src=icons/movie/
 
What kind of code would i need to input? Im not too fancy with JS either.

If anyone could possibly script me in the right direction?!
Title: Re: HFSFLIX
Post by: bmartino1 on November 18, 2015, 08:24:27 PM
don't have time , working on it ...  will get back to you later  :( sorry

https://codepen.io/dudleystorey/pen/vnedg

Honestly, because i  would known the file paths, i would reload and make "playlist file", the playlist file would have the movie paths, and the play plays the video, you would skip to the next one to play....

Still working on rebuilding this template...

essential i'm repulidn g the java script the best i can with "flowplayer", as i know flow player will paly the all the file types...
http://flash.flowplayer.org/documentation/api/
https://flowplayer.org/latest/

unknown till completion
Title: Re: HFSFLIX
Post by: bmartino1 on November 22, 2015, 06:06:36 AM
https://drive.google.com/file/d/0B9u5dgydfOEuc2xFdnRxbGFlS0k/view?usp=sharing

This is as far as i'm going to go with this project...

I'm unable to get the javascirpt to run properly to transfer the "item url" form hfs to the path into the swf object


-----------
there is an error in this code :(

<!-- New video player here -->
<center>
<div id="oplayer" class="flowplayer" tabindex="0" ></div>
</center>
<!-- player container-->
<a href=""    class="flowplayer"
    style="display:block;width:600px;height:1280px;margin:10px auto"
    id="oplayer">
    </a>
<script>
$(document).ready(function(){
    $('.img-zoom').hover(function() {
        $(this).addClass('transition');
    }, function() {
        $(this).removeClass('transition');
    });
});
//take in data form onclick event
document.getElementById('oplayer').style.display='none';
function flowplayer(url, title, format) {
    var div = document.getElementById('playertitle');
    div.innerHTML = "<div style='margin-top:30px;'></div>" + title + "<div style='margin-top:70px;margin-bottom:70px'><hr style='border-color:red;'></div>";
    document.getElementById('oplayer').style.display='block';
    document.getElementById('playertitle').style.display='block';
// install flowplayer
$f("flowplayer", "/template/global/flowplayer/flowplayer-3.2.18.swf", {
    playlist: [
        '%item-url%'
]
}
// select first Flowplayer instance and enable embedding for it
.embed({
    // embedded player's width. by default this is the same as in the original player
    width: 600,
    // embedded player's height. by default this is the same as in the original player
    height: 1280,
    // absolute URL for the flowplayer.swf. by default the URL is the same as for the original player
    url: '/template/global/flowplayer/flowplayer-3.2.18.swf',
    // if you just want to embed a single clip from the playlist. 0 means use the first clip
    index: 0
});
$("oplayer").html($f().getEmbedCode(true));
</script>
<!-- New video player here -->
<br />

[file]
{.switch|%item-ext%|,
|mkv|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/mkv.png" height="32" width="32"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="oplayer('%item-url%','%item-name%','video');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|avi|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/movie.png" height="32" width="32"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="oplayer('%item-url%','%item-name%','video');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
<!-- can't paly yet -->
|mp4|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/movie.png"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','video');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
|mp3|
  <tr><td class=row>%new%<a href="%item-url%">
  <div style="float:left"><img align=top src="/template/hfsflix/mp3.png"/></div>
  <div style="margin-left:43px;padding-top:8px;color:black;font-weight:bold;">%item-name%</div></a><td class="row right" style="color:black;">%item-size%B
  <td class="row right"><a href="#" onclick="player('%item-url%','%item-name%','audio');"><img src="/template/hfsflix/play_netflix.png" width=32/></a>
/switch.}
-----------------------

so i'm going to turn this over to the form:
*a more experienced user will be need to accomplish this, the files and structure is there, jsut unable to figure out what i'm doing wrong...

tutorial i tired to folow:
https://flowplayer.org/docs/embedding.html
http://flash.flowplayer.org/plugins/javascript/embed.html

can also be done with swfobject: https://code.google.com/p/swfobject/wiki/documentation

I'm unable to continue working on this :(
Title: Re: HFSFLIX
Post by: rejetto on March 06, 2016, 06:42:40 PM
you have syntax errors, like the parenthesis of $f(
i think it's lost.
maybe the
]
}

was truly
]
})
Title: Re: HFSFLIX
Post by: rejetto on March 06, 2016, 06:43:13 PM
for the item-url, i guess you should change
playlist: [
        '%item-url%'

with
playlist: [
        url
Title: Re: HFSFLIX
Post by: klaxnek on March 26, 2016, 03:33:34 PM
Sorry for not answering all of you.

I built this template in order to stream videos from any browser (PC, mobile, ...). So I used jwplayer7 (https://www.jwplayer.com/) and I only used the JavaScript player (not the Flash .swf one).
As you can see in the code, I also planned to support audio files (.mp3), and in fact it is working. It was also my 1st javascript code... (sorry for that)

Internally I've updated jwplayer to latest version and when I enter to a movie to watch it, there is an error as you posted before (the triangle with exclamation mark). But when you click in the play button, the movie loads ok. I'll try to fix it.

I've only made 1 change to this template so far (yts.to went down). In hfsflix.tpl change these two lines:
baseurl="http://yts.ag/assets/images/movies/";
baseurlhttps="https://yts.ag/assets/images/movies/";

I'll try to answer all of you questions!
Title: Re: HFSFLIX
Post by: klaxnek on March 26, 2016, 03:49:57 PM

Im not quite understanding what to do with this? Put it in the same directory as the title *.mkv? run it then wait an hour?
Can you give a further explanation please :)

Thanks

Because jwplayer reads mp4 video files, you need to convert your mkv files to mp4.

Those are 2 batch files to convert mkv files to mp4 files. I attach them here.
- mkvdd2tomp4: Converts .mkv file with Dolby Digital 2.0 Audio to a .mp4 with Dolby Digital 2.0 Audio. It doesn't reencode, it's only a remux of the file.
- mkvac3tomp4: Converts .mkv file with Dolby Digital 5.1 Audio (AC3) to a .mp4 file with Dolby Digital 5.1 Audio (AC3). It reencodes the audio to 384kbps DD5.1

USE
1. Copy both files (mkvdd2tomp4.bat and mkvac3tomp4.bat) for example in C:\Windows
2. Copy ffmpeg.exe to C:\Windows (for example). You can download ffmpeg from here (select 32bit or 64bit, and download the 1st one, the static versions):
https://ffmpeg.zeranoe.com/builds/ (https://ffmpeg.zeranoe.com/builds/)
3. Then you go to your movie folder using a command prompt / terminal. Then execute mkvac3tomp4 or mkvddtomp4. Before you need to know if your mkv file has 5.1 or 2.0 audio.
4. Then you wait and it converts all the mkv files in that directory to mp4 files.
Title: Re: HFSFLIX
Post by: bmartino1 on March 27, 2016, 01:42:43 PM
Sorry for not answering all of you.

I built this template in order to stream videos from any browser (PC, mobile, ...). So I used jwplayer7 (https://www.jwplayer.com/) and I only used the JavaScript player (not the Flash .swf one).
As you can see in the code, I also planned to support audio files (.mp3), and in fact it is working. It was also my 1st javascript code... (sorry for that)

Internally I've updated jwplayer to latest version and when I enter to a movie to watch it, there is an error as you posted before (the triangle with exclamation mark). But when you click in the play button, the movie loads ok. I'll try to fix it.

I've only made 1 change to this template so far (yts.to went down). In hfsflix.tpl change these two lines:
baseurl="http://yts.ag/assets/images/movies/";
baseurlhttps="https://yts.ag/assets/images/movies/";

I'll try to answer all of you questions!

why not use flowplayer, as it uses javascript and can play all the file types!

http://flash.flowplayer.org/documentation/api/

i was jsut having a hard time reading your code for moving the item URL, and havn't had time to go back and re look at this.

Yes you can convert the video files, but htat takes too much time / can destory video qualti, etc.. and i would recomend any video convertor (its free)
http://filehippo.com/download_any_video_converter/

...
Title: Re: HFSFLIX
Post by: klaxnek on March 28, 2016, 04:05:42 PM
why not use flowplayer, as it uses javascript and can play all the file types!
I don't see that flowplayer supports mkv:
http://flash.flowplayer.org/documentation/installation/formats.html (http://flash.flowplayer.org/documentation/installation/formats.html)

It only supports as far I can see flv, mp4, mov, m4v and f4v.
If you find any other html5 player that supports mkv tell me.
Title: Re: HFSFLIX - If you find any other html5 player that supports mkv tell me
Post by: dj on March 28, 2016, 05:47:33 PM
try rename .mkv to .mkv.webm and open it with chrome
WebM is a variant of Matroska Container
Title: Re: HFSFLIX
Post by: bmartino1 on March 29, 2016, 01:33:00 PM
I don't see that flowplayer supports mkv:
http://flash.flowplayer.org/documentation/installation/formats.html (http://flash.flowplayer.org/documentation/installation/formats.html)

It only supports as far I can see flv, mp4, mov, m4v and f4v.
If you find any other html5 player that supports mkv tell me.

m-peg 4 is also a careir for the  mkv, that is defiend in mime types, and flash can play that...
quote form flowplaer "Flowplayer can handle virtually all formats which are supported by Flash."

https://helpx.adobe.com/flash/kb/supported-codecs-flash-player.html

flow player is jut the carier of the  file itself, the PC picks up mime types and plays them...

also known from another post i put up:
http://www.rejetto.com/forum/hfs-~-http-file-server/information-(mime-types)-embed-pdfsvideo-and-audio/

see mime types:
http://www.rejetto.com/forum/hfs-~-http-file-server/information-(mime-types)-embed-pdfsvideo-and-audio/?action=dlattach;attach=7601;image

mkv stsandard mime type is:
*.mkv video/x-matroska

as per DJ request: http://stackoverflow.com/questions/17018119/how-to-play-mkv-file-in-browser
you can chage to mimetype info to paly it via change the open soucre way
*.mkv mime to video/webm

....

if you want a basic test see this link with a mkv file, jsut add the html code in hfs defual and add the mime type:
http://sandbox.thewikies.com/vfe-generator/