Jump to content

Music library external access


Andy777

Recommended Posts

(there is going to be a whole bunch of questions issues from me now that I'm preparing my new setup including Emby)

 

Only way I can make external access to work with music library is to do the initial sync from a external network.

 

In plugin Beta 2.2.30 on Jarvis 16.1 I have the following settings:

  • * Playback Mode: Addon
  • * Enable Music library: On
  • * Direct stream music library: On
  • * Play from HTTP instead of SMB: On

 

Movies and videos are fine whether on local LAN or external access.

 

If I do a full reset and resync of the local database, the MyMusic56.db gets populated with paths using my LAN internal emby-server ip address like:

 

http://192.168.0.5:8096/emby/Audio/e6c86....

 

These URLs are correct and I can successfully use my music library when inside my home LAN.

 

However when outside my home network, emby for kodi fails to change the path to external IP of my server. Therefore the file fails to play.

 

 

 

On the other hand, if I do a full reset and resync of the local database when outside my home LAN (but connected to the emby server), the MyMusic56.db gets populated with paths using the external ip like:

 

https://my.dynamicdns.something:8920/emby/Audio/e6c86....

 

After that, the music library works regardless whether the Kodi device is in my local LAN or using external access.

 

The biggest hassle is that in order to get the music to work both ways, I need to do the reset/full sync from a external network. With thousands of songs and slow connection this can take (unbearably) long time.

 

In plugin 2.2.14 there was a workaround which consisted of not using "direct stream", but local paths, and the automatic failover to http direct streaming. At least I think that was what made it work back then. The library sync could be made within the home LAN and the music would still be playable when connected from external networks.

 

A quick fix would be another option in music library sync settings like:

 

Enable Music Libtrary: ON

-Direct stream music library: ON

-Use external https paths for musicl library: ON

 

On the other hand, if I unclick "Play from HTTP instead of SMB", I can see (in the Kodi log) that Emby provides the direct SMB path even in the case when the MyMusic database is populated with http or https URLs.

 

So optimally (and without additional manual option) Emby for Kodi should convert the internal network http://192....-adresses on the fly to https://my.dynamicdns.something:8920/..... when it detects that the client is not in the same network as the server.

 

Just reporting. The current workaround is to do a full database reset from an external network. There is a SSL problem with the mono/ubuntu server (I'll report it in the appropriate section separately) which makes this unreliable.

 

You people are doing a superb job with this Emby-Kodi combination!

Andy777

Link to comment
Share on other sites

Angelblue05

Thanks for the feedback!

 

The music library doesn't work the same as the video library. It's impossible to use plugin paths (strm) in the music database. The only to get this going is either by entering network or HTTP paths. To switch between internal/external will require the add-on to apply Kodi path substitution in advancedsettings.xml. It used to work this way but I didn't get a chance to re-apply the logic, I'll review it as soon as possible:

https://trello.com/c/FMGwqPHR/250-direct-stream-music-apply-kodi-path-substitution

 

In plugin 2.2.14 there was a workaround which consisted of not using "direct stream", but local paths, and the automatic failover to http direct streaming. At least I think that was what made it work back then. The library sync could be made within the home LAN and the music would still be playable when connected from external networks.

 

Where did you see this? Music has nothing to do with playback options; it's impossible for the add-on to control music playback.

Edited by Angelblue05
Link to comment
Share on other sites

 

Where did you see this? Music has nothing to do with playback options; it's impossible for the add-on to control music playback.

 

My bad! 
 
Now that I know more about the differences in music vs. video databases, I must have mixed it up with playing movies. I remember seeing something like "cannot direct play, switching to http" in the logs, not in the settings user interface.  
 
Thanks alot for your superb work!
Andy777
Link to comment
Share on other sites

This will take me a little bit to reimplement. For now, if you need to access your music library from outside the network, simply add a Kodi path substitution in your advancedsettings

From: http://{local ip}
To: http://{external ip}

http://kodi.wiki/view/Advancedsettings.xml#pathsubstitution

 

 

No hurry! I am actually quite happy with the solution that I have now: I populate the local Kodi (music) database with the server external https paths. This way I can listen the music both in my internal LAN and externally. In internal LAN it just takes a route via my router but works. Externally it works also as the music paths are external ip HTTPS paths.

 

Emby Kodi plugin handles the video automatically since the paths in video database are plugin-paths: In home LAN it direct streams through the local server IP and in external networks automatically uses the external IP and HTTPS.

 

So at least for me, it actually already works the way I want. Only thing I need to do currently, is to make sure that the MyMusic.db gets populated with server external https paths.

 

BR,

Andy777

Link to comment
Share on other sites

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