Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tamplan committed Jan 21, 2012
0 parents commit 7842d06
Show file tree
Hide file tree
Showing 358 changed files with 64,891 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
application/config/config.php
application/config/autoload.php
application/config/database.php
application/config/routes.php
application/config/xbmc.php
application/logs/*.php
assets/images/*
3 changes: 3 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RewriteEngine on
RewriteCond $1 !^(index\.php|assets/images|assets/scripts|assets/styles|assets/gui|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
34 changes: 34 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Why this tool?
- changing database informations on the NAS with no need to have XBMC or clients on (from work, school, vacation ...)
- Learning the CodeIgniter framework and some tips with JQuery.

The requirements are the followings:
- clients can be turn on windows or linux system
- the server MUST turn on a linux system ONLY
- you need a php server like apache on your server
- XBMC is yet using a mysql database and a folder to centralise Thumbails images
- Check the user of your mysql server can create database
- the sources can be samba share folders but i have made only tests with mounted file system by nfs.
- I assume you use a folder on the server to centralise the thumbnails.

How to install the application:
- download the archive and uncompress it in a folder on the server (typically '/var/ww').
- browse to http://SERVER_IP and follow the four step of the wizard.
- connect to http://SERVER_IP and login (username and password are xbmc) and configure the sources in the administration part of the applicaton to indicate the correspondence between client paths and server paths.
- add a new user account with the credentials you want.

Note: the wizard make a symbolic link to the thumbails folder to access directly the images accross the application.

How to use the application:
- No need to use the application and XBMC at the same time!
- if not logged in, you only can browse between the media (movies, sets, tvshows, actors/actress)
- the application makes his own thumbails in poor quality for the navigation.
- if logged in and can change images, the first time you consult a media page (movie, set or tvshow), the application download ALL the images to choose one, [B]be patient![/B]. You can upload images too.
- if logged in and can infos, you can modify movie order in set, add/delete sets, change tagline and overview.
- download button are not implemented yet
- you can refresh data only for movies for the moment.
- home and dashboard are unfinished for the moment.

I don't manage the music for the moment, sorry.

I hope this long post is correctly written and the application useful, there is a lot of work to perform the application.
1 change: 1 addition & 0 deletions application/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deny from all
1 change: 1 addition & 0 deletions application/cache/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
10 changes: 10 additions & 0 deletions application/cache/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

</body>
</html>
42 changes: 42 additions & 0 deletions application/config/constants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ', 'rb');
define('FOPEN_READ_WRITE', 'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE', 'ab');
define('FOPEN_READ_WRITE_CREATE', 'a+b');
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');

define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

/* End of file constants.php */
/* Location: ./application/config/constants.php */
97 changes: 97 additions & 0 deletions application/config/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// Video file extensions
// Do NOT change
$video_extensions[] = 'm4v';
$video_extensions[] = '3gp';
$video_extensions[] = 'nsv';
$video_extensions[] = 'ts';
$video_extensions[] = 'ty';
$video_extensions[] = 'strm';
$video_extensions[] = 'rm';
$video_extensions[] = 'rmvb';
$video_extensions[] = 'm3u';
$video_extensions[] = 'ifo';
$video_extensions[] = 'mov';
$video_extensions[] = 'qt';
$video_extensions[] = 'divx';
$video_extensions[] = 'xvid';
$video_extensions[] = 'bivx';
$video_extensions[] = 'vob';
$video_extensions[] = 'nrg';
$video_extensions[] = 'img';
$video_extensions[] = 'iso';
$video_extensions[] = 'pva';
$video_extensions[] = 'wmv';
$video_extensions[] = 'asf';
$video_extensions[] = 'asx';
$video_extensions[] = 'ogm';
$video_extensions[] = 'm2v';
$video_extensions[] = 'avi';
$video_extensions[] = 'bin';
$video_extensions[] = 'dat';
$video_extensions[] = 'dvr-ms';
$video_extensions[] = 'mpg';
$video_extensions[] = 'mpeg';
$video_extensions[] = 'mp4';
$video_extensions[] = 'mkv';
$video_extensions[] = 'avc';
$video_extensions[] = 'vp3';
$video_extensions[] = 'svq3';
$video_extensions[] = 'nuv';
$video_extensions[] = 'viv';
$video_extensions[] = 'dv';
$video_extensions[] = 'fli';
$video_extensions[] = 'flv';
$video_extensions[] = 'rar';
$video_extensions[] = '001';
$video_extensions[] = 'wpl';
$video_extensions[] = 'zip';

// Movie stacking
// Do NOT change
$movie_stacking[] = "(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[0-9]+)(.*?)(\.[^.]+)$";
$movie_stacking[] = "(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck]|d)[ _.-]*[a-d])(.*?)(\.[^.]+)$";
$movie_stacking[] = "(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$";

// Clean date time
// Do NOT change
$clean_date_time = "(.+[^ _\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9][0-9]|20[0-1][0-9])([ _\,\.\(\)\[\]\-][^0-9]|$)";

// Clean strings
// Do NOT change
$clean_strings[] = "[ _\,\.\(\)\[\]\-](ac3|dts|custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multisubs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|r3|r5|bd5|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|hrhd|hrhdtv|hddvd|bluray|x264|h264|xvid|xvidvd|xxx|www.www|cd[1-9]|\[.*\])([ _\,\.\(\)\[\]\-]|$)";
$clean_strings[] = "(\[.*\])";

// Tvshow matching
// Do NOT change
$tvshow_matching[] = "\[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)([^\\/]*)";
$tvshow_matching[] = "[\._ \-]([0-9]+)x([0-9]+)([^\\/]*)";
$tvshow_matching[] = "[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)([^\\/]*)";
$tvshow_matching[] = "[\._ \-]([0-9]+)([0-9][0-9])([\._ \-][^\\/]*)";
$tvshow_matching[] = "[\._ \-]p(?:ar)?t[._ -]()([ivxlcdm]+)([\._ \-][^\\/]*)";

// Tv multipart matching
// Do NOT change
$tv_multipart_matching = "^[-_EeXx]+([0-9]+)";

// Trailer matching
// Do NOT change
$trailer_matching[] = "(.*?)(_Trailer)(\.[^.]+)$";

// Exclude from scan
// Do NOT change
$exclude_from_scan[] = "-trailer";
$exclude_from_scan[] = "[-._ \\/]sample[-._ \\/]";

// Exclude tvshows from scan
// Do NOT change
$exclude_tvshows_from_scan[] = "[-._ \\/]sample[-._ \\/]";

// Fanart
// Do NOT change
$fanart[] = "fanart.jpg";
$fanart[] = "fanart.png";

/* End of file default.php */
/* Location: ./application/config/default.php */
15 changes: 15 additions & 0 deletions application/config/doctypes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'
);

/* End of file doctypes.php */
/* Location: ./application/config/doctypes.php */
64 changes: 64 additions & 0 deletions application/config/foreign_chars.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|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|Ǘ|Ǚ|Ǜ/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u',
'/Ý|Ÿ|Ŷ/' => 'Y',
'/ý|ÿ|ŷ/' => 'y',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž/' => 'Z',
'/ź|ż|ž/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/'=> 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f'
);

/* End of file foreign_chars.php */
/* Location: ./application/config/foreign_chars.php */
16 changes: 16 additions & 0 deletions application/config/hooks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| http://codeigniter.com/user_guide/general/hooks.html
|
*/



/* End of file hooks.php */
/* Location: ./application/config/hooks.php */
10 changes: 10 additions & 0 deletions application/config/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

</body>
</html>
39 changes: 39 additions & 0 deletions application/config/library.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// Video file extensions
// Do NOT change
$video_extensions_added = array();
$video_extensions_removed = array();

// Movie stacking
// Do NOT change
$movie_stacking_before = array();
$movie_stacking_after = array();

// Clean strings
// Do NOT change
$clean_strings_before = array();
$clean_strings_after = array();

// Tvshow matching
// Do NOT change
$tvshow_matching_before = array();
$tvshow_matching_after = array();

// Exclude from scan
// Do NOT change
$exclude_from_scan_before = array();
$exclude_from_scan_after = array();

// Exclude tvshows from scan
// Do NOT change
$exclude_tvshows_from_scan_before = array();
$exclude_tvshows_from_scan_after = array();

// Fanart
// Do NOT change
$fanart_added = array();
$fanart_removed = array();

/* End of file library.php */
/* Location: ./application/config/library.php */
Loading

0 comments on commit 7842d06

Please sign in to comment.