openmediavault-emby plugin (formerly mediabrowser)

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • openmediavault-emby plugin (formerly mediabrowser)

      I'm glad to announce the release of the MediaBrowser Server plugin for OpenMediaVault.

      MediaBrowser Server

      Media Browser Server it's a media content manager for your media files. As for the moment, apart from the normal app fees it stays completely free and open source. It's MS windows based and currently standarizing for running on other platforms, but due to that, it requires MS runtime components to be installed on linux.
      It's composed by a server running part, that using openmediavault-mediabrowser plugin can be installed on our OMV systems, and client components being them mobile apps, smart devices or a custom client program that it's something XBMC alike for installing on HTPC.

      The server publishes an administration page and a web client where you can configure the media catalog and directly reproduce your contents on your browser or redirect to other device in your net, respectively. MediaBrowser has the same media managing capabilities as their competitors and it's directly compatible with their metadata organization.
      It is compatible with DLNA, Chromecast, Roku and android/iOS/Windows phone devices. Also with a compatible TV tuner you can stream live television and manage your DVR on any device running Media Browser.

      It does not have the Plex remote access and "community" media access, as those functions are provided by Plex organization itself. So with MediaBrowser, if you want to make your media available outside your private network you will have to open ports on your router, setup dynamic IP services and VPN stuff, depending on you want to accomplish.



      I had been working on this plugin and with the greatly appreciated help of ryecoaaron and jhmiller now it's available as my first contribution to this community.
      I was taken by surprise by the latest flash-prices raising of Plex and thought that we should had an alternative that we can try before deciding. Unfortunately I was caught by the rising date. I'm sorry for that.

      Please take into consideration that this plugin requires/installs mono. Even when the plugin only installs a small runtime version, mono is one of those things that creates wide dependencies and depending on the linux components your are using, uninstalling it may render those components unusable. Again, if you only plan to take a look at the plugin, please do that on a testing machine.

      Note: This plugin requires OMV 1.0 and up version.

      In order to install the plugin, you will first install/update the omv-extras plugin.
      Then in the secondary tab, you will find the Mono repository that you must activate.
      The plugin sources will then be updated and you will have the new omv-mediabrowser plugin ready to install at the plugins page.

      The installation procedure may take a bit depending on your connection. After it's completed, it's recommended to reboot the server.
      After the reboot, you must activate the mediabrowser service at the plugin configuration page.
      Then you must configure the server for it's first use by click on the Administration button again at the plugin configuration page. That will open a new tab on your browser and guide you through the MB3 initial configuration. (follow instructions after the installation part)
      Now you can access your MediaBrowser Server instance at yourserveriporname:8096/mediabrowser

      Important:
      Cache folder location feature has been dropped.
      From version 1.0.2, the plugin allows for changing cache folder location. There you must specify a dedicated folder for the mediabrowser data. The plugin will try to take ownership, move and delete the contents of what you specify there. So telling that the cache folder it's your favorite media folder will obviously be self-defeating.
      I don't take any responsibility of data loss and other damage caused by incorrect use of the cache folder location.


      For any questions or issues, please post a message here or at the issues section.

      Thanks,
      Sergio Rius.

      The post was edited 6 times, last by Sergio ().

    • Version 1.10.0 Released

      Display Spoiler
      Change Log
      Complete plugin overhaul, that implies changes at the interface and internal working.
      System integrated dependencies for image processing and compression.
      New GUI design with separated access buttons for administration page and default gui.
      New button for hot-restarting the server.
      Added capability for updating the server independently for the plugin.
      Fixed execution rights issues.
      Fixed unstable server execution management.


      Tips:
      With this version, the capability for changing the server working folder location has been dropped. Many issues arose due to the double functionality of this folder, that was the container for temporary data, but also for the server components and dependencies. Also, freely moving that folder resulted too dangerous for non technical users.
      The functionality for moving the temporary data it's incorporated on the server itself, so the users still interested on it, can access this setting at the Servers admin page.
      As a result, for users who previously changed this setting, updating to this version may seem to erase all the servers settings and accounts. That's because the new installation neglects the moved folder and starts a new one at the default /var/lib/mediabrowser location. Users who want to recover their configurations and user can copy back those files into the new location. Anyways, please take into account that the changes in server version could also imply changes in it's configuration files, so I recommend not to revert those and take it as a new installation.

      Users who changed their media folders permissions or accommodated them for plugins testing versions may experience access issues.
      The mediabrowser user must have at least read permissions on your media sources,
      and write permissions depending on the Servers features you want to take use for. So whenever issues are experienced, the recommendation it's to reset media folders permissions and ACLs and them ensure mediabrowser user rights back.

      Now, the server can be updated without waiting until a new plugin version is released. Whenever the server warns that there's a new version available, in the main admin page, you can hot-launch the upgrade procedure at the plugin gui by using the upgrade button.
      That was added because the fast improve rate MediaBrowser is getting. So recent changes like sync support or security fixes can be added at any time.
      Updating the server it's now under your criteria, please refer to MediaBrowser Server change log before updating.


      Version 1.0.2 Released

      Display Spoiler
      Change Log
      MediaBrowser Server version 3.0.5424.1
      Updated download repository for mediabrowser package
      Allow the user configure the database folder location
      Prevent database being deleted during updates
      Delete cache folder when the plugin is uninstalled


      Known issues:
      In some cases, updating the plugin from the initial version may seem that erased the Media browser configuration and wizard is lauched when trying to access the server. The cause it's the cache/configuration folder being moved inside a new location including it's parent directory. For Ex: /opt/mediabrowser/Program-data to /var/lib/mediabrowser/Program-data, where it should been to /var/lib/mediabrowser as root.
      If that occurs, simply stop mediabrowser service and move the contents of /var/lib/mediabrowser/Program-data into /var/lib/mediabrowser and then delete Program-data folder. Restart the service and it will load as before without losing any configuration.

      Image compression don't work for some image formats. (libwebp related)

      The post was edited 6 times, last by Sergio ().

    • Thanks for creating the plugin.

      It installed without problems on my box and I was able to get to the web interface (which is pretty slick imo). I managed to scan in my media collection ok but I had some issues viewing the media library. It wouldn't load any of the media images (cover art etc) which made browsing pretty impossible. Upon investigation the issue appears to be related to the bundled libwebp.so that they include.

      The log contained a lot of:

      Source Code

      1. 2014-10-12 09:18:46.1222 Error - DtoUtils: ServiceBase<TRequest>::Service Exception
      2. libwebp.so
      3. System.DllNotFoundException
      4. at (wrapper managed-to-native) Imazen.WebP.Extern.NativeMethods:WebPEncodeBGRA (intptr,int,int,int,single,intptr&)
      5. at Imazen.WebP.SimpleEncoder.Encode (System.Drawing.Bitmap b, Single quality, Boolean noAlpha, System.IntPtr& result, System.Int64& length) [0x00000] in <filename unknown>:0
      6. at Imazen.WebP.SimpleEncoder.Encode (System.Drawing.Bitmap from, System.IO.Stream to, Single quality, Boolean noAlpha) [0x00000] in <filename unknown>:0
      7. at MediaBrowser.Server.Implementations.Drawing.ImageProcessor+<ProcessImage>d__6.MoveNext () [0x00000] in <filename unknown>:0
      8. --- End of stack trace from previous location where exception was thrown ---
      9. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
      10. at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.String].GetResult () [0x00000] in <filename unknown>:0
      11. at MediaBrowser.Api.Images.ImageService+<GetImageResult>d__10.MoveNext () [0x00000] in <filename unknown>:0
      Display All


      This seems be caused by the fact that the bundled libwebp.so was built against a newer version lf glibc than what I have available:

      Source Code

      1. $ ldd /opt/mediabrowser/libwebp/linux/lib64/libwebp.so
      2. /opt/mediabrowser/libwebp/linux/lib64/libwebp.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by /opt/mediabrowser/libwebp/linux/lib64/libwebp.so)
      3. linux-vdso.so.1 => (0x00007fffdd93d000)
      4. libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4bb2739000)
      5. libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4bb251d000)
      6. libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4bb2191000)
      7. /lib64/ld-linux-x86-64.so.2 (0x00007f4bb2c20000)


      I downloaded the source for the latest version of this library (0.4.1) and built it locally. It would appear the version is apt is too old which is probably why they include a bundled version. After switching in this version I was able to view images in the web interface.

      One other observation is that the /opt/mediabrowser/ProgramData-Server directory can get quite big (contains a lot of cached images and metadata). It may be useful for the location of this folder to be configurable via the OMV plugin as I imagine some may want to put this on their a data drive rather than the system one.

      After getting this running I quite like it. The web interface is very well done and it's also FOSS software which a distinct advantage over plex imo.
    • The mono project had been running into key validation problems for their repositories this past week. Even me wasn't able to finally run it in my production server until the weekend. It's possible that the repo source for glibc was down when you attempted the installation and it reverted and installed the default one for wheezy that it's a quite old compilation.
      I didn't have any issues with versions installed with the standard procedure, so I bet that could be the issue.

      The data directory location configuration, a la Plex, it's the next thing in my pending list. That can be tricky, as MBS is a windows program running in linux. You can envision that running downlevel from the execution directory and browsing on linux fs may have complications.
      In the meantime, you can locate some option in the MBS configuration where you indicate that you want him to save the metadata together with the media files. I like to manually add my metadata with something like ember, so migrating from xbmc to plex to mbs was totally transparent for me.

      Two hints there are configurate MBS to work in xbmc/plex compatible metadata mode and if you use SnapRaid as your media FS add the metadata files and extensions to the SnapRaid plugin exclusion list.
    • Sergio wrote:

      The mono project had been running into key validation problems for their repositories this past week. Even me wasn't able to finally run it in my production server until the weekend. It's possible that the repo source for glibc was down when you attempted the installation and it reverted and installed the default one for wheezy that it's a quite old compilation.
      I didn't have any issues with versions installed with the standard procedure, so I bet that could be the issue.


      That's interesting, so you're saying you have a libc6 package installed that's newer that 2.13? I'd be interested in which repo that come from since there doesn't appear to be any version of it in the mono repo. I'd be surprised if there was since it's a base system library and nothing to do with mono.

      Sergio wrote:

      In the meantime, you can locate some option in the MBS configuration where you indicate that you want him to save the metadata together with the media files. I like to manually add my metadata with something like ember, so migrating from xbmc to plex to mbs was totally transparent for me.


      That is actually the option I chose but even then ended up with 3GB of data in the ProgramData-Server directory. That not actually a problem for me but I thought it may be for some which is why I mentioned it.
    • Herbie wrote:

      That's interesting, so you're saying you have a libc6 package installed that's newer that 2.13? I'd be interested in which repo that come from since there doesn't appear to be any version of it in the mono repo. I'd be surprised if there was since it's a base system library and nothing to do with mono.


      libgdiplus, that it's a part required for MBS to work, sets a dependency (as the time I made the plugin) to libc6 version 2.13 or superior. At the time, debian didn't have that version available for wheezy, so I was working with a custom compilation repo. While I was working at plugin they updated the mono wheezy repo (that was archaic, 2.0.3 IIRC) to the first version compatible with MBS so I changed the plugin accordingly. Wheezy didn't have C core libraries up to the libgdiplus of this repo, so newer version it's included and theoretically downloaded from this same repo I set.

      That was the first reason for me to warn against uninstalling mono. The linux core libraries downgraded.
      When we upgrade to jessie, that will not be an issue and additional repos will not be required.

      You must have a really big media library. Did you cleaned MBS metadata cache after setting the local metadata option? I'm trying to imagine 3GB of actors and extra metadata. I'll make some time for giving it a look.


      Clarification: We currently only have available v2.13 of libc6 core libraries. As OMV does not currently support higher Debian core versions is not wise to activate the experimental repository in order to get that c core version files. I experimented with that widely while the making of the plugin and hadn't satisfactory results.

      Replacing libwebp.so file with one compiled in your system may be the solution, and ideally MBS would ship with a lower version or even better without it for better system compatibility.

      The post was edited 3 times, last by Sergio ().

    • Wow on paper this looked great, I have been using MB3 for sometime now and its really good at what it does.
      I had this on another machine running, but would have always liked it on my OpenMediaVault server.............

      I have just installed it, and I get an error when trying to Apply:

      Source Code

      1. ​Failed to execute command 'omv-mkconf mediabrowser moveDbFolder 2>&1': Moving database from to ... chown: changing ownership of `/media/a3ebfc7e-432d-4fd8-b07e-24bf85dba2eb/aquota.user': Operation not permitted chown: changing ownership of `/media/a3ebfc7e-432d-4fd8-b07e-24bf85dba2eb/aquota.group': Operation not permitted


      Any ideas?
    • Don't try to make a root volume the mb cache folder. When changing the location of the cache folder, use a dedicated folder name.

      The plugin first will move all cache contents to that folder you specify. If you then change again the location, it would move all the contents to that new location, and it may be disastrous if you specified a root volume in first place.

      EDIT: And I don't want to think if you then un-install the plugin -> Delete all the contents of cache folder.
    • I don't know whats happen, but the update to newest version and setting up a new database folder going worse.

      After updating the plugin the database folder in the plugin settings was blank. So the wizard was lunching on. After the new setting up, i have set up the database folder on one my the partitions. After click "save" the config manager was still running few minutes. No errors come in, but the media browser server doenst running up.

      So i have uninstal the plugin over the plugin manager for reinstall. Atfer this, all files and folders on the partition was erased! o.o
      Thanks good the partition was a test partition with no important files... but i think the plugin uninstall progress should look at.
    • @Wetter Please, do read the warning at the first post. It that problem happens again, don't uninstall the plugin. Just let change the configuration files so nothing is erased. I bet your Mb configuration data was inside the folder you specified and it was just a matter of moving it one level outside.

      @Eraxar Did you install or update? With the default setting it was ok running? If so lets go in steps.
    • Sergio wrote:

      @Wetter Please, do read the warning at the first post. It that problem happens again, don't uninstall the plugin. Just let change the configuration files so nothing is erased. I bet your Mb configuration data was inside the folder you specified and it was just a matter of moving it one level outside.

      @Eraxar Did you install or update? With the default setting it was ok running? If so lets go in steps.


      Okay, so now its come this error:

      Source Code

      1. Fehler #4000:
      2. exception 'OMVException' with message 'Failed to execute command 'omv-mkconf mediabrowser moveDbFolder 2>&1': update-rc.d: using dependency based boot sequencing
      3. insserv: warning: current start runlevel(s) (empty) of script `mediabrowser' overrides LSB defaults (2 3 4 5).
      4. insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mediabrowser' overrides LSB defaults (0 1 6).
      5. Moving database from </media/84188c16-5a2b-47f1-a9cc-cead3ca57e56> to </media/46770666-eeea-4d36-ae18-97ee16b2edd8>...
      6. cp: Entfernen von „/media/46770666-eeea-4d36-ae18-97ee16b2edd8/aquota.group“ nicht möglich: Die Operation ist nicht erlaubt
      7. cp: Entfernen von „/media/46770666-eeea-4d36-ae18-97ee16b2edd8/aquota.user“ nicht möglich: Die Operation ist nicht erlaubt' in /usr/share/openmediavault/engined/module/mediabrowser.inc:98
      8. Stack trace:
      9. #0 /usr/share/openmediavault/engined/rpc/config.inc(180): OMVModuleMediaBrowser->applyConfig()
      10. #1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      11. #2 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      12. #3 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      13. #4 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      14. #5 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      15. #6 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      16. #7 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      17. #8 /usr/sbin/omv-engined(501): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      18. #9 {main}
      Display All


      I think the old config file was not delete with the uninstall progess.
      The xml Mediabrowser said:

      Source Code

      1. <mediabrowser>
      2. <enable>0</enable>
      3. <showtab>1</showtab>
      4. <mntentref>11db68dc-918b-4309-927c-71bf1e9c58ee</mntentref>
      5. <db-folder>/media/46770666-eeea-4d36-ae18-97ee16b2edd8</db-folder>
      6. <old_db-folder>/media/84188c16-5a2b-47f1-a9cc-cead3ca57e56</old_db-folder>
      7. </mediabrowser>


      How can i reset it?
      The "old db-folder" is the erased partition with no files anymore.