Request -  Database access / exporting
I understand from what I read and past conversations regarding the intentions of keeping tMM simple and to the point. So please hear me knowing I want to keep with that intent. I understand that the database is not a typical database in format, you cannot just open it in an SQL editor. I use both tMM and Trakt to store and organize my data. I have been using as a means of backing up Trakt data and obtaining the data for further looking and corrections. Trakt is not open, and users do not really have access to their data.

Without a solid database to use, I prefer to keep a master database of sorts local, so should something happen to Trakt nothing is lost for me. Previously, I used Kodi for this. The database, although having its issues, was fully manageable and changes could be done within Kodi or within a standard SQL query tool. For a while, this was nice. I have since dropped Kodi for many reasons, none of which are relevant, and have replaced Kodi with a combination of tMM and VLC. My only real issue is a lack of a database, well, one that can be managed and queried.

So I am looking for ways I might be able to access the data, independent of tMM. I looked into the export tools, but was unable to locate anything where I can obtain a 'data dump'. Understanding there is not a typical database structure, there is still structured data. Is there some way I might be able to dump ALL data in its stored structure, where I might be able to import elsewhere to query? At this time, I am looking for export from tMM only... although an import after changes would be nice Smile I understand the issues that could pose though, and I understand the tMM database was not designed with that type of interaction in mind.
well, yes, fairly good reason - but hard to archieve :|

We're using this as our database system.
It's not a conventional database, more an object storage.
Even with SQL access, you would find NO tables, and NO columns, just an BLOB array of JSON objects (with variable structure).

Dunno if there are tools to open such DB, but its quite an easy task for a developer.
In fact, there's already a hidden method, to dump a movie from the DB to logfile.
But i'm unsure, what you can do with such json dumps.... since, we always keep a fair amount of DB backups in backups folder....
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
[Image: project_thin_badge?format=gif]
Thanks for the info. I had already found the link you sent to MVStore /, based on a prior post. Only thing I am not understanding is the statement of not having structured data. It would seem to me that the data must be structured if you can query a movie and populate a screen with data, the same way each time... and modify that data. Sure you could just wipe the whole thing and create a whole new entry (vs updating a piece), but you can still find the data associated to a specific movie and place that data into named fields.

But if I am to understand what you are saying, I can work with JSON output as it is basically a database entry of its own, well, similar. When I use the export feature in tMM and use Excel or CSV, I can easily use that data, since again, CSV type like this are essentially database ready data. All I would really need is something like the Excel export template, but instead of only pulling three data pieces, pull all data pieces in the database and the name of the GUI field that data populates. With this, I can easily create a database in something more manageable (like mysql, mssql, sqlite, etc) and just to a periodic import from CSV.

The problem with the tMM database, for me, is the data is unusable except for tMM. There is no real way to view the data with ease or do anything with the data that is not done directly by tMM. One example I mentioned is comparing Trakt data to tMM data. Hope that makes sense. I really do not like to open such data files as corruption is too easy as there are no protections for anything.
as you might know we do have many 1:n relations in our data model (movie:actor, movie:image, movieset:movie, ...) which lead us not to use a relational database structure (ORM from java objects to database tables is complicated/huge; database engines are not lightweight and we do not even have a benefit from such a structure).
So we decided to follow a document-orientated database model ( ) with eager loading (so everything is always in memory, since the data in memory does not need many space). we store the serialized object data in a json representation where we can put deep/nested objects without a problem.
e.g. a dump of the movie bolt:

all I can imagine is to provide a way (exporter) to export the json contents, but importing is not in our focus yet..
tinyMediaManager - THE media manager of your choice - available for Windows, Mac OSX and Linux
Help us translate tinyMediaManager Weblate
[Image: 1qbFVy]
(2018-07-06, 07:42)mlaggner Wrote: all I can imagine is to provide a way (exporter) to export the json contents
This would be close to exactly what I am looking for. As I mentioned before, there is already an export option for Excel, where I get a spreadsheet with three pieces of data for each movie. How can I expand that to all fields, not just three? Meaning, there are a list of fields for each movie in the GUI. How can I get an output of that data, each movie being in its own row? Same as the current Excel export option, but not just those three fields?

I have tried many ways to get data from the movies.db file, and nothing works at all. I tried SquirrelSql and h2 download for the browser based console downloaded from their web site with the most effort, and neither of them have been able to produce any sort of actual data. I understand tMM wants simplicity, which is why I am trying to just get the data out and use it elsewhere. What I am wanting to accomplish is very similar to what many others are also doing, but one difference is I am opting for tMM which is adding a complication that the others I an taking ideas from do not have. I see no issue with this, given a good option to get a data export. It is easy enough to work with it from there. Honestly, not all the pieces of data are of use, I just thought it would be easier to do a full data dump vs asking for a specific custom  list of things. I can take care of all that given a raw data dump.... if that makes sense.
you can easily adopt the export templates to your needs:
if you search in this forum, you may find some threads where more examples for exporting are (e.g. )

writing your own jmte template for exporting will have the option to access _all_ fields of tmm and transforn it to your needed structure Wink
tinyMediaManager - THE media manager of your choice - available for Windows, Mac OSX and Linux
Help us translate tinyMediaManager Weblate
[Image: 1qbFVy]
Ok, I did look at that a bit, but will review more. It seems there is really no other way of accessing the data than to use such methods. I was hoping for a way to pull data without the need to go through tMM, but this will be fine too. I will play around and report back, since others may have a use if I can get this working to my vision.
I have looked at the custom export templates, and it turns out that it is way easier than I expected. That is my error as I let my disliking of java cloud my actions a bit. Using the packaged template for Excel, it is more than easy enough to get a data dump of relevant data. It is now quite easy to import a tMM export and a Trakt export into SQLite and query data.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Database access / exporting00