Hi!
I have my media on a network share. I have a directory structure like
\\server\mp3\lowquality
\\server\mp3\highquality
\\server\mp3\lossless
Netjukebox thinks all my artists are called highquality
More then one media dir
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
This shouldn't be a problem when using the directory structure like this:
http://www.netjukebox.nl/filestructure.php
Here is an example:
As you can see the last directory represent the album.
And the second last directory represent the artist.
I think you have only one directory after lowquality, highquality and lossless.
So you have to insert a directory with the artist name.
A similar discussion, multiple directory's with NTFS HardLinks:
http://forum.lan/viewtopic.php?t=41
http://www.netjukebox.nl/filestructure.php
Here is an example:
Code: Select all
\\server\mp3\lossless\Moby\1999 - Play\01 - Honey.flac
\\server\mp3\lossless\Moby\1999 - Play\02 - Find my baby.flac
\\server\mp3\lossless\Moby\1999 - Play\etc…
And the second last directory represent the artist.
I think you have only one directory after lowquality, highquality and lossless.
So you have to insert a directory with the artist name.
A similar discussion, multiple directory's with NTFS HardLinks:
http://forum.lan/viewtopic.php?t=41
Hi wbartels, thanks for your answer.
You are correct, I only have one directory after "lowquality". Exampel:
\\server\mp3\lossless\Moby - 1999 - Play\01 - Honey.flac
I really don't want to change the structure, first of all I've had it for years so I'm used to it. Second, I have more then 1500 folders like this, it will take some time.
Is there any other way to get around this other then changing the file structure?
You are correct, I only have one directory after "lowquality". Exampel:
\\server\mp3\lossless\Moby - 1999 - Play\01 - Honey.flac
I really don't want to change the structure, first of all I've had it for years so I'm used to it. Second, I have more then 1500 folders like this, it will take some time.
Is there any other way to get around this other then changing the file structure?
- wbartels
- netjukebox developer
- Posts: 881
- Joined: Thu Nov 04, 2004 3:12 pm
- Location: Netherlands
- Contact:
Netjukebox need a directory per album (for creating an id) witch you have.
So it must be possible to change the code for your directory structure.
The directory structure will be updated in the database by the update.php script.
In netjukebox 3.80b this is done between line 668 and 741.
change to
Now you only need to edit between line 674 and 686 to retrieve:
$artist_alphabetic, $album, $year and $month
Maybe someone with good knowledge of regular expression can help you with that.
Good luck,
Willem
So it must be possible to change the code for your directory structure.
The directory structure will be updated in the database by the update.php script.
In netjukebox 3.80b this is done between line 668 and 741.
Code: Select all
$artist_alphabetic = $temp[count($temp) - 2];
$album = $temp[count($temp) - 1];
Code: Select all
$artist_album = $temp[count($temp) - 1];
$artist_alphabetic, $album, $year and $month
Maybe someone with good knowledge of regular expression can help you with that.
Good luck,
Willem
I'm afraid this is way over my php skills. I found the lines you mentioned, deleted them and replaced it with the artist_album line, but then update didn't really seem to work anymore so I gave up since I had no idea what I was doing anyway.
Is there anyone out there that already did these changes and can give me a detailed description on how to change this. Or even better, share their update.php file.
Is there anyone out there that already did these changes and can give me a detailed description on how to change this. Or even better, share their update.php file.
it's a bit late and not that easy for me, so i'll try to give you a short description of how it could actually work...
changing the code to
won't do you any good, you need something that splits up
$temp[count($temp) - 2];
it should contain something like "Artist - Year - Album" depending on your directory structure...
supposing that all of your dirs are formed that way, you need a regex like
([a-zA-Z0-9]* - ([0-9]{4})? - [a-zA-Z0-9]*) to split the dir name into something usable.
(or you just try it with explode... explode('-', $temp[count($temp)-2]);)
your code should look like that:
i know...it's crap but it should work...i'm too tired now to write a complete solution for your problem, but it's pretty easy...
changing the code to
Code: Select all
$artist_album = $temp[count($temp) - 1];
$temp[count($temp) - 2];
it should contain something like "Artist - Year - Album" depending on your directory structure...
supposing that all of your dirs are formed that way, you need a regex like
([a-zA-Z0-9]* - ([0-9]{4})? - [a-zA-Z0-9]*) to split the dir name into something usable.
(or you just try it with explode... explode('-', $temp[count($temp)-2]);)
your code should look like that:
Code: Select all
$fetch_data = explode('-', $temp[count($temp)-2]);
$artist_alphabetic = $fetch_data[2];
$album = $fetch_data[0];