Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Is there a practical way to have several distinct music libraries on one device?
« previous next »
  • Print
Pages: [1]

Author Topic: Is there a practical way to have several distinct music libraries on one device?  (Read 376 times)

Offline iPodVT

  • Member
  • *
  • Posts: 102
Is there a practical way to have several distinct music libraries on one device?
« on: December 02, 2022, 08:56:48 PM »
I'm wondering if there is a way for me to maintain multiple distinct music libraries - each in its own directory and employing the database - on a single 5th, 6th, or 7th Gen iPod running Rockbox, and be able to switch back and forth between libraries at least somewhat readily without having to rebuild the database each time?  Ideally, it would be great if I could somehow put the selection of a specific library 'above' a single unified database so that when I entered into the database menus I would see only the tracks from that selected library.  I'm guessing that isn't possible given Rockbox's current architecture, and so my mind starts going somewhat "Rube Goldberg".

The only projected scheme I have come up with so far would be to install multiple ".rockbox" directories with only one actually named exactly ".rockbox" at any given time (of course).  I would then initially have to progressively rename and boot into each of those installation directories and place the database.ignore files such that only one specific music library would be used for each installation's database build.  After setting all of that up (only once in a very great while, I hope...) the question becomes how do I most easily rename the installation directories in order to reboot into the one I want?  The only solution I have for that is to boot the iPod into Disk Mode, connect to a computer and rename the outgoing and incoming installation directories, and then reboot back into Rockbox.  That is obviously a very awkward and inconvenient way to make the transition, and completely unfeasible while doing something like riding a bus.

I have a vague recollection of reading something somewhere about maintaining multiple Rockbox installations on a single device, but I can't find it.

Does anyone here have any suggestions for improvements to my harebrained scheme (including "give it up")?

After this topic I will try to go quiet for a while and give everyone (especially the developers) a break....
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 880
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #1 on: December 03, 2022, 01:08:25 AM »
well with multiboot it is certainly an option to keep several distinct installs but the ipod doesn't have sdcards so I doubt it is multiboot aware

but the database is pretty simple after building the DB have a look in the .rockbox directory
there should be around 12 files database.ignore, database.idx and 10 more numbered 0-9 database_n.tcd

if you switched these in that would be all the database info
now if you can do that on the fly IDK you'd have to experiment, I suspect you might be able to copy them in and out and update but likely you'd need to reboot each time

you could pretty easily write a small lua plugin to do the swapping for you
 
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 880
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #2 on: December 03, 2022, 01:21:31 AM »
the other way would be to use the Tagcache https://www.rockbox.org/wiki/TagcacheDBFormat

with the tagnav file you can do custom search and such like to include files with the genre Classical
or even several different criterion

https://www.rockbox.org/wiki/DataBase#tagnavi.config_v2.0_Syntax

and I already have a lua script to do custom items on the fly see plugins/demos/lua_scripts/tagnav.lua

it has all the fields in the tagcache imported from the tcd files and you can choose them then combine them with OR AND NOR, NAND
to make a custom list in the tagnav by selecting 'Save to Tagnav'

then reboot once and now under 'custom view' in the database your 'custom filter' will be there along with Reload.. so you can do it without rebooting next time

Note: you'll have to update to newer than todays dev version as the functionality was broken when I tested it
« Last Edit: December 03, 2022, 07:42:42 AM by Bilgus »
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 269
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #3 on: December 03, 2022, 05:58:09 AM »
ipodVT - I have a patch locally that allows you to change what directory the database stores its files in. The catch is you can only change the setting by writing a .cfg file by hand and you have to reboot before it takes effect. I have multiple RB versions on the same SD card (multiboot) and this saves me having to rebuild the database when I update to a new build.

I haven't posted the patch on Gerrit - I figured it wasn't really that useful especially with those 2 caveats. But I'll merge it today anyhow, in case you want to try it.

To make it work you have to create a .cfg file to change the setting and load it from the file browser. Then reboot.
Code: [Select]
database path: /path/to/your/database
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 880
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #4 on: December 03, 2022, 07:44:29 AM »
I think they are looking for the opposite several databases to one install
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 269
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #5 on: December 03, 2022, 07:55:16 AM »
It'll work for that too, just create one folder for each database. The downside is you need to reboot to switch databases.

Customizing the tag browser won't require a reboot, so it's probably a better option.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 102
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #6 on: December 03, 2022, 06:34:52 PM »
Thanks again for the attention being paid to my query.

I think for now I will start off by trying amachronic's patch (when it becomes available) as I think the time investment for me to get a grip on customizing the tag browser is more than I can handle right now.  I am pretty slow at absorbing a lot of programming details.  I did previously successfully create a tagnavi_custom.config file to hang a small "Custom Genre By…" tree of submenus off "Database->Custom view…", and several months ago I did a bunch of theming for my own personal use, but that all took me a ton of time that I can't afford again right now.

I'm also trying to get a handle on how to use "Select directories to scan" as it seems like it would be a very useful tool for what I'm trying to do with the multiple music libraries, but I can't figure out how to manipulate it to make it specify my choice of directories, and the only documentation I can find on it is two brief forum topics from about ten years ago - neither of which are very enlightening to me.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 102
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #7 on: December 03, 2022, 10:39:20 PM »
Haha - now I see how to operate the mechanism of "Select directories to scan", and also the syntax of its resulting setting in config.cfg.  Now if only I could make a shortcut to it...
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 880
Re: Is there a practical way to have several distinct music libraries on one device?
« Reply #8 on: December 04, 2022, 01:52:01 AM »
check out the lua tagnav plugin its less involved than all of that
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Is there a practical way to have several distinct music libraries on one device?
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.038 seconds with 18 queries.