I‘m using plex for movies and TV shows and now also want to move my music (from iTunes) to it.
I searched a lot but unfortunately Plex does not have an importing function (would make it a soooo much easier decision).
Well, I will try to push meta information to ID3 Tags and then import the files…
BUT if I do so, all songs will be shown as added on the same day.
I know that this has to be changed directly in the Database via sqliteBrowser, but which tables/fields do I have to change?
I would like to set the date-added to the date the file was created in the file system.
You will have to do some additional joins to get from the imported files/paths, which are in media_parts.file, back up to the correct metadata_items row.
I hoped to get some hints hear and achieve it with some basic SQL-Knowledge. What I can read from your answers it seems a lot more difficult then I thought before.
I haf a brief look at some fields of the library.
For some test songs, I put to my plex server, it seems that media_items.updated_at Is the same like the Date_modify in the file system.
There are 2 scenarios you need to be aware of. When creating a new library, Plex will use the file/folder dates for the added_at date. This way you won’t have everything appear as new. However, adding additional content to the library will always use the current date for added_at. The update_at is similar, but that’s not really used for anything so it’s not as important.
I’ve done this for Windows, but not for QNAP. Basically I used a scripting program that can ready the file/folder dates then called individual SQL commands to update each entry in the database.
@anon18523487:
By “file/folder dates” you mean the creation date or the update date?
I tried to move my whole music, located on a windows PC, to my NAS with Plex running on it. This didn‘t work cause the creation date is set to the date I copied th files…
I just copied everything, maybe it is better to put everything to a zip-file before?!
I also tried to build a new library with my iTunes xml. In this case a new database called iTunes.db was created beside my library.db
In this I found a Field containing the dates I added the files to iTunes. This would be exactly what want to have for an “importing-from-iTunes” function but I couldn’t find a date-added-to-Plex-field I this DB.
Where is this date stored?
I believe it’s the creation date but I’d have to double check.
I don’t remember this database. I think that’s a temp database. Either way, Plex doesn’t import everything and I don’t believe the import date is one of those fields used. You could use this for this project, which does make it easier.
Could you please check this. From what i tried so far i think its not the creatione date (birth date) cause when i import my music to plex, some files older files at the beginning. Maybe i recently changed the ID3 tags at this files. so it seems plex uses Date changed/modified.
In this case i would try to export the itunes import dates and set the dates on files system befor a build the new library.
Would you share our windows script?
When i look at the timestamps, the itunes.db is not only a temporary db during library setup. In my case the last access was a few days ago but the lib setup was in June.
if i want to go with the database and manipulating the timstamps after the songs were importet in plex: Which are the right filds? is it only metadata_items.added_at or is it stored somewhere else?