LinuxMCE Forums

General => Installation issues => Topic started by: Andanotherusername on November 29, 2012, 08:45:56 pm

Title: Resynchronize files problem
Post by: Andanotherusername on November 29, 2012, 08:45:56 pm
I do not know if it is just my system (1004) but I have issues with the resynchronize files function in admin page. It has been for month but I just noticed a bigger problem with it today. I noticed first that the resynch function started to add random attributes and pictures to files (update media daemon is disabled in my system). This has been going on for month but I did not really care about it because it is an "easy" fix to delete those attributes. However, today i noticed that the resynch function throws out existing files (so that i have to do another resynch to add them but then other files will be thrown out). The files will be deleted out of the database. (currently, i have 15146 files in pluto_media - files. the highest PK_File number is 25970)

Does anybody know a solution or quick fix so that I can at least have all my files in the system? Or any help where to look to fix it?

Other smaller problems (help appreciated):

Also there is a problem between Resynch, Database and LMCE. If I rename a file or folder then LMCE sometimes doesn't show file under the new name (and only under old name) and playback of the file causes an error. If I change a letter in a folder name for instance from lower to upper case Resynch in admin page does not change the database entry. LMCE on the other hand is case specific and will not show the folder.

Also when I move a file to a different folder/NAS then both files will stay in database (2 entries). both files will be shown in LMCE.

I know you guys are busy and this is not important but some feedback would be appreciated and if it is an easy fix I could attempt to fix it (however as I stated before this system is so complex that my lack of time makes it impossible for me to become familiar with everything). I wish you guys would leave more detailed comments in the source code so that it would be easier to help.

Thank you
Title: Re: Resynchronize files problem
Post by: SBCC on November 30, 2012, 02:48:38 am
I ran into this problem as well. Have you added new media directors recently? I found that if there is a hard drive in the md lmce trys to add all the various media files, mostly junk. Make sure the partitions that lmce is using on them only contains stuff you are using with lmce. I also had to set to ignore all media files that are not in my media file directories to keep them from getting on my orbitor.
Title: Re: Resynchronize files problem
Post by: Andanotherusername on November 30, 2012, 03:22:53 pm
No I did not add a directors. I had to add another Nas because my 33Tb Nas was full. I do not have the problem you had. here is an example of my problem:
Lets say on my Nas1 are video files A, B, and C.
on Nas2 are D, E, F

Let's say I resynch Nas1 directory under LMCE admin webpage. Then resynch will delete video F from folder Nas2 out of the database. If I would resynch Nas 2 then F will be added again but video A would be deleted from Nas1 etc.

Another small problem (which I could address if I could find the time to fix the other one) is that resynch would add attributes from other videos. Same example as above. So I would resynch and Resynch would add all attributes and pictures of file B to file D, or from file A to file C.

Currently I am really time constrained because my baby girl is already getting upset while I am typing this message. So if anybody could point me in the right direction so that I do not have to find the right source file and waste a lot of my limited time in figuring that out.

I was just wondering if anybody has similar problems. Or if anybody is already working on this (maybe there will be updates)

I also don't understand why those files are deleted because Resynch calls "sudo -u root /usr/pluto/bin/UpdateMedia -d" and then let's say directory Nas1. But why would it delete files from directory Nas2 which is not under Nas1(both would be in /home/public/data/videos). Theoretically UpdateMedia should not even touch the other directory
Title: Re: Resynchronize files problem
Post by: l3mce on December 02, 2012, 01:53:17 am
Something is very wrong there.

How are you resyncing? I mean to ask how are you drilling to what you are trying to sync?
You might drop into IRC when she is sleeping and I will try and help you. :)
Title: Re: Resynchronize files problem
Post by: Andanotherusername on December 06, 2012, 09:02:43 pm
Thank you. I figured out what the issue is. I use Resynchronize button under Media files sync in LMCE admin page. I resynch folders (let's say a TV show folder) or a full Drive/Nas folder (right under data/videos). the problem is that my LMCE reuses records that are already in use at random intervals. I do not know why. So the new file will get reuse an PK_File number (therefore the attributes attached to it). Those PK_File IDs seem to the same all the time (one is for instance 10159, or 10234). I can't explain why it does it.
I understand problems better through examples so here is an example.

Let's say I have file A,B and C in the database. I want to add, files D and E. I press resynch. LinuxMCE might delete the database record (in File only and not the attributes attached to the PK_File ID) from file B and reuse the same PK_File ID. This means that I will only have A, B, D, E available for playback.

It always happens to the same old files. It is strange. Is there a log to look at why LMCE does it? I couldn't find one. Thank you.
Title: Re: Resynchronize files problem
Post by: Andanotherusername on December 10, 2012, 08:45:23 pm
What I have done now is to manually add all the files (dropdown menu item next to the file name). It took me a while because I have many folders to go through. Overall, there were about 50 files that were involved (had to be manually added). With the manual adding, the files received a new PK_File ID and I hope that this will solve the problem. I did a small test with 40 new files and the problem did not happen (I will do another test next week when I will add more files on both of m Nas to see if it is finally solved). It is odd that LMCE somehow remembered those specific files. Those filenames (when LMCE deleted them) were nowhere to be found in any Mysql database (Maybe CVS Sync problem with those files if the file names are saved in there, but I do not exactly know how LMCE uses CVS).
Title: Re: Resynchronize files problem
Post by: Andanotherusername on December 24, 2012, 05:28:23 pm
Unfortunately the problem reappeared. Now LMCE uses different files that will be replaced by the new files in the database. I guess I might have to do a reinstall of LMCE (which will take a long time to set up everything). It seems that I am the only one with that problem which might indicate that there was an update issue. I was just curious if anybody that has a lot of files in the database has no issue. I have 15,388 files in the pluto_media - File database (they are all valid files).   I would really hate to do a reinstall (especially with so many files LMCE always messes up the first resyncs as well based on my previous experiences).
Thank you.
Title: Re: Resynchronize files problem
Post by: posde on December 24, 2012, 06:05:03 pm
One thing that was recently fixed was a problem when using Logitech Media Server in a later version. LMS acts as an UPnP server, so you would end up with lots of dups. That has been rectified in the latest updatemedia package.
Title: Re: Resynchronize files problem
Post by: maverick0815 on December 31, 2012, 11:44:48 am
I have quite similar problems. I recently did a fresh install with LMCE-1004-20121218182926965. So far it went as usual, linuxfirmware-nonfree had to be installed manually, upon creating an md downloading xmltv took the whole night, but eventually it was all done.
However I did also encounter problems with my files. I have two hdd installed in my core, each around 2tb in size. The first drive holds a 250gb partition for the system and a little swap, the rest is for data.
All the drives were recognizes and taken in with lmce-datastructure. The next day I wanted to watch something stored on the system, but the orbiter showed none. I checked in the webadmin and was astonished to see, that none of the files had been added to the database yet, though updatemedia appeared to be running. So I let the system resynchronize the whole drives and after a while everything reappeared. Unfortunately there are still some issues remaining:
Anyways, I want to thank you guys, for an outstanding job getting us so far. I wish you a very happy new year!