FAQ  •  Register  •  Login

Serviio Library Empty At Each Start Up

<<

anniebody

Streaming enthusiast

Posts: 36

Joined: Sat Nov 19, 2011 12:28 am

Post Thu May 22, 2014 7:30 pm

Serviio Library Empty At Each Start Up

Ran a previous post (Windows 7 x64 No Library Found) that remains unsolved and appears to have dried up, so attempting a new angle, hopefully to get a working solution which is apparently beyond Serviio's capabilities.
When starting Serviio the library file is empty and requires a 'Force Refresh'. This happens every time it starts, but only for Windows 7 x64.
Can someone let me know where the library file is stored and how it is named.
After running 'Force Refresh' to get the files viewable from the library, I intend saving it elsewhere/renaming as a working library file using a batch file run via key press.
Then after starting Serviio via a second batch file the empty library file will be copied, renamed and overwritten each time Serviio starts.
This should then prevent me having to wait five minutes each time I load Serviio and undertake a 'Force Refresh'.
As far as I can see, apart from a bit of work setting up the batch files, there is just an additional key press required whenever I 'Force Refresh'.
Can anyone see a problem with doing this?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17000

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu May 22, 2014 9:04 pm

Re: Serviio Library Empty At Each Start Up

It's in the library folder under Serviio installation.

I think your problem is due to timing, you could disable starting Serviio service on startup and only start it manually when all your drives are mapped by the OS.
<<

paul.s

Streaming enthusiast

Posts: 28

Joined: Wed Aug 17, 2011 9:16 am

Post Sat May 24, 2014 11:28 am

Re: Serviio Library Empty At Each Start Up

I often have very similar problem. It' easily solved restarting, of course. Much of my media library is on an network MYBOOKLIVE. If serviio starts before the drive is available then there will be no files until after the drive is 'seen' and it is restarted. By 'seen' I note that at times for various reasons the drive may be available (reachable over http for instance) , yet in windows explorerer nav pane there will be a red X on the drive icon. I guess that means that windows missed the opportunity to 'map' (<< terminolgy) that drive. At that time Serviio and other programs as well, don't see the files on the drive. Often just clicking the drive in Explorer re- maps (terminology?) the drive. When files are accessible in Explorer is when all the other programs see the files.

I wonder if there is a way that Serviio could periodically send an event which might cause the 'remapping' when it sees no files?

Then my bigger mess! My home network is flaky. I have managed to shield it from a ADSL line that often drops the connection (causing windows to redial crashing the interior network) by putting router 'behind' the gateway router. The internal network often has something wrong for which restarting the modems/routers or reconnecting or power cycling all devices or wHaTEver 'fixes; it. Why does it work perfectly now, but breaks down? Got to be something with routing duhhh, but how to troubleshoot? I'd be very happy if there were a bit of discussion in a dedicated home network application forum like this forum particularly to do with home networking issues.
<<

anniebody

Streaming enthusiast

Posts: 36

Joined: Sat Nov 19, 2011 12:28 am

Post Mon May 26, 2014 10:42 am

Re: Serviio Library Empty At Each Start Up

Tried 'Force Refresh' to get the library updated, checked it was all there, then removed Serviio from startup. After reboot inserted drive then ran Serviio. Library is empty!?
I don't see why it would be a timing problem?
If Serviio has no boxes checked to update the library, and the only option is to manually force refresh, then why is Serviio updating the library of its own accord?
Surely it should remain as is with no library updates until I tell it otherwise. At the moment it appears to be ignoring the settings, looking for information which it cannot find, then overwriting the library contents to empty, instead of doing nothing until I tell it to. Given there are no settings to tell it to ignore changes, and comply with the chosen settings, there is nothing else I can do until the problem of ignoring the settings is overcome. Why is it mapping drives, when it is not being requested to do so? Why? Because it has a serious bug that needs fixing.
In the meantime, that is why I want to create a batch file that automatically overwrites the Serviio change, when no change should be made.
<<

bobsmo

Serviio lover

Posts: 65

Joined: Thu Dec 20, 2012 12:06 pm

Post Mon May 26, 2014 12:01 pm

Re: Serviio Library Empty At Each Start Up

anniebody wrote:If Serviio has no boxes checked to update the library, and the only option is to manually force refresh, then why is Serviio updating the library of its own accord?



If only.....I've mentioned/asked this several times, to no avail so far.....
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17000

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon May 26, 2014 12:33 pm

Re: Serviio Library Empty At Each Start Up

It's what the orange checkboxes in this image are for. http://wiki.serviio.org/doku.php?id=ser ... _explained
<<

bobsmo

Serviio lover

Posts: 65

Joined: Thu Dec 20, 2012 12:06 pm

Post Mon May 26, 2014 3:01 pm

Re: Serviio Library Empty At Each Start Up

Yes, I do understand that.

However, even in your example, you have the Keep Library Automatically Updated checked.

What we say, if that is NOT checked, do not do the check upon start up. Simple really.

Only update when Force Update is used.

Otherwise, if you uncheck your orange items in the pic, every time you would want to force a refresh, you would have to go check them, force the refresh, and then uncheck them again....
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17000

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue May 27, 2014 8:25 am

Re: Serviio Library Empty At Each Start Up

bobsmo wrote:Yes, I do understand that.

However, even in your example, you have the Keep Library Automatically Updated checked.

What we say, if that is NOT checked, do not do the check upon start up. Simple really.

Is that not how it works? Perhaps it always does the initial scan, I'll have a look.

