Page 1 of 1

Subsonic Interface - Folder Listing Management

PostPosted: Fri Apr 06, 2012 4:17 pm
by rgranados80
Hello Subsonic Forum Members!

This is my first post and hopefully not the only one. :) I've started this thread after searching the forums to an inconvenience I've recently come across. I currently host my music collection via this folder structure: [path]/genre/artist/album/track.

I have, for the most part, every genre of music I want on the server but recently came across an instance where I wanted to start listening to something new. I have managed my folder listing via alphabetical & numerical order and this new genre fell into the middle of the existing folder structure. (i.e. "Music - Pop" and "Music - Rock" already existed and I want to add "Music - R&B") [included a photo of the folder list I'm describing]
subsonic_example.jpg


The only way I knew to make these changes was to go to the GUI and create a new entry at the bottom of the folder list and moving the previous last folder entry to this new slot, and essentially moving all other folders above it one slot down. This was incredibly time consuming and with enough copy paste actions from human hands -- you can imagine -- could lead to mistakes in Subsonic Folder Titles and actual paths to that data. [included another photo displaying where the work was done]
subsonic_example2.jpg


Is there a back-end that could be manipulated to allow for folders to be reorganized? Any help will be greatly appreciated!

[Isn't Subsonic AMAZING!? :D]

Re: Subsonic Interface - Folder Listing Management

PostPosted: Fri Apr 06, 2012 10:20 pm
by BKKKPewsey
If you use within db.view (Use forum search for details)
Code: Select all
Select * from music_folder

You can see the database structure so it may be possible to write a script to manipulate the entries.

I had a similar problem to you as I use an alphabetical folder structure and missed out the letter "N"
Whats happened to all my Nightwish & Nirvana albums :shock:
Yes could have been worse eg letter "A" :roll:

As you are using a genre based folder structure I would suggest that you add "dummy" folders between the real ones.
Then when you need to add a genre you can just edit that entry and enable it.
:mrgreen:

Re: Subsonic Interface - Folder Listing Management

PostPosted: Wed Apr 11, 2012 6:39 pm
by rgranados80
BKKKPewsey wrote:If you use within db.view (Use forum search for details)
Code: Select all
Select * from music_folder

You can see the database structure so it may be possible to write a script to manipulate the entries.

I had a similar problem to you as I use an alphabetical folder structure and missed out the letter "N"
Whats happened to all my Nightwish & Nirvana albums :shock:
Yes could have been worse eg letter "A" :roll:

As you are using a genre based folder structure I would suggest that you add "dummy" folders between the real ones.
Then when you need to add a genre you can just edit that entry and enable it.
:mrgreen:


First off -- I'm sorry I didn't reply back to you sooner BKKKPewsey -- so first and foremost, "Thank You" for taking the time to read and reply. :)

I'm sorry I'm going to sound like I a complete imbecile on the forums -- but if I don't ask the question I won't ever learn. I took the time to do the searches you recommended on the forums for anything that indicated "db.view" and found a quite a few hits that led me to password resets and advice on how to get back into admin accounts. These were all helpful but I unfortunately was still lost. :(

It wasn't until I logged in as the admin on the server and noted that within the URL -- I'm located at "index.view". It was at this point I decided to change that to "db.view" and was brought the query window you had described! :D (yay!) This is exactly what I was looking for as you can see below.

Code: Select all
Result
ID   PATH   NAME   ENABLED   CHANGED
1   /media/Media3/Music/Upload   Upload   true   2012-03-22 14:14:18.958
2   /media/Media2/Media/Movies   Movies   true   2012-03-22 14:14:18.958
3   /media/Media2/Media/Movies-Animated   Movies - Animated   true   2012-03-22 14:14:18.959
4   /media   place holder   false   2012-03-22 14:14:18.959
5   /media/Media3/TV   TV   true   2012-03-22 14:14:18.959
6   /media/Media2/Media/Anime/Movies   Anime - Movies   true   2012-03-22 14:14:18.96
7   /media/Media2/Media/Anime/TV   Anime - TV   true   2012-03-22 14:14:18.96
8   /media   place holder   false   2012-03-22 14:14:18.96
9   /media   place holder   false   2012-03-22 14:14:18.96
10   /media/Media3/Music   Music   true   2012-03-22 14:14:18.961
11   /media/Media3/Music/50's   Music - 50's   true   2012-03-22 14:14:18.961
12   /media/Media3/Music/60's   Music - 60's   true   2012-03-22 14:14:18.961
13   /media/Media3/Music/70's   Music - 70's   true   2012-03-22 14:14:18.961
14   /media/Media3/Music/80's   Music - 80's   true   2012-03-22 14:14:18.962
15   /media/Media3/Music/90's   Music - 90's   true   2012-03-22 14:14:18.962
16   /media/Media3/Music/Alternative   Music - Alternative   true   2012-03-22 14:14:18.962
17   /media/Media3/Music/Chick Music   Music - Chick Music   true   2012-03-22 14:14:18.962
18   /media/Media3/Music/Classical   Music - Classical   true   2012-03-22 14:14:18.963
19   /media/Media3/Music/Comedy   Music - Comedy   true   2012-03-22 14:14:18.963
20   /media/Media3/Music/Country   Music - Country   true   2012-03-22 14:14:18.963
21   /media/Media3/Music/Dance   Music - Dance   true   2012-03-22 14:14:18.964
22   /media/Media3/Music/Disco   Music - Disco   true   2012-03-22 14:14:18.964
23   /media/Media3/Music/Electronic   Music - Electronic   true   2012-03-22 14:14:18.964
24   /media/Media3/Music/Hip Hop   Music - Hip Hop   true   2012-03-22 14:14:18.964
25   /media/Media3/Music/Jazz & Blues   Music - Jazz & Blues   true   2012-03-22 14:14:18.965
26   /media/Media3/Music/Lounge   Music - Lounge   true   2012-03-22 14:14:18.965
27   /media/Media3/Music/Metal   Music - Metal   true   2012-03-22 14:14:18.965
28   /media/Media3/Music/New Age & Ambient   Music - New Age & Ambient   true   2012-03-22 14:14:18.966
29   /media/Media3/Music/Pop   Music - Pop   true   2012-03-22 14:14:18.966
30   /media/Media3/Music/Rap   Music - Rap   true   2012-03-22 14:14:18.966
31   /media/Media3/Music/R&B - Soul   Music - R&B - Soul   true   2012-03-22 14:14:18.966
32   /media/Media3/Music/Rock   Music - Rock   true   2012-03-22 14:14:18.967
33   /media/Media3/Music/Soft Rock   Music - Soft Rock   true   2012-03-22 14:14:18.967
34   /media/Media3/Music/Soundtracks   Music - Soundtracks   true   2012-03-22 14:14:18.967
35   /media/Media3/Music/Techno   Music - Techno   true   2012-03-22 14:14:18.968
36   /media/Media3/Music/World   Music - World   true   2012-03-22 14:14:18.968


My issue now is -- and please forgive my ignorance here -- I'm not sure what the name of the database I'm doing this query against and I don't know how to modify this database. :(

The paths in that result advertise that I'm running in a Linux environment and the folder that subsonic is installed to is "/var/subsonic" but I'm totally not familiar with modifying databases and I'm most certainly not familiar with any tools I might use to make the modifications to the database when I need to. I'd like to have this kind of versatility though as I only just started to breakdown the folders into genres that make me content for now -- but I may transition how the library is managed so that it could reflect an alphabetical listing as opposed to genre.

I really appreciate the time that anybody has dedicated to reading this rambling and appreciate any support.

Thanks! :mrgreen:

Re: Subsonic Interface - Folder Listing Management

PostPosted: Wed Apr 11, 2012 11:41 pm
by BKKKPewsey
Sorry I didn't post any direct links - they were not to hand at the time and you now have found out how bad the search function is within phpbb :(
Modifying the database is above my paygrade with anything as complicated as this - so you may need to wait for someone with greater understanding of sql to answer.
As you can appreciate modifying the SS database directly can be a very risky business especially if you don't know what you are doing :roll:

:mrgreen:

Re: Subsonic Interface - Folder Listing Management

PostPosted: Wed Apr 11, 2012 11:47 pm
by rgranados80
Haha! I like the cut of your jib BKKKPewsey -- and I appreciate your honesty. This is something that would be really convenient (as you may already know) and I think would be a worthy subject for review from the senior Subsonic Forum Members.

In any event -- thank you for your response thus far -- and we'll just have to wait and see. :P

Re: Subsonic Interface - Folder Listing Management

PostPosted: Thu Apr 12, 2012 4:02 am
by GJ51
You might want to post a similar post in the mods section as most of the guys who would have the skills you need help with would be likely to see it.