Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: igipop on April 30, 2020, 11:14:46 AM

Title: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: igipop on April 30, 2020, 11:14:46 AM
What is the expected and easiest way to be able to modify files on iPod via iTunes and at the same time keep/update the existing database in Rockbox?

I am using iTunes with iPod Video to sync my files.

Each time I add a file or delete a file in iTunes, when i switch back to Rockbox my database will most of he time Initialize and if not I do not see any new files.

Looking at the Rockbox manual the Auto-update function should take care of updating the database but in my case it is not and initializing to 12000 songs takes 10mins, removes all of my playcount data and I also have to update PictureFlow database. I tried backing up database files and restoring them, but then my changes to files are not reflected.

Seems like not possible to sync in iTunes and have database recognize added and deleted content which I do often.

Thanks!
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: igipop on May 06, 2020, 06:10:21 PM
I have noticed that in the latest code, there is a more limited set of database config params and Update Now worked (after a while) when adding songs in iTunes. However when removing songs from iTunes, the database had to be reinitialized as soon as Rockbox booted (maybe the song I deleted was in Playlist or something like that)?

Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Kotatsu on May 15, 2020, 06:27:16 AM
I'm having the same problem on my iPod Video  :'(. I tried to upload new music by simply dropping files in my custom folder but when selecting "update now"  the database had to be initialized. Other times it worked for a while but after a reboot the log "database is not ready" was shown and the database had to be initialized anyway. So I tried switching to disc mode and uploading music using iTunes, but the result didn't change. I've then tried switching to apple original firmware and again uploading music with iTunes and this time it worked. I'm going to try uploading something else via iTunes again and see if it keeps working. Anyway I think that when it comes to database the software is not super comfortable when  there is music in the "apple" folders and in other folders simultaneously on the iPod. As soon as I'll have time I'll try erasing all the music uploaded with iTunes and upload all my library in a custom folder aaand... see what happens :)

If someone has other ideas I would be very glad to know, thanks to everyone!!!  ;D
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Kotatsu on May 20, 2020, 05:12:40 AM
Hi everyone - I'm back!  ;D
So, I tried some different things. First I kept on adding music via iTunes (without any music on my custom folder \My Audio\). This, as I expected, worked well with the database update. Then I did a complete reset of my iPod, installed Rockbox again and tried to add music on my custom folder. It worked the first times, but when I added my whole 8000 songs library the database update started giving me issues again. The "Database is not ready" screen appeared every time i tried to update the database, so I was quite ready to resign myself to manage my music via iTunes. But then I decided to make one more try and install the rockbox develpement version (updated on 05/18) and surprisingly now the database update works. So Rockbox staff must have fixed this flaw!
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Kotatsu on May 23, 2020, 06:43:31 AM
I thought it was over, but turns out it wasn't! I still got that infamous "database not ready" screen even with the updated build. I kept on thinking about what could be the factor that triggers that behaviour, and I think it's the "load to RAM" option. When disabled, all the uploading and database updating process works fine. When enabled, after the first shutdown and restart it will ask to re-initialize the dabase. So maybe I found the weak point in the chain...
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: BlueGirl on August 22, 2020, 03:47:55 PM
I just installed Rockbox on my 1tb iPod. Everything went well, but I want to know how to update the music in the database. I downloaded a new CD to iTunes and in my folder in my PC indicates that it is there. When I plug in my iPod will it automatically update my database in Rockbox? Similar to “syncing” in iTunes? Does the database update according to new files on your computer?

Because I tried dragging my music into my iPod like a usb in a folder named: MUSIC however when I access that folder in files from Rockbox it only shows 1000 songs instead of my 19,000 I put in there - please help.
Just want access to all songs in Rockbox either through database or folders.
Thank you
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Frankenpod on August 22, 2020, 06:55:40 PM
You have to go into "settings" "general" "database" and tell it to update the database after adding new content.

Also if it doesn't show the full list under files it's probably because the max-files-to-show-in-list number is too low, you need to increase that number.  Can't remember offhand where the option is for that, but it's in a settings menu somewhere.

If your ipod is 1Tb it's presumably a flash mod, in which case it may have trouble updating or building the database due to the disk-writing issues with iflash mods.  But it might be OK, maybe the recent dev versions have fixed that?
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Vegbenz on September 13, 2020, 12:32:23 PM
I've gotten my rockbox to load on my 5.5g ipod running the stable 3.15 ver.  Each time i start the player i go to database and it says not initialized, i have it start to build the database, it seems to find all 6000 files, but doesn't move forward from there.  I have not been able to view the database yet since this install.  music files were loaded to a g:\rockbox\music folder
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Frankenpod on September 13, 2020, 12:54:08 PM
It might be worth trying to connect the ipod to the computer and then, from the computer, delete all the old database files before attempting to recreate the database again.  Sometimes when you get a corrupted database files the old files hang around and it keeps trying to rebuild from the same bad files.

 Is this a flash mod or original hd?  If the former it could be the usual iflash issue, if the latter it's possible it could be either a failing hd or just that rockbox itself is corrupted somehow.  Maybe update from 3.15 to the latest dev version?
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Vegbenz on September 13, 2020, 06:45:50 PM
This is an iflash dual with 256 gb SDXC card iPod 5.5g.

What do the database files look like?  When I search database I see just one that is database.ignore

I can try the new development, but i think i was getting the same issue earlier today when i was trying the new development.
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Frankenpod on September 14, 2020, 12:36:39 AM
see

https://forums.rockbox.org/index.php?topic=52910.0

But there's also a general problem with rockbox and iflash that means it isn't good at writing to the card, which means it may not be possible to build the database.  Later dev versions _might_ solve that.  You need to do both - delete the failed database files, and update to the latest rockbox dev version.

(I haven't tried the latest rockbox version - I build the database with the simulator on the PC and then copy it to the ipod)
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Vegbenz on September 14, 2020, 10:20:05 PM
thanks again Frankenpod.  It appears that I'm just having issues writing to the card, because there are no database files in my rockbox folders.  I tried loading the latest version of rockbox and still came up with the same error of no database built, and when I try to initialize it stalls at about 6000 files when I have 9000 loaded on the sdxc card. 
I'm going to try figuring out how to run a simulator and see if i can build and transfer a database.  any tips there are appreciated, i'm running windows 10 on my desktop.
Title: Re: Database updates when adding or deleting new content (iPod Video in iTunes)
Post by: Frankenpod on September 15, 2020, 03:11:54 AM
Afraid I don't know I have the energy to explain the whole process.  But (a) you need to have your music folders in the exact same format on both the PC and the ipod (which I do because I copy the entire music library across), and (b) you need to look up how to create 'hard links' (windows shortcuts won't work).  [or maybe they are 'soft links' - either way, it needs a more direct kind of link to your music folder than a shortcut]