Jump to content
Alex R. Berg

Logitech Media Server - updated plugin, now supports upgrades

161 posts in this topic Last Reply

Recommended Posts

Hi all,

 

I have made some updates to the Logitech Media server plugin because I was (also) having trouble with wiped data on reboot (even though I had set installdir to /mnt/cache/slimserver).

 

This new updated version should clean up previous installs when executed, so that the plugin will update a previous slimserver install and it should preserve the existing slimserver library files. If no slimserver is installed, it will install it at /mnt/user/slimserver.

 

I've had an unRaid server for 3 days now, and I am no linux expert, so I may very well have created problems in the plugin. I would appreciate if someone would verify the changes.

 

(edited below for version 7.7.1_v1.2)

 

v1.1 requires the array to be started for it to install. Otherwise it will fail, and place a extracted file slimserver in /boot/config/plugins which needs to be deleted manually.

 

Technical details:

  • I have changed default install dir to /mnt/user/slimserver from /usr/local/slimserver. I suspect Tom will overrule me on this one though since he chose /usr/local/slimserver. I chose to make the change anyway, since I find it better to annoy people with creating /mnt/user/slimserver directory (until they change the install-location), rather than loosing data on reboot. I hope /mnt/user is always available on started arrays.
  • I have moved slimserver program files to /usr/local/slimserver/program, and the three data directories prefs, Cache, Logs to /usr/local/slimserver/data. On install on top of previous slimserver without data/program separation, I move the three data directories to /usr/local/slimserver/data and delete the rest. This should allow for updating to newer future slimserver versions with the script.
     
  • On slimserver.pl execution I specify --cachedir, --prefs, and --logs, because otherwise the slimserver will still point to wrong location after moving files (the symlink to /usr/local/slimserver doesn't fool slimserver.pl). This I believe is the culprit for users claiming lost library even though they moved the installdir /mnt (because they didn't move to /mnt before starting slimserver the first time).
  • I have fixed a few slimsever -> slimserver spelling errors.
  • I delete /usr/local/emhttp/plugins/slimserver and /etc/rc.d/rc.slimserver which were created by the plugin. If you have made local changes to those files, you will loose the those changes.

 

v1.2 postpones install till array is mounted, to avoid install-issues.

 

v1.3

Added 7.7.2_1.3 to this top post (Peter updated to 7.7.2 below in thread). Its a slight change of the 7.7.1_v1.2 script, including changes to make sure update is installed if plugin is placed on flash-drive and server restarted. Also made it slightly simpler to update the script to new versions of slimserver. I suggest we keep the version numbers of the script (eg 1.3), parallel to the version of slimserver, to make it easier to distinguish the behavior of the script.

 

UPDATE 2013.07.15:

 

Overbyrn has improved on the plugin, therefore I recommend using his version instead of the versions attached to this thread. Overbyrns version is available on GitHub: https://github.com/overbyrn/UnRAID.

Advantages of Overbyrns version:

 

  • Support for update to latest LMS version and also latest beta release, all available through the webpage configuration of the plugin. The update to newer versions is done without loosing configuration changes of the squeeze server
  • Improved webpage configuration
  • Less issues with logging and possible other weirdness - Overbyrn once again placed the data and the program in the same folder as intended by Logitech, and it seems to resolve some log-issues (and perhaps other issues (plugins?)) that my version of the plugin had

 

Be warned though, you'll need to reconfigure your squeezeserver library, as the settings will be lost upon update. This should only be a problem during the transition to Overbyrns version.

 

Alex.

logitechmediaserver-7.7.1-plugin_v1.1.zip

logitechmediaserver-7.7.1-plugin_v1.2.zip

logitechmediaserver-7.7.2-plugin_v1.3.zip

Share this post


Link to post

Hmm, no responses... Did this help anybody, or is it useless?

 

On my squeeze server install I have issues with non-english characters, even though unraid 5b14 has correct locale as utf-8. The problem is that when I view folders on the SqueezeBox I see the doublelettered bad encodings of non-english letters (the 16bit letters in utf-8). I'm a Dane so I use non-english letters like æ,ø,å. I tracked the bug(?) to a problematic line in the squeezeserver package, a problem which was fixed on my Synology release of SqueezeServer. I tried to report the problem to logitech, not sure where that is gonna end. But is any here interested in the fix? I attached fixed file.

Unicode.zip

Share this post


Link to post

Hi I'm running this. and I saw doublets... going to try your fix, but where to place this file ?

 

 

//Peter

Share this post


Link to post

Hmm, no responses... Did this help anybody, or is it useless?

 

