Use Synology's Video Station Database with OSMC

Hi, I have a Synology Ds218play where I store all my movies, TV shows and music. This NAS is connected to my router with an ethernet connection and so is my Vero 4K+.
(I’m new to OSMC so sorry if this is a noob question.)
I managed to add my movies and TV shows to the Vero thru NFS and OSMC created a DB right on. The problem is not every movie is correct, there are plenty of mistakes in the TV series.
Is there a way to use the Synology’s DB with OSMC?
I don’t know how or where it is stored inside the NAS nor how can I import it to OSMC.
Has anyone managed to do this?

------------------------------------------------------------------------EDIT-------------------------------------------------------------------

Hardware and software:
Synology NAS - DS218play - DSM 6.2.1
Vero 4K+ - OSMC August update

I have my nas setup so that whenever I add a movie/TV show/music it automatically adds it to the database. That database is generated by Synology’s Video Station ans Audio Station. Those apps use Postgres.
I have my OSMC connected to my nas thru NFS and the content playback works great but whenever I try to organize it the options given aren’t quite like Synology’s and are much harder to change. Also, being based on Kodi, OSMC uses MySQL.
What I want is for my OSMC to use the information in the database created by Synology’s apps.
Besides doing the conversion manually is there anyway I can automate the process or connect them directly?
Can Synology create MySQl (or MariaDB) databases instead of Postgres?
Is there any plug in that allows OSMC to support Postgres?
Has anyone created a program that can convert Postgres to MySQl in this specific case? (for example using python that can run on Synology’s units)
Is there a plug in that automatically connects Synology and OSMC/Kodi?
Is there any other way to do this?
If not is it possible that it may be added this feature in any side of this platforms?

Thanks in advanced.

This has been posted in:
Synology’s forum
OSMC’s forum
Synology’s subreddit
OSMC’s subreddit
Kodi’s subreddit

Synology Video Station uses Postgres as its database, which is not supported by Kodi.

The only thing I can think of would be to use a MySQL database for Kodi on the Vero 4K+, then dump the Postgres database from the Synology and import it into a different MySQL database. After that, you’d have to examine the data collected by the Synology and see how you can get that converted into the fields that Kodi expects in its database.

HeidiSQL might help in this, as you could instead just connect to the Synology Postgres database and the Kodi MySQL database at the same time, and use the “Export table as SQL” feature to directly copy from Postgres to MySQL.

1 Like

For the Kodi database on a Synology, install MariaDB 10 and phpMyAdmin. Use phpMyAdmin to create a Kodi user, and then configure your advancedsettings.xml file to point to your Synology IP port 3307. I am running a Vero4k+ pointed at a Synology DS3617xs as my cifs data source (no NFS). I’m using fstab /mnt file mounts, not SMB mounts. This allows me to move the file share in fstab without modifying the database. OSMC Vero4k+ with Synology is the ultimate Kodi setup.

1 Like

I’ve tried this and just realised that it’s not what I want.
This allows me to store my DB on synology.
What I want is to use the DB generated by synology’s video station in OSMC.
whenever I add a movie or TV show to my nas it is indexed and added to video station adding it to a DB. I want to use the information on that DB in my OSMC.

Not possible.

Hardware and software:
Synology NAS - DS218play - DSM 6.2.1
Vero 4K+ - OSMC August update

I have my nas setup so that whenever I add a movie/TV show/music it automatically adds it to the database. That database is generated by Synology’s Video Station ans Audio Station. Those apps use Postgres.
I have my OSMC connected to my nas thru NFS and the content playback works great but whenever I try to organize it the options given aren’t quite like Synology’s and are much harder to change. Also, being based on Kodi, OSMC uses MySQL.
What I want is for my OSMC to use the information in the database created by Synology’s apps.
Besides doing the conversion manually is there anyway I can automate the process or connect them directly?
Can Synology create MySQl (or MariaDB) databases instead of Postgres?
Is there any plug in that allows OSMC to support Postgres?
Has anyone created a program that can convert Postgres to MySQl in this specific case? (for example using python that can run on Synology’s units)
Is there a plug in that automatically connects Synology and OSMC/Kodi?
Is there any other way to do this?
If not is it possible that it may be added this feature in any side of this platforms?

