Jump to content

Migrating from SQL


FLHTHEMI

Recommended Posts

FLHTHEMI

Is there a wiki on migrating from MySql to emby? 

 

I figure I need to remove mysql related lines from my advanced settings xml file and probably need to remove all the file sources from Kodi. What else needs attended to prior to installing the emby server and kodi addon? 

Link to comment
Share on other sites

DruTheFu

Looking to migrate from MySQL to Emby, am I able to install and configure the Emby Server prior to installing and configuring the Emby Kodi Add-On without any negative effects on my current libraries?  Then when it's time to migrate, clear all MySQL references and sources and install/configure the Emby Add-On?

 

What I'm trying to accomplish is pre-stage my Emby deployment so when the time is available to make the switch, it will be less downtime.

 

Thanks

Link to comment
Share on other sites

xnappo

You guys think a like :)

 

I would set up the Emby server first - make sure you are happy with how all the meta-data and organization looks.

 

Then rename your Kodi 'userdata/Database' directory and launch Kodi.   This will make a new database and you can try out Emby for Kodi. 

 

You will also have to changed advancedsettings.xml and your sources.xml to remove any mySQL and native scraper setups.

  • Like 1
Link to comment
Share on other sites

FLHTHEMI

I installed it and I  like it. First I backed up my entire roaming/kodi folder after exiting kodi. Then renamed advancedsettings.xml so it would no longer be used. Then installed the Emby Server and set it up as best I could. Then I installed the emby addon and it worked pretty much flawless. 

 

Now I  need to learn how to access it from outside my home network... A little more reading should get me going. 

Link to comment
Share on other sites

Angelblue05

To access your Emby outside your home network - Just make sure sure you open the port in your router. In your Emby dashboard, under server information it will list what your external address is.

Link to comment
Share on other sites

uspider7

Thanks for the tip, I was using mySQL to sync the watched status and metadata, so no NFO's were being created on the media folders, but a quick Library Export on Kodi created the NFO files which could then be used in Emby Server.  Now to try it on my "production" enviroment, since it worked so well during my tests.

 

If all works well, I can finaly get rid of Windows/Media Center.

  • Like 1
Link to comment
Share on other sites

jmh2002

I have sucessfully migrated to Emby, at least for testing purposes, and even have remote access working.

 

However, I have one important question in particular:

 

- mySQL used to sync ALL of the video data contained in the MyVideosXX.db, meaning that not only did your Movie Collection get syncd, but also any other video that was played, from any other Kodi addon (eg: YouTube and many more such addons, etc, etc).

 

However Emby only seems to be syncing videos from plugin://plugin.video.emby/. Of course this is probably by design but for those of us who are used to MySQL syncing everything, it's a pity to miss out on this ability to keep all our devices up to date with each other with regard to these streaming addons.

 

Im new to Emby so please feel free to tell me if I have missed something somewhere, or if maybe this feature is in development?

 

THANKS :)

Edited by jmh2002
Link to comment
Share on other sites

xnappo

Check out the Emby channels,  while we can't sync native Kodi addons a lot of the Emby channels provide the same content and are synced.

Link to comment
Share on other sites

jmh2002

Oh thats a pity, and maybe even a deal breaker for me. Its not even planned for future development?

 

I was hoping emby would mimic this basic functionality too, since the rest of Emby is 1000 times further ahead of a mySQL setup.

 

I took a look at the Plugin Channels and unless Im missing something they don't seem to offer almost anything similar to (legal) Kodi addons, so Im not sure how they can be helpful.

 

Isnt Emby reading the MyVideos90.db (or does it only write to it)? Cant all of the entries in this .db therefore be syncd by Emby too? This is what provides the video addon syncing via mySQL, there is no interaction with the native addons themselves.

 

I would appreciate if you could consider this for future development. I think more people will start to find they are missing this after migrating from mySQL.

 

As a side note, can Emby run alongside a mySQL setup on Kodi now that emby doesn't modify advancedsettings.xml?

 

Thanks for your time :)

Edited by jmh2002
Link to comment
Share on other sites

Deihmos

I can't recall mysql synching anything from an add-on and if it did it isn't something I noticed or would miss. AFAIK it only did your music and videos. Either way addons isn't something I care about and with mysql there is no easy way to keep things separated by profiles.

Edited by Deihmos
Link to comment
Share on other sites

jmh2002

Watched and Resume status is what I'm speaking about. So if I watch a video clip in the YouTube addon (or PBS, or DIY, or HGTV, or any of the dozens of video addons available for Kodi) then both the Watched and the Resume status is syncd across all my devices. This is basic and needed functionality really with multiple devices.

 

This data is written to the MyVideos90.db so I was rather hoping that Emby would read this too and sync it to the Emby server, so that it would totally replace mySQL, in addition to adding the supercharged Emby features :)

Edited by jmh2002
Link to comment
Share on other sites

FLHTHEMI

I still have MySQL running. It's keeping my Favourites shared across all devices. I simply removed:

 

 <videodatabase>
 <type>mysql</type>
 <host>192.168.1.67</host>
 <port>3306</port>
 <user>xxxxx</user>
 <pass>xxxxx</pass>
 </videodatabase>

 

<musicdatabase>
 <type>mysql</type>
 <host>192.168.1.67</host>
 <port>3306</port>
 <user>xxxxx</user>
 <pass>xxxxx</pass>
</musicdatabase>

 

From my advancedsettings.xml

 

In regards to working outside my home network, your suggestion:

 

===============

To access your Emby outside your home network - Just make sure sure you open the port in your router. In your Emby dashboard, under server information it will list what your external address is.

===============

 

I never see it display any IP other than my local IP. It does say there are 2 ports to use 8096 and 8920. I'm supposed to open 8920 in my router? I can get my external IP from my router.

 

