Jump to content

Collection Duplicates Itself?


Netfool
Go to solution Solved by Carlo,

Recommended Posts

Netfool

Had an odd occurrence today and I'm baffled as to how to remedy it.  I was doing some reorganization of the movie library now that I better understand the interactions of Libraries, Collections, Folders and Genres.  When I opened the Collections Library I found that the collection I had been most recently working on had dupliated itself.  Same name, same content in each:

1820588331_ScreenShot2020-08-05at1_45_02PM.thumb.png.8129e4c8fd15b71794b3abd323e78f60.png

The most puzzling part is that there is only one folder with that name in com.emby.embyserver/files/data/collections and that folder contains only one collection.xml file.

1219115664_ScreenShot2020-08-05at1_46_30PM.png.3756c1c63658f44b7e98909a0b84b71c.png

A Shield system restart did not change the situation.

Edited by Netfool
Typo correction
Link to comment
Share on other sites

If you were in the middle of a refresh ignore and check again when the library scanning is complete.

Let us know if the dupe is gone after the library refresh is complete.  Go back to main screen and enter collections again to check.

Link to comment
Share on other sites

Netfool

No joy.   Did a library scan from the Scheduled Tasks menu in the Dashboard to be sure everything got scanned.   Still looks the same.

Although it only appears once in the Folders View of the Movies Library:

1057730781_ScreenShot2020-08-05at2_25_51PM.thumb.png.90303a6280cc683813af0dc2d89c0b69.png

 

Edited by Netfool
Add screenshot.
Link to comment
Share on other sites

Happy2Play

This would be rouge entries in your database.  If you removed the items that makeup the collection from your library and do a library scan, then search for those items and the collection to ensure they are not still showing in Emby, then re-add the media.  Do you get the same results? 

Note Folder view is totally different then the virtual created collections.

Link to comment
Share on other sites

Netfool
4 minutes ago, Happy2Play said:

Note Folder view is totally different then the virtual created collections.

True, but the Folder view includes collections on at the top along with folders.

5 minutes ago, Happy2Play said:

If you removed the items that makeup the collection from your library and do a library scan, then search for those items and the collection to ensure they are not still showing in Emby, then re-add the media.

OK... and if they are still there what's the procedure to fix it?   It's 25 files so this will take a bit of doing.

Link to comment
Share on other sites

Happy2Play
1 minute ago, Netfool said:

OK... and if they are still there what's the procedure to fix it?   It's 25 files so this will take a bit of doing.

If they still exist after removal that would mean that item path is corrupt in the database, you could attempt to delete them via the UI, and if you can't then your options are New library paths, attempt to delete the entries within the database itself (Backup original db before manual manipulation) or deleting your current database and starting over.  Note your userdata is in the database also so additional steps would be required be starting a new database.

Link to comment
Share on other sites

Netfool

...and then there were three !

2008905886_ScreenShot2020-08-05at5_39_38PM.thumb.png.d31f7d29b0febfff3a9e8bca515fa433.png

So I moved all of the directories (one per movie file)  that were formerly in that collection to a temp directory outside the scope of the media store.  I then did a Library scan from the Scheduled Tasks menu in the dashboard.   ....all was well at that point.  None of the titles appeared in the Movies View, and the Collections View no longer showed that collection.

Then I moved 21 of the directories back into the Movies directory in the  media store.  At that point I was interrupted by the real world for about two hours.  When I returned I added each of the 21 to the Charlie Chan Collection.  When I added the second one I noticed that the primary image for the collection was still set to the image I had selected earlier (added from Google Images, not in the regular metadata).  I added the remainder of the 21, exited the Movies View, re-opened the Movies View and the Collection appeared in the correct location alphabetically.  I clicked on the collection and all 21 movies were there.

Then I started adding the remaining movies. I moved two into the media store and looked at the Movies View.  They did not appear, so I clicked on the ... menu in the Movies Library Icon and selected Scan Library Files.  Nothing happened (i.e. no little progress spinner).   I tried that again, and again nothing happened.    I then did a Scan Library Files from the Scheduled Tasks Menu in the Dashboard.  When I looked at the Collections View the result was what appears in the screenshot above.

Where is the list of collections stored?

Link to comment
Share on other sites

Happy2Play

If there is only one in com.emby.embyserver/files/data/collections location, this would mean your database is holding multiple collections entries as the three should have different ids in the url.

Only thing I can think of is entering  the duplicates and selecting delete until you only have one remaining.  Or moving the media to a new library path since the orginal path has duplication in the database, you will want to ensure you delete the collection in com.emby.embyserver/files/data/collections or manually update the paths in the collection.xml if media is relocated.

Link to comment
Share on other sites

Hover your mouse over one of the dupe collections.  Do you get the 3 dots?

If so select the option to delete the collection.

Repeat until 1 left.

Did that work?

Link to comment
Share on other sites

Netfool
2 hours ago, cayars said:

Hover your mouse over one of the dupe collections.  Do you get the 3 dots?

If so select the option to delete the collection.

Repeat until 1 left.

I did that and then did a library scan from the Scheduled Tasks menu in the Dashboard.

After that there was no third collection (see comments to @Happy2Play below).  I created the collection anew and reassigned each of the movies to the new collection.

I did another library Scan from the Scheduled Tasks menue and finally added the primary image (which did not magically reappear this time).

All appears to be well.                     ...for the moment at least.

5 hours ago, Happy2Play said:

If there is only one in com.emby.embyserver/files/data/collections location, this would mean your database is holding multiple collections entries as the three should have different ids in the url.

