Rockbox Development > Feature Ideas

Place Database on External Card When Available

(1/2) > >>

fduniho:
I'm using a SanDisk Clip Zip, which allows me to supplement its internal memory with external microSDHC cards. But I have more music than will fit on one card. So I sometimes need to switch cards. Each time I switch cards, I need to recompute the database from scratch if I want to browse the new card with the database.

This hassle could easily be eliminated with a small change to the code for saving and loading the database. When an external card is present, load the database from the card and save it to the card. When one isn't present, use the player's internal memory. This would allow each card to have its own database, so that when you switched cards, the player would load the right database without any need to recompute it, and if you took the card out, it would load a database that lists only the music still left in the player's internal memory.

Llorean:
You still need to determine if the music on internal storage has been changed since that card was last inserted, or if that card's music has been changed since Rockbox last updated its database. It's not as simple as it seems on first thought.

torne:
This has been suggested before. As well as Llorean's note that you still need to update the separate database files, currently the way the database indexes work would make this tricky to implement (since each index expects to have all the data from A to Z in order; having two indexes on different devices would probably mean reading both in parallel and merging them - a complexity the code doesn't have right now, and probably especially difficult for the case when the DB is not loaded to ram at boot).

It's a reasonable idea in principle, but the database code is complicated and understood by few people, so don't expect it to actually happen unless you implement it :)

fduniho:
What I'm suggesting is simpler than what you're describing. There should be no need to merge two databases. I am suggesting that when there is a card inserted, the player should ignore the database stored on the player's internal memory and just read and write the database from and to the external card. And when there is no card, it should read and write the database from and to the internal memory.

While my player's own firmware checks for changes each time I boot it up, Rockbox has not been doing that. I can create a database for one card, insert another without changing the database, then replace it with the previous card and still have the database for that card. For example, I was out exercising earlier with the card that has psy trance on it, but I didn't need to change the database, because I was using a previously created playlist. I just took that card out and put in the card with classical music, and the database still reflects what is on that card instead of the one I was last listening to. I'm not familiar with all the options in the database context menu, but I have mainly been using "Initialize Now" to create the database afresh. This creates a database of all the music on both the player itself and the card, and it apparently stores this database on the player. All I'm suggesting is a change in location of the full database file when a card is inserted. There would be duplication of information, but that's simpler than trying to merge two databases, which is not at all what I've been suggesting.

torne:
That has a different problem instead, which is that you'd need to update the database on *every card* when the music on the player has changed. It seems plausible, but there'd still need to be some changes to the database for it to be able to notice the card being removed and reload itself.

Navigation

[0] Message Index

[#] Next page

Go to full version