Once I have that done do I have to use an app or program to access? Can it be accessed via 4Glte for a test from an outside connection?

 

Better yet, how about a link to something that explains all this so I don't have to keep pestering you with what has probably been explained elsewhere that I can't seem to find?

Edited by FLHTHEMI
Link to comment
Share on other sites

jmh2002

Hi FLHTHEMI, nice to see you here too ;)

 

If you remove the 'videodatabase' code from mySQL it wont sync the watch and resume status that i mentioned above. However I do agree in principle that it seems possible to run both, and mix and match some functionality, although Im not sure its useful. Are you sure you have favourites syncd via mySQL? I think that might be via path substitution instead?

 

With regards to having Emby work outside the home, I too setup this up and had it working in a few minutes, but i must admit I was familiar with the general idea from previous attempts with mySQL. Emby is 1000 times easier in this respect but there are still a few points to note:

 

* You need a static ip address to your home. Many internet providers provide a dynamic one (even if it seems static, it will change with a modem/router reboot, etc - you see many people say "I had it working and all of a sudden it stopped").

 

I found the easiest way to get a static ip address was to use the free service from no-ip. I set this up and gave it a name and i have an ip address called "thenameichose.no-ip.biz". THIS is what you should enter in the emby Settings > "Primary Server Address" in kodi (and 8096 as the Port Number) to enable remote access.

 

Now, no-ip is basically a redirect service. They check what your dynamic ip address is and redirect to that. So you either need to configure your router DynDNS to use "no-ip" (ie: to send the dynamic ip to them regularly - many routers have this feature built in) or you can download a free program to install on windows which keeps no-ip updated with your dynamic ip address.

 

* With most setups like this you also need to have a static ip to your server on your home network, although maybe emby is smart enough to figure this out (I thought i saw some mention of this). In any case I have a static ip set anyway.

 

* You need to open the relevant ports so that your remote device can enter your home network from a remote location. You do this by setting a new rule in the NAT section of your router to open port 8096.

 

* You need to have sharing of your media correctly enabled on your home network. Probably this is already setup if you previously used mySQL. If you have a Username and Password to access the computer where the media is stored then you need to enter this in Emby Settings > Playback > "Network Username" and "Network Password"

 

After which, reboot everything (computer, server, router/modem, etc) to make sure it's active, and remote access should work.

 

And yes, I tested it by running Kodi from my phone, with 3G, and I had access and could even stream a video. Emby seems very very good at easily enabling this remote access.

 

Also, dont forget to set Emby > Settings > Playback > "Play from http instead of SMB" to ON and set the video quality that you want to be streamed. Just for the test I set it to the lowest setting of 664Kbps SD, but please see Angelblue05's note below regarding this (Im new to emby and no expert in this regard, I'm just figuring it out as I go along).

 

Hope this helps :)

Edited by jmh2002
  • Like 1
Link to comment
Share on other sites

Angelblue05

If you pick a low bitrate, it will more than likely transcode your content. If your internet connection is decent. Leave the bitrate as is or highest possible to direct stream instead.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

jmh2002

@ Support Guys:

 

I have my own couple of questions regarding Remote Access. Like i said above I have it working howeever I have the following questions:

 

- If emby on a kodi device is configured for remote access, with an ip like i mentioned (Primary Server Address: thenameichose.no-ip.biz, Port Number: 8096) should this device also still work when inside the home network?

 

I couldn't get this to work. And from a layman's perspective I can see that the device would be trying to get 'out' to  thenameichose.no-ip.biz, which then redirects back to home, and in through the router to the server, which maybe doesn't make sense...

 

Can the experts please tell me if I can change some configuration on my home network to facilate this? Or do I need to change the emby Primary Server Address every time?

 

If this is the case it would be great if there could be a Primary Server Address, and a Secondary/Remote Server Address, and if emby could automatically switch depending on what it found.

 

Obviously for portable devices its not very convenient to have to change the settings every time. As a last resort I could use a different profile in kodi, setup with the remote configuration, but I would rather not if possible.

 

THANKS :) 

Link to comment
Share on other sites

Angelblue05

It should work inside the network as well. However all your usage will be redirected through your router which is not ideal.

 

We'd have to see what are the effects of changing the address in an already set kodi profile. Then we can determine if it's possible or not. We actually import artwork by pointing straight to Emby (with the address given) if it changes, there's a good chance your artwork would not load if it's not cached, for example. We will keep it in mind for the future. :)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Angelblue05

This is what emby connect handles

I'd really like to be able to implement Emby connect - it's on the list to-do, however documentation is lacking to support it. But even then, it would be hard to tell, because we use Kodi's databases.... Everything is "kind of" set in stone lol.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Vidman

Only certain routers allow you to do this, but I forget the name of the feature that is required

Edited by Vidman
Link to comment
Share on other sites

jmh2002

This is exactly what emby connect handles

 

Can you explain further please? I see the wiki here: https://github.com/MediaBrowser/Wiki/wiki/Emby%20Connect but I dont understand how this is relevant to having a portable kodi device, configured for my home network with Primary Server Address: 192.XXX.X.XX, and then walking out the door and needing that device to auto switch in kodi to Primary Server Address: thenameichose.no-ip.biz ?

 

Or do I not understand correctly? :)

Link to comment
Share on other sites

Vidman

The emby connect api automatically handles the address change. So it's relevance is that it handles exactly what you are describing. Check the android app for an example, it switches from WiFi/LAN to cell seamlessly

Edited by Vidman
Link to comment
Share on other sites

jmh2002
 

The emby connect api automatically handles the address change. So it's relevance is that it handles exactly what you are describing

 

 

Can you please explain how I should install / configure this in my kodi device?

Edited by jmh2002
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...