Thanks in advanced.

This has been posted in:
Synology’s forum
OSMC’s forum
Synology’s subreddit
OSMC’s subreddit
Kodi’s subreddit

You’ll need to use a MySQL database for Kodi library functionality.

Alternatively you may be able to get similar functionality through the use of DLNA which I suspect your NAS will support.

Sam

1 Like

OSMC seems unable to recognise my NAS

What does this mean? You’ve already stated that they are connected by NFS and able to share the media.

I’ve merged your topics as they seem to be directly related to the same subject.

As advised previously, this is not possible.

  1. OSMC seems unable to recognise my NAS using DLNA as suggested

  2. This is possible. That’s not the question.
    It is possible to migrate Postgres to MySQL so this is also possible.
    The question is how is this possible? or besides converting the databases has anyone achieved this?

I’m currently working on a script to convert Postgres to MySQL using python so I can achieve this (I can run python on the nas).
I’ll just wait a bit more to see if anyone has tried it yet or found other solution.

The purpose of my post is to find a sollution or create one if it’s not already one.
The is not possible thing doesn’t convince me. It may not have been done. Now, don’t say that it can’t.

Best bet will be to create a Kodi scraper that pulls information from whatever API the NAS presents over the network. This will be much more robust than converting databases and fits right in with the typical flow of adding new media to Kodi.

Kodi 18 adds the ability to create scrapers in Python so you don’t need to practice black magic to build an XML scraper, but the only documentation is the demo scrapers so it will still take some exploration.

This is all open source so pretty much anything is possible if you put in the work - not possible means it’s not possible without additional development work, and as the vast majority of people making requests aren’t interested in doing this work themselves it effectively is not possible right now for them.

1 Like

IMO. you’re going about this the wrong way. While it might technically be possible to mirror a PostreSQL database onto MySQL/MariaDB, that’s just making things unnecessarily complicated.

I really don’t understand what you’re getting at. You can’t change the way Kodi works by changing the underlying database engine, even assuming it were possible, which it isn’t. (And FYI Kodi uses sqlite3 by default.)

Yes. Keep It Simple. Create a share of the media files on the Synology device, allow OSMC to see it, and let Kodi scan the files and create its own database, using either sqlite3 or MySQL/MariaDB.

Doing anything else is unlikely to work and just doesn’t make a lot of sense.

3 Likes

I am able to play my media. That’s not the issue. The issue is that I have everything organized in my NAS with the information stored in a postgres database.
As I access it with OSMC/KODI it analizes my files and creates a database of its own. This database has wrong information.
What I want is to have everything organized so I can see my movies and TV shows with the right titles, subtitles, posters, etc. As I have on my nas.

The situation is simple: my files are on my nas. I can access them directly from the nas or thru OSMC. With OSMC they are mislabeled, in the nas they are not.

This seems to be a scraper issue. If you can crack this problem, then having two separate databases shouldn’t be an issue.

I really don’t think you’ll make much headway either with Kodi reading from PostgreSQL or getting a MySQL mirror of PostgreSQL. While either might be technically possible, I’d have thought that it would be more productive to focus on why you are getting mislabelled films.

Possible, but more likely a file naming issue. The link below provides the appropriate actions to take to resolve the issue.

https://kodi.wiki/view/Incorrect_and_missing_videos

1 Like

In addition, the table structure used by the Synology is almost certainly different from what is used by Kodi. So, mirroring/copying/importing into a MySQL database with the same structure as the Synology Postgres database won’t really help getting the data into Kodi.

I’ve done a lot of work creating shell scripts that add data to the Kodi database and the main tables (movie and tvshow) are relatively easy (once you get past the fact that only a couple of the fields have meaningful names)…it’s the related tables (the *_link tables) that are the problem.