On my squeeze server install I have issues with non-english characters, even though unraid 5b14 has correct locale as utf-8. The problem is that when I view folders on the SqueezeBox I see the doublelettered bad encodings of non-english letters (the 16bit letters in utf-8). I'm a Dane so I use non-english letters like æ,ø,å. I tracked the bug(?) to a problematic line in the squeezeserver package, a problem which was fixed on my Synology release of SqueezeServer. I tried to report the problem to logitech, not sure where that is gonna end. But is any here interested in the fix? I attached fixed file.

 

 

Saw these errors in my log, but that perhaps is nothing to do with your plugin ?

 

Feb 26 16:42:59 Tower slimserver.pl: [12-02-26 16:42:59.8520] Slim::Utils::Misc::msg (1304) Warning: [16:42:59.8518] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:42:59 Tower slimserver.pl: [12-02-26 16:42:59.8781] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/01%20-%20We%20All%20Fall%20Down.mp3: Unable to read tags from file  (Errors)
Feb 26 16:42:59 Tower slimserver.pl: [12-02-26 16:42:59.9992] Slim::Utils::Misc::msg (1304) Warning: [16:42:59.9989] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:42:59 Tower slimserver.pl: [12-02-26 16:43:00.0002] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/02%20-%20Itchcoo%20Park.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.0624] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.0621] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.0679] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/03%20-%20Cry%20For%20Love.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.1172] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.1170] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.1186] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/04%20-%20Runaway.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.2395] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.2392] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.2405] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/05%20-%20Dance.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.3018] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.3016] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.3146] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/06%20-%20I%27m%20On%20Fire.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.4359] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.4356] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.4455] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/07%20-%20Save%20My%20Love.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.5798] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.5796] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.5809] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/08%20-%20Love%20Child.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.6544] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.6542] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.6554] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/09%20-%20Shouldn%27t%20Have%20Let%20You%20Go.mp3: Unable to read tags from file  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.7179] Slim::Utils::Misc::msg (1304) Warning: [16:43:00.7176] Error: Unable to read at least 4 bytes from file.  (Errors)
Feb 26 16:43:00 Tower slimserver.pl: [12-02-26 16:43:00.7189] Slim::Utils::Scanner::Local::__ANON__ (793) ERROR SCANNING audio file file:///mnt/user/Music/B/Blue%20Murder/Nothin%27%20But%20Trouble/11%20-%20She%20Knows.mp3: Unable to read tags from file  (Errors)

Share this post


Link to post

Hi Peter,

 

Apply the patch by replacing the current Unicode.pm file in <slimserver install>/Slim/Utils/, typically /usr/local/slimserver/Slim/Utils.

 

The modified version of the slimserver install script I posted above, place the slimserver files under /usr/local/slimserver/program.

 

Then restart the SlimServer, and probably clear and rescan the library.

 

For troubleshooting its worth taking note of the locale which Slimserver reports it is using. In the slimserver webgui under settings > information, the status says something like the following before the patch:

Operating system: Linux - EN - iso-8859-1

After patching and restarting the server it says :

Operating system: Linux - EN - utf8

 

I don't know about the errors you are seeing. I do get some weird stuff in my server log, like after deleting an album it'll spam the following line related to the deleted album

Feb 26 08:00:46 Tower slimserver.pl: [12-02-26 08:00:46.6743] Slim::Formats::readTags (156) File missing: /mnt/user/media/Musik/SqueezeLibrary/TODO/Madonna/01. Ray of Light.mp3

 

If I 'clear and rescan' my music library, I don't get any errors in the syslog. I'm not sure if I did before I patched the file, but I don't think so. I would guess that your tags or your files are messed up.

Share this post


Link to post

I have your packages installed for a few day back, installed your parch in /mnt/cache/.app/slimserver/program/Slim/Utils but still no improvements after a restart and a rescan. going to try again after a reboot  ;)

 

EDIT

 

Logitech Media Server-status
Logitech Media Server Version: 7.7.1 - r33735 @ Mon Nov 28 16:49:58 MST 2011
Värdnamn: Tower
Serverns IP-adress: 192.168.0.199
HTTP-serverns portnummer: 9000
Operativsystem: Linux - SV - utf8
Plattformsarkitektur: i686-linux
Perl-version: 5.10.1 - i486-linux-thread-multi
Databasversion: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Totalt antal anslutna spelare: 0

 

 

Now I'm doing a clear library and re scan, before I did only a re scan  ;)

Share this post


Link to post

I'm glad to hear it's working. Maybe I'll update the plugin, if I get the time to experiment with it in the next week or so.

 

My version of the plugin (maybe also the original version) creates a /logitechmediaserver-7.7.1-33735/

in the root upon reboot. It doesn't do that when installed while the server is running (or so I believe). It annoys me a bit, because it wastes 300MB of RAM disk space. If anyone figures out why I would be happy to hear.

Share this post


Link to post

Here is an update to the logitech media server. It turns out it wasn't necessary to patch the server, I just had to set LANG=en_US.utf8 right before invoking the slimserver. This is a much neater solution, than patching. I think my patch in fact just forced utf-8.

 

I have fixed the package, so that it no longer tries to reinstall the slimserver package, during unraid startup. It postpones that till the array is started. Therefore it no longer leaves unused slimserver package in /.

 

I have placed the attachment in the top post.

Share this post


Link to post

Here is an update to the logitech media server. It turns out it wasn't necessary to patch the server, I just had to set LANG=en_US.utf8 right before invoking the slimserver.

 

How do you invoke LANG=en_US.utf8 ?

 

//Peter

Share this post


Link to post

Hmm, it looks like the new plg file don't let my cach drive  spin down ?? installed slinserver to /mnt/cache/.app/slimserver

 

Can you look into that?

 

//Peter

Share this post


Link to post

Hi Peter,

 

I doubt that the new plg has caused that squeezeserver does not allow disks to spin down. I only changed the timing of the startup and install scripts, not the server program. My disks will spin down, though of cause that may not be the same for all.

 

Cheers,

Alex

Share this post


Link to post

Hey!

I installed the slimserver plg yesterday from another forum, I followed this method

1.Download the zip file

2.Extract the zip file

3.Go to your unraid flash device

4.Go to "\config"

5. Make a directory "plugins"

6.Go into c:\config\plugins

7.Put the extracted file in here

8.Reboot unraid

9.Start array (if its not already)

10.Under settings you find "slimserver"

11.Enable it

then I went to settings  in unraid and enabled it and installed it at /mnt/cache/.apps/slimserver

it worked fine but I had to do a reboot last night and now I went to re-start it and nothing...

 

So I read around and some guy said he did a "find / -name 'slimserver' -type d" and then went to this thread and it worked perfectly. Unfortunatley I dont have much experience with installing this program so I wanted to know how to go about it. Do i erase everything and then install v2? Will I then be able to go to tower control and enable it?

Thanks very much :)

Share this post


Link to post

This updated version of the slimserver plugin will uninstall the old version if its there. I have carefully constructed it so that it should wipe all the old bad slimserver stuff, but keep your data files (if they still exists). It may be buggy of cause, but anyway that's what it should do.

 

Share this post


Link to post

oh thanks arberg!

Brilliant, its working great now. Its actually really simple - i dont know why I was confusing myself.

Very nice work, much appreciated ;)

 

edit: off topic but my logitech squeezebox keeps wanting to update firmware switching between radio and music on the lan. For radio it goes to 7.7.2 r9663 and when I decide I want to listen to the NAS it wants a different update to 7.7.1 r9557 as the logitech server version is 7.7.1 (i take it thats the highest we can get here?). Is there anyway I can just downgrade firmware on squeeze to 7.1 so i dont have to reinstall, reboot each time? Thanks for help

 

forget that, I disabled the auto updates on the SBS and did a reboot and its much better, thanks

Share this post


Link to post

Logitech Media Server (7.7.2) is released, I don't know if this plugin let us to DL this?

Share this post


Link to post

Hi all,

 

I have added Peters update to the top level post to make it easier to find. I have also changed the script slightly so it also updates the slimserver install, just when server is rebooted (in prev versions  it was required that the user installed script with installplg manually while array was mounted, as I think/hope I mentioned before).

 

Cheers, Alex

Share this post


Link to post

Hi all,

 

I have added Peters update to the top level post to make it easier to find. I have also changed the script slightly so it also updates the slimserver install, just when server is rebooted (in prev versions  it was required that the user installed script with installplg manually while array was mounted, as I think/hope I mentioned before).

 

Cheers, Alex

 

Thanks, great that you did the final touch on this  ;)

 

//Peter

Share this post


Link to post

Great work gents!

 

I had a problem turning off slimserver but using the lastest patch it seems to be working great. Thank you :)

Share this post


Link to post

ok think I am missing something pretty basic...

 

DL'ed and put 772 1.3 package file in \\tower\flash\config\plugins folder

 

Rebooted and restarted array...  I do not have the slimserver icon under settings... though it did create a packages folder on the root of flash drive.

 

Running 5.12a

Share this post


Link to post

Hi,

 

I'm running 5b14, and I havn't tried anything else.

 

The package downloaded by slimserver plugin is placed at \\tower\flash\config\plugins\slimserver.

 

Try logging in to a shell on the tower and go to /boot/config/plugins and run

installplg logitechmediaserver-7.7.2-plugin_v1.3.plg 

 

If you do that while the array is started, then slimserver should be installed.

 

Cheers, Alex

Share this post


Link to post

Thanks worked like a charm...

 

curious, do you have to manually run pkgs normally?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.