Otherwise, if you uncheck your orange items in the pic, every time you would want to force a refresh, you would have to go check them, force the refresh, and then uncheck them again....

Yes, that the idea currently. Not ideal.
<<

bobsmo

Serviio lover

Posts: 65

Joined: Thu Dec 20, 2012 12:06 pm

Post Tue May 27, 2014 10:50 am

Re: Serviio Library Empty At Each Start Up

zip wrote:
bobsmo wrote:Yes, I do understand that.

However, even in your example, you have the Keep Library Automatically Updated checked.

What we say, if that is NOT checked, do not do the check upon start up. Simple really.

Is that not how it works? Perhaps it always does the initial scan, I'll have a look.

Hi, yes, this, the initial/start up scan always runs whether or not Keep Library Automatically Updated is checked or not.

Thanks.
<<

DenyAll

DLNA master

Posts: 2238

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Tue May 27, 2014 11:38 am

Re: Serviio Library Empty At Each Start Up

Just to add a bit - my testing is that it does an initial scan on startup irrespective of the setting of "Keep library automatically updated" or the settings of the "Scan for file additions and updates" for each individual shared folder. Even when everything is off, the initial library update occurs.
Be nice if this wasn't the case, as I have an idea on how to fix the issue (for Windows users) within my helper program.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

anniebody

Streaming enthusiast

Posts: 36

Joined: Sat Nov 19, 2011 12:28 am

Post Thu May 29, 2014 6:07 pm

Re: Serviio Library Empty At Each Start Up

Yes. What I have known for some time now.
Serviio are aware of the problem, but apparently do nothing to resolve it.
So, in the meantime, I'm back to writing batch files to overcome the software bug.
What exactly is your 'helper' program.
<<

DenyAll

DLNA master

Posts: 2238

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Sat May 31, 2014 12:55 am

Re: Serviio Library Empty At Each Start Up

What exactly is your 'helper' program.
Serviio Winhelper: viewtopic.php?f=17&t=12136
This tool runs in background and (optionally) controls your Windows PC sleep (ie. stops your PC sleeping while streaming) and also (optionally) automatically detects changes in your shared folder and refreshes your Serviio library if any files are added or changed. It also has a number of helper tools for checking logs, restarting the service, etc.

Where I am at: I have ~50% written an expansion to tool to "take over" library management. This expansion allows each shared folder to be monitored and refreshed independently - ie. some folders can be monitored automatically by the OS, others can be nominated as being on the timer system (for those that the OS cannot monitor), others can be nominated to only update on a Forced Refresh and others never be updated. I also test that the shared folder exists before refreshing - this way if it isn't mounted, you won't lose your library entries. It is this last bit where my problem lies as the strategy fails (when Serviio does a full refresh on startup and your library is removed anyway).
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

normanw18

Serviio newbie

Posts: 4

Joined: Sun Sep 07, 2014 2:26 pm

Post Mon Oct 13, 2014 9:21 pm

Re: Serviio Library Empty At Each Start Up

Hi I have some input with regard to how to solve the problem of the Serviio index entries being removed when an external hard is being used to store video, pictures and music files.
I have a 2TB Western Digital usb drive (MyPassport). I run Windows 7 and I run Linux Manjaro.

Windows 7.
I don't seem to have any problem running the hard drive under Windows 7 , except that one must not unplug the hard drive, before stopping Serviio, as Serviio will on it's next scan for file changes start removing all the entries as Serviio cannot find the existing files.

Linux - Manjaro
Here we encounter a bigger problem but with, I believe, a very workable solution.

You can add the drive to the Fstab which will then mount the drive at boot time. This has the draw back that should the drive be unmounted or if the usb drive is unplugged, before stopping Serviio, then Serviio will on it's next scan for file changes start removing all the entries as Serviio cannot find the existing files.

PLEASE NOTE: the name 'mypassport' used below must be replaced with the name that you use for your mount point. Please read the man pages for systemd.mount and systemd.unit for proper naming conventions and the various options used here.

1. If serviio is not auto started at boot then issue the following command which will then start serviio at boot.
systemctl enable serviio

2. Create a mount point
mkdir /mnt/mypassport

3. Backup serviio.service (/usr/lib/systemd/system)

4. Add the following entries in 'serviio.service' under [Unit]
#The following statement binds the mounted drive to Serviio - So should the drive be unplugged Serviio will stop running.
BindsTo=mypassport.mount
#The following statement ensures that Serviio only starts if the the drive is mounted. So no drive no Serviio.
After=mypassport.mount

5. Create a file in '/usr/lib/systemd/system' with the name mypassport.mount. Add the following statements.
[Mount]
# The following statement specifies which device is associated with the mount point. Replace 'sdc1' with your own device.
What=/dev/sdc1
# The following statement takes an absolute path of a directory of the mount point.
Where=mypassport

That all.
If the drive is unplugged, the mount point is removed and serviio stopped. If the drive is then plugged back in, the mount point is recreated but serviio will have to be manually restarted, which can be done with the 'systemctl start serviio' command.

Could Serviio be changed to automount the required drive before it starts a scan for new / changed files? The serviio console could have an option that specifies if a drive should be automounted or that it must be mounted otherwise serviio will not run.
It is strange that an erroneous message is displayed (Folder '/mydirectory/myfile' is either not an existing directory or cannot be read due to access rights' ) when the drive has been unplugged. More accurate interpretation of error messages would be helpful.

Return to User experiences

Who is online

Users browsing this forum: No registered users and 8 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.