•   
  • 1
  • 39
  • 40
  • 41(current)
  • 42
  • 43
  • 45
  •   
MovieLib - Your movie database on web
Great loading times stay short, and now also the left pane is okay again.

Would it be possible to cut the cast and the story in the overview to make it more compact?
Reply
It is still not perfect. When you switch to tvshows you see all genres, studios etc.on left panel from both (movies and tvshows).

I speparated actor table. Try this function:
Code:
function panels_array($columns, $table) {
    
    $sep_tab = array('genre', 'country', 'studio', 'director');
    $panels_array = array();
    foreach ($columns as $val) {
        if (in_array($val, $sep_tab)) {
            $sel = 'SELECT DISTINCT ' . $val . '.id, ' . $val . '.' . $val . ' FROM `' . $val . '`, `' . $table . '_' . $val . '` WHERE ' . $val . '.id=' . $table . '_' . $val . '.' . $val . 'id ORDER BY ' . $val . '.' . $val;
            $res = mysql_q($sel);
            while ($r = mysqli_fetch_assoc($res)) {
                $panels_array[$val][$r['id']] = $r[$val];
            }
        } else if ($val == "actor") {
            $sel = 'SELECT ' . $val . '.id, ' . $val . '.' . $val . ' FROM `' . $val . '` ORDER BY ' . $val . '.' . $val;
            $res = mysql_q($sel);
            while ($r = mysqli_fetch_assoc($res)) {
                $panels_array[$val][$r['id']] = $r[$val];
            }
        } else {
            $sel = 'SELECT DISTINCT `' . $val . '` FROM `' . $table . '` WHERE `hide` = 0 ORDER BY `' . $val . '`';
            $res = mysql_q($sel);
            if (mysqli_num_rows($res) > 0) {
                while ($r = mysqli_fetch_assoc($res)) {
                    if ($r[$val] != '') {
                        $panels_array[$val][] = $r[$val];
                    }
                }
            }
        }
    }
    if (isset($panels_array['year'])) { rsort($panels_array['year']); }
    
    return $panels_array;
}


I will add option to cut cast to choosen count of actors.
Reply
I didnt had a problem in TVShow view.

Nevertheless, tried the code but now i see no left panels at all. Not in Movies or TVShows.
So i revert back
Reply
Check again please. This function that you use not distinguishes media type (movie or tvshow) and generate panels for both. Probably you have panels with identical content on both sites. That means for example when you don't have any tvshow from 2017 year but you have that movie so there is a empty filter year in the left panel on tvshow view.

edit: Sorry for tvshows is only genre panel. Check on it.

My last fix is for php7 and mysqli becouse i change it and testing. This is for old version:

Code:
function panels_array($columns, $table) {
    
    $sep_tab = array('genre', 'country', 'studio', 'director');
    $panels_array = array();
    foreach ($columns as $val) {
        if (in_array($val, $sep_tab)) {
            $sel = 'SELECT DISTINCT ' . $val . '.id, ' . $val . '.' . $val . ' FROM `' . $val . '`, `' . $table . '_' . $val . '` WHERE ' . $val . '.id=' . $table . '_' . $val . '.' . $val . 'id ORDER BY ' . $val . '.' . $val;
            $res = mysql_q($sel);
            while ($r = mysql_fetch_assoc($res)) {
                $panels_array[$val][$r['id']] = $r[$val];
            }
        } else if ($val == "actor") {
            $sel = 'SELECT ' . $val . '.id, ' . $val . '.' . $val . ' FROM `' . $val . '` ORDER BY ' . $val . '.' . $val;
            $res = mysql_q($sel);
            while ($r = mysql_fetch_assoc($res)) {
                $panels_array[$val][$r['id']] = $r[$val];
            }
        } else {
            $sel = 'SELECT DISTINCT `' . $val . '` FROM `' . $table . '` WHERE `hide` = 0 ORDER BY `' . $val . '`';
            $res = mysql_q($sel);
            if (mysql_num_rows($res) > 0) {
                while ($r = mysql_fetch_assoc($res)) {
                    if ($r[$val] != '') {
                        $panels_array[$val][] = $r[$val];
                    }
                }
            }
        }
    }
    if (isset($panels_array['year'])) { rsort($panels_array['year']); }
    
    return $panels_array;
}
Reply
Looks good with the last code.
Reply
v. 2.9.0 relased

changes:
- fixed code for PHP 7 (mysqli)
- added hevc codec
- collapse too long story
- view episodes for single season
- setting for limit displaying actors
- improved performance

To update replace all files without install.php and do not delete db.php and cache folder then go to admin.php to update tables.

Now if you click on specific season in tvshow view this show only episodes available for this season. This reduce load large page if tvshow have many sesons.
Reply
Hi Regss you did amazing work.
I just found the time to update to 2.9.1, just skipping 2.9.0.

The page now completely loads in 1.45sec (PHP7), with PHP5.6 it was 1.6sec.

Really amazing when i think i started with 14.5sec.

Btw i have just been throwing something in your tip jar ;-)
Reply
Any idea what could cause this notice?
Notice: Undefined variable: img_flag_atype in /var/www/movielib/index.php on line 644

Only appears on some movies.
Reply
Yes, I now. I fix it in new release.
Reply
Great another thing i noticed.
Would it be possible to embed the trailers using https instead of http?
This would eliminate mixed contents warning when using movielib via TLS.

I look at the code but i couldnt figure out what happens there, and a simple chang at line 679 didnt do the trick.

Btw. would anybody like a simple write down on how to get movielib running using nginx?
Reply
Hi, with the latest Version I get this error. I run it on a Qnap NAS. If I load "login.php" direct i can enter my password and everything works.

Notice: Undefined index: logged in /share/CACHEDEV1_DATA/Web/movielib/index.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /share/CACHEDEV1_DATA/Web/movielib/index.php:37) in /share/CACHEDEV1_DATA/Web/movielib/index.php on line 38
Can't redirect to login.php
Reply
Try open index.php in text editor and check first line that no have any character before <?PHP

Maybe when you copy this file your system convert this text file to another encoding and add byte order mark (BOM) to this file.
Reply
there is no character before <?PHP and adding BOM did not help.
My Qnap has PHP 5.6.29.
I had a version maybe 3 Month old (dont know the version) and everything was fine. 1 h ago I updated to 2.9.1 and I got the error.
Reply
All files must be without BOM. Make sure that it is not.

You can edit index.php and start from first line and adding code line by line up to the line 38:
Code:
header('Location:login.php');
and every time open http://host/movielib/index.php to check that redirect perform. maybe in other included files is a problem.

in the worst case, you repeat this 38 times Smile
Reply
(2017-03-13, 22:30)darkside40 Wrote: Great another thing i noticed.
Would it be possible to embed the trailers using https instead of http?
This would eliminate mixed contents warning when using movielib via TLS.

I look at the code but i couldnt figure out what happens there, and a simple chang at line 679 didnt do the trick.

Btw. would anybody like a simple write down on how to get movielib running using nginx?

The URLs to youtube trailers stored in KODI started with https?
Reply
  •   
  • 1
  • 39
  • 40
  • 41(current)
  • 42
  • 43
  • 45
  •   
 
Thread Rating:
  • 8 Vote(s) - 4.63 Average



Logout Mark Read Team Forum Stats Members Help
MovieLib - Your movie database on web4.638