As I was following @cayars recommendation above, I noticed that the url for all three was:

/storage/emulated/0/Android/data/com.emby.embyserver/files/data/collections/Charlie Chan Movies [boxset]

(On the third set I selected delete to inspect the url, but hit Cancel.)

So I never saw "different ids in the url".   You reference the "database".  I don't see a database in the file structure.  There are various XML and JSON files, but nothing that looks like a database.

 

The unsettling bit in all this is while the problem is gone I have no inkling what caused it or how to prevent it in the future.

 

Edited by Netfool
Added conclusion.
Link to comment
Share on other sites

I "think" I've seen it happen when you stop a refresh manually and it was working on things part of a collection.

Link to comment
Share on other sites

Netfool
3 hours ago, cayars said:

...when you stop a refresh manually...

If by refresh you mean a library scan, then we're back to the problem that the only way I can think of to interrupt one is to do a Shield Restart from the remote, and there is no indication available on the TV screen that any specific process is in progress.  Scans, are visible in the WebUI and things like transcodes and conversions are only visible in the WebUI Dashboard.  (Those two things are usually in separate rooms here, unless I drag a laptop into the family room each time I pick up the remote).    Maybe clicking on Scan Library Files in the ●●● menu in the library a second time when nothing appears to be happening for 10 seconds or so could do it.  I did do that in the process of building the collection before everything started multiplying like rabbits.  

Is there a reason you can do a server restart from the dashboard on a linux-based Emby Server, but not on the Shield version?  The only choice there is to reset the entire Android O/S, and I don't think it can be done remotely, unless there's a way to ssh into it that I don't know about.

Link to comment
Share on other sites

  • Solution

Yes a library scan and resetting the box is worse than just telling Emby to stop the scan. That's like a PC reset.

If you don't have a PC handy an Android phone or tablet can be used to admin the server.

Sorry for the short reply (mobile phone).

Link to comment
Share on other sites

Netfool

I have an ancient Android tablet that hasn't been powered on in at least a couple of years.  I'll see if I can even get it to work.   I've also got an old Sony Z3, but it's left over from the Mozilla Firefox OS project.  Maybe I can reflash it back to Android.  What's the name of the Android remote admin program?

 

Link to comment
Share on other sites

Netfool
1 hour ago, cayars said:

Yes a library scan and resetting the box is worse than just telling Emby to stop the scan

...and how do you tell Emby to stop the scan?

Link to comment
Share on other sites

1 hour ago, Netfool said:

 What's the name of the Android remote admin program?

Emby for Android :)

38 minutes ago, Netfool said:

...and how do you tell Emby to stop the scan?

If you do a full scan the job will be right on the Dashboard and you can stop it there.   If you run it from the scheduled task you can stop it there as well.

Link to comment
Share on other sites

What version of Emby Server are you running? Is a new duplicate created everytime you run a library scan?

Link to comment
Share on other sites

Netfool
10 hours ago, Luke said:

What version of Emby Server are you running? Is a new duplicate created everytime you run a library scan?

No it's behaving itself now.  Somehow I had managed to put it into a very strange state.    The chief suspect as to how I managed to do that is probably a system reset while a scan was running, but I have no idea how to verify that.  ...and the recovery process is annoying enough I'm not enthusiastic about trying to reproduce it.   It's impossible from the UI on the TV to know what processes are running when contemplating a reset.  That's only visible from the webUI dashboard (...and even then only sort of).

This is Emby Server 4.4.3.0 on an Nvidia Shield Pro.

Link to comment
Share on other sites

Netfool
11 hours ago, cayars said:

If you do a full scan the job will be right on the Dashboard and you can stop it there.   If you run it from the scheduled task you can stop it there as well.

Yes... found those, but I wasn't doing full scans, I was just scanning the Movies Library when the problem occurred. 

Link to comment
Share on other sites

You really want to stay away from Shield TV resets if running a server on it.  Instead use a client to restart Emby (gracefully) if that is the objective.

A phone, table or PC will do the trick for this as they expose the admin UI that a TV UI doesn't.

Link to comment
Share on other sites

Netfool
2 hours ago, cayars said:

You really want to stay away from Shield TV resets if running a server on it.  Instead use a client to restart Emby (gracefully) if that is the objective.

A phone, table or PC will do the trick for this as they expose the admin UI that a TV UI doesn't.

There is apparently no restart on the webUI, just a shut down server, and afaik no way to start the server on a shield without restarting the shield.  So the right procedure is to shut it down through the webUI and then restart the Shield?   There is a restart in the webUI if you're talking to an Emby Server on a linux box, but not on the shield.  

935465761_ScreenShot2020-08-07at10_16_45AM.thumb.png.1a71d65b41e40c825ac3096de994bc8b.png

Emby Server on Nvidia Shield Pro 

 

1751975524_ScreenShot2020-08-07at10_12_35AM.thumb.png.877be12ad204f9a373a308faf26c159d.png

Emby Server on Ubuntu 18.04 LTS:       

 

...or am I missing something?

 

Link to comment
Share on other sites

Netfool
7 minutes ago, cayars said:

Shut it down and restart it on the shield?

As far as I can tell that's the only path available.   Is that expected behavior on Android, or should somebody file a bug?  (I have very little experience with Android as an O/S).

...but it really is awkward to have to use two different devices to restart emby server.

Is there any way to ssh into Android on the Shield?

Link to comment
Share on other sites

Netfool
On 8/6/2020 at 11:24 AM, cayars said:

If you don't have a PC handy an Android phone or tablet can be used to admin the server.

 

iOS devices seem to work as well.

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...