Jump to content

Strange 'Merged' Library Items


Recommended Posts

kingy444
Posted

I have been working with the API, unrelated to the issue, but just how i found it.

I was testing the SearchTerm functionality of /users/{userid}/Items and looking for item Wood for the Trees simply because it was unique and should return one result

Questions:

  • This is super strange, any idea how this could happen?
    All the MediaStreams are completely different folders. Not sure how this could be accidental
  • All users (except one) seem to return the duplicate - i cant tell why this one user only sees one as they have full library access.
  • I feel like i did see one of these before and think i resolved manually by 'Splitting Versions', but into the next question:
    Is there a good way to identify others that may be in this state? API is fine to use obviously
  • Ideally would obviously like to avoide being in this state again

 

Name                    : Wood for the Trees
Id                      : 575852
CanDelete               : False
SupportsSync            : True
Container               : mp4
RunTimeTicks            : 15864400000
ProductionYear          : 2014
IndexNumber             : 1
ParentIndexNumber       : 1
IsFolder                : False
Type                    : Episode
UserData                : @{PlaybackPositionTicks=0; PlayCount=0; IsFavorite=False; Played=False}
SeriesName              : Utopia (AU)
PrimaryImageAspectRatio : 1.7777777777777777
SeasonName              : Season 1
ImageTags               : @{Primary=0bc87c1164e7e162154af91f4e645ac4}
BackdropImageTags       : {}
MediaType               : Video


image.png.c6b437165c2728804c94d46b53b85032.png

Name                    : Wood for the Trees
Id                      : 571773
CanDelete               : True
SupportsSync            : True
Container               : mp4
RunTimeTicks            : 15864400000
ProductionYear          : 2014
IndexNumber             : 1
ParentIndexNumber       : 1
IsFolder                : False
ParentId                : 571008
Type                    : Episode
ParentLogoItemId        : 571007
ParentBackdropItemId    : 571007
ParentBackdropImageTags : {d420450616fee2f1ab27af262f74dbeb, bdf2d64007394be69f3f7f267812298d, 7355651495fcd3fb9b54922173791e7a, c5e1a92dbaa17246be3440e53ebb346b}
UserData                : @{PlaybackPositionTicks=0; PlayCount=3; IsFavorite=False; LastPlayedDate=2023-07-03T11:48:13.0000000Z; Played=True}
SeriesName              : Utopia (AU)
SeriesId                : 571007
SeasonId                : 571008
PrimaryImageAspectRatio : 1.7777777777777777
SeriesPrimaryImageTag   : 1880c148faa85d2fc8ca80f91e2a36d9
SeasonName              : Season 1
ImageTags               : @{Primary=0bc87c1164e7e162154af91f4e645ac4}
BackdropImageTags       : {}
ParentLogoImageTag      : 7c51e2140c082ac834c84c42787adacd
ParentThumbItemId       : 571007
ParentThumbImageTag     : f79d4d508e17a3c2fb6e0fa70fce191f
MediaType               : Video

image.png.9b81465239a850d049f6e6cffba84a65.png

Posted

They are all S1 E1 so I would check to see if this is also the same for all of them:

SeriesId                : 571007

 

kingy444
Posted

Thanks for the quick response

😤 The issue had persisted a couple of days so i thought emby was not going to sort itself (library scans etc). Just had a server reboot (windows patching) and on reboot the duplicate merged item has disappeared (and the API call is also returning one result)

Any thoughts on identifying if there are other items that are in this state since i cannot now perform the above check? (575852 being the now deleted item here)

visproduction
Posted (edited)

1) Try removing the dots between the words and condensing series and episodes without the space S01E01.  It's just a guess. Search code could use '.' as any character depending on how the search code is written and space between series and episodes numbers could cause sorting issues. 

2) Creating folders, as suggested, in the naming guide https://emby.media/support/articles/Movie-Naming.html would help. 

I use NameoftheShow Season 1 as the folder name and inside media files NameoftheShow S02E01 EpisodeName - 720P.mp4.  I have not had your grouping problem.

Finding the inproperly grouped and fixing them, one at a time, is unnecessary. Once you reorganize your files into folders, according the official guide and rescan the library the improper grouping should all be fixed.  It's a much better solution.  If you manually fix things and your folder naming is still wrong, I think it's possible that the bad name grouping may show up again with a new version release of Emby.

Hope that helps.
 

Edited by visproduction
kingy444
Posted
1 minute ago, visproduction said:

1) Try removing the dots between the words and condensing series and episodes without the space S01E01.  It's just a guess. Search code could use '.' as any character depending on how the search code is written and space between series and episodes numbers could cause sorting issues. 

2) Creating folders, as suggested, in the naming guide https://emby.media/support/articles/Movie-Naming.html would help. 

I use NameoftheShow Season 1 as the folder name and inside media files NameoftheShow S02E01 EpisodeName - 720P.mp4.  I have not had your grouping problem.

Finding the inproperly grouped and fixing them, one at a time, is unnecessary. Once you reorganize your files into folders, according the official guide and rescan the library the improper grouping should all be fixed.  It's a much better solution.  If you manually fix things and your folder naming is still wrong, I think it's possible that the bad name grouping may show up again with a new version release of Emby.

Hope that helps.
 

Unfortunately not - All media is named according to the naming guide - each of these episodes resides in a folder under TV/Series/Season

As for the dot in the filename thats the formatting used throughout the library so doubtful that is the cause.

So as structure follows standards, unfortunately finding those affected is still required 

Posted

There is one other similar report of this, not sure of the cause yet, but looking into it.

visproduction
Posted

King...  Hmmm OK, Nothing updates until you run a library scan or wait long enough that an update happens.  That might be part of this.

Windows can search for files with .mp4, .mkv for an entire drive.  Then you could sort by name and see which are duplicated.  Unfortunately Windows does not easily save the results to a file, but you can do that in command line or with Linux.  I use Windows Command window:
 

dir /b /s *.mkv > results_mkv.txt
dir /b /s *.mp4 > results_mp4.txt

Open a good editor and sort alphbetically.  That helps a little. 

There are utilites that search for duplicate names. Glary Utilities for Windows has such an option. https://www.glarysoft.com/duplicate-cleaner/

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...