Page 1 of 1

Problem: Duplicate entries for the same file

PostPosted: Sat Dec 12, 2015 5:39 pm
by burgatshow
Hi Dev and Community,

I have been using Serviio for 2,5 years without any problem. But since version 1.5.2 it is sometimes fetching the same file twice. It means, that I have double entries on the media library for the same file. I can remove the duplicate as the following:

    1. Move the affected file outside the Serviio media scanner scope
    2. Execute a full library scan (I have a little bash script for that using cURL and the REST API)
    3. Move back the file to the Serviio media scanner scope
    4. Execute again a full library scan

After I did this, the log file indicates, that the two entries were successfully removed from the library, and then media successfully added back to it successfully one time.

Here are my details:
    - Machine: ThinkPad T420
    - Processor: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
    - Memory: 4GB
    - Operating system@kernel level: Fedora release 22@4.0.8-300.fc22.x86_64

Java version:
  Code:
[thom@thom-tp420 media2]$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


Serviio version (based on REST API):
  Code:
[thom@thom-tp420 media2]$ curl --include --header "Accept: application/xml" 'http://localhost:23423/rest/application'
HTTP/1.1 200 OK
Content-Type: application/xml; charset=UTF-8
Date: Sat, 12 Dec 2015 17:20:31 GMT
Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/1.5.2
Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
Connection: keep-alive
Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8" ?>
<application>
  <version>1.5.2</version>
  <edition>FREE</edition>
  <databaseUpdateId>9acbb3aefdc941d9bb8e6d4d98b814b9</databaseUpdateId>
  <cdsAnonymousEnabled>false</cdsAnonymousEnabled>


Serviio configuration and log files: can be found here.

I also attached three screenshots (1. duplicates, 2. removed duplicates, 3. fetch as one entry perfectly) from the log if you are interested in.

I think the problem is (if you let me guessing), that sometimes the delta update machanism and the full library refresh mechanism can be run at the same time, that's why the duplicate entries created. I do now know the internal processes, so maybe I'm wrong.

If you need a more detailed log file or something else, just let me know (I am familiar with Java and log4j ;) ).

Sorry for the too much information but I am working as a software engineer, and I know that every little piece of information and/or file can help. :)


Sincerely and thanks for the assist!

Re: Problem: Duplicate entries for the same file

PostPosted: Sun Dec 13, 2015 11:22 am
by czcon12
I have this same problem but it all started with me when I upgraded to windows 10 from 8.1. When I stream movies from my computer to TV now I have two to three of the same files in the video folder and don't know why. I'll check back to see if you get it resolved.

Re: Problem: Duplicate entries for the same file

PostPosted: Mon Dec 14, 2015 10:26 am
by burgatshow
czcon12 wrote:I have this same problem but it all started with me when I upgraded to windows 10 from 8.1. When I stream movies from my computer to TV now I have two to three of the same files in the video folder and don't know why. I'll check back to see if you get it resolved.


To be honest, I am a little bit happy that I am not alone in the userbase. If it is very annoying to you, check my temporary workaround (remove file, update, add file, update). A bit annoying, but you can remove duplicates. :)

Re: Problem: Duplicate entries for the same file

PostPosted: Mon Dec 14, 2015 7:29 pm
by zip
can you replicate it with detailed log?

there are 10 seconds between the two log entries, so I'd like to know how that happened

Re: Problem: Duplicate entries for the same file

PostPosted: Tue Dec 15, 2015 7:52 am
by burgatshow
zip wrote:can you replicate it with detailed log?

there are 10 seconds between the two log entries, so I'd like to know how that happened

Sure, I'll come back when will happen again. Thanks for that!