Hello, great script. it has all the features that i want and have been looking for. looks like a great active community too!
one question that i have is with regards to the directory structure.
can i extract artist and album and date from the main folder name?
i keep all of my media in one main directory. and keep the same naming structure for all albums. it looks like this
/media/artist - album (200x) [FLAC]/xx - songname.flac
an example would be
/media/3 Doors Down - Seventeen Days (2005) [FLAC]/01 - Right Where I Belong.flac
only problem is the script tags this as artist "media" and album name "3 Doors Down - Seventeen Days (2005) [FLAC]"
you can undoubtedly see my dilemma, i can also not search for "3 doors down" but when i search for "media" it brings up ALL of the albums that do not have sub directories.
i have a few albums with multiple disks that take the form
/media/artist - album (200x) [FLAC]/cd1/xx - songname.flac
/media/artist - album (200x) [FLAC]/cd2/xx - songname.flac
at this point the "cd1" will be the name of the album and "artist - album (200x) [FLAC]" will be the name of the artist.
this is then shows up in a search
i have poked around in the code a little but i seem to break it more than i get it to do what i want. makes for quite a few reinstalls.
any points or tips would be greatly appreciated.
also, i many of the album art is folder.jpg, is there any way to add this?
Directory Structure
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Re: Directory Structure
All data from the directory structure will be added/updated by update.php.Dxpert wrote:Hello, great script. it has all the features that i want and have been looking for. looks like a great active community too!
one question that i have is with regards to the directory structure.
can i extract artist and album and date from the main folder name?
i keep all of my media in one main directory. and keep the same naming structure for all albums. it looks like this
/media/artist - album (200x) [FLAC]/xx - songname.flac
an example would be
/media/3 Doors Down - Seventeen Days (2005) [FLAC]/01 - Right Where I Belong.flac
only problem is the script tags this as artist "media" and album name "3 Doors Down - Seventeen Days (2005) [FLAC]"
you can undoubtedly see my dilemma, i can also not search for "3 doors down" but when i search for "media" it brings up ALL of the albums that do not have sub directories.
i have a few albums with multiple disks that take the form
/media/artist - album (200x) [FLAC]/cd1/xx - songname.flac
/media/artist - album (200x) [FLAC]/cd2/xx - songname.flac
at this point the "cd1" will be the name of the album and "artist - album (200x) [FLAC]" will be the name of the artist.
this is then shows up in a search
i have poked around in the code a little but i seem to break it more than i get it to do what i want. makes for quite a few reinstalls.
any points or tips would be greatly appreciated.
This is actually done by the function: FileStructure()
The directory structure will be added between line 665 and 773
The code above these lines is for the cover art and thumbnails.
The code below these lines is for the Track names.
Don't forget to look here, this is how the directory/files are interpreted.
http://www.netjukebox.nl/filestructure.php
This should already be working after an update config > updateDxpert wrote: also, i many of the album art is folder.jpg, is there any way to add this?
Image for the thumbnails | update.php | Line 594-603:
Code: Select all
if (file_exists($dir . '/image.jpg')) $source_image = $dir . '/image.jpg';
elseif (file_exists($dir . '/image.png')) $source_image = $dir . '/image.png';
elseif (file_exists($dir . '/image.gif')) $source_image = $dir . '/image.gif';
elseif (file_exists($dir . '/folder.jpg')) $source_image = $dir . '/folder.jpg';
elseif (file_exists($dir . '/folder.png')) $source_image = $dir . '/folder.png';
elseif (file_exists($dir . '/folder.gif')) $source_image = $dir . '/folder.gif';
elseif (file_exists($dir . '/cd_front.jpg')) $source_image = $dir . '/cd_front.jpg';
elseif (file_exists($dir . '/cd_front.png')) $source_image = $dir . '/cd_front.png';
elseif (file_exists($dir . '/cd_front.gif')) $source_image = $dir . '/cd_front.gif';
elseif (filemtime($file[0]) == $bitmap['filemtime']) $source_image = $file[0];
Code: Select all
if (file_exists($dir . '/cd_front.jpg')) $cd_front = $dir . '/cd_front.jpg';
elseif (file_exists($dir . '/cd_front.png')) $cd_front = $dir . '/cd_front.png';
elseif (file_exists($dir . '/cd_front.gif')) $cd_front = $dir . '/cd_front.gif';
else $cd_front = '';
if (file_exists($dir . '/cd_back.jpg')) $cd_back = $dir . '/cd_back.jpg';
elseif (file_exists($dir . '/cd_back.png')) $cd_back = $dir . '/cd_back.png';
elseif (file_exists($dir . '/cd_back.gif')) $cd_back = $dir . '/cd_back.gif';
else $cd_back = '';
my php is well, you will see.
my directory structure on the drive is /media/artist - album (year) [Flac]/0x - track.flac
i also dont know how i am going to deal with the few albums that are of the form
/media/artist - album (year) [Flac]/cd1/0x - track.flac
$temp = DecodeEscapeCharacters($dir);
$temp = explode('/', $temp);
$album = $temp[count($temp) - 1];
$year = 'NULL';
$month = 'NULL';
$temp = explode(' ', $album);
$year = $temp[count($temp) - 2];
$year = substr($year, 1, 4);
$temp = explode(' - ', $album);
$artist_alphabetic = $temp[0];
$temp = explode(' ', $temp[1], -2);
$album = implode(" ", $temp);
$artist = $artist_alphabetic;
my directory structure on the drive is /media/artist - album (year) [Flac]/0x - track.flac
i also dont know how i am going to deal with the few albums that are of the form
/media/artist - album (year) [Flac]/cd1/0x - track.flac
$temp = DecodeEscapeCharacters($dir);
$temp = explode('/', $temp);
$album = $temp[count($temp) - 1];
$year = 'NULL';
$month = 'NULL';
$temp = explode(' ', $album);
$year = $temp[count($temp) - 2];
$year = substr($year, 1, 4);
$temp = explode(' - ', $album);
$artist_alphabetic = $temp[0];
$temp = explode(' ', $temp[1], -2);
$album = implode(" ", $temp);
$artist = $artist_alphabetic;