Jump to content

Recommended Posts

brothom
Posted

I've noticed some of my songs (or more likely, albums) are being duplicated on Emby's side.
I haven't found a 1-on-1 method to reproduce, but it seems to happen to albums that are moved from one folder to another or when the parent folder is renamed.

The songs from the screenshot also show the exact same path for each song.

image.thumb.png.65404fdffb07addb1d1c08054a94f6ee.png

Refreshing metadata or scanning library files (per song, artist or album) doesn't remove the duplicates

Moving the folder out of all of Emby's library folders, scanning (waiting for the album to be removed) and adding it back in seems to resolve the issue, but that's not a very practical workaround.

Does anyone have any clue what's going on or how this can be fixed from within Emby?

Neminem
Posted

I guess you need to reproduce it and then supply logs.

If you don't have logs from that time.

But no I have not see that before.

brothom
Posted (edited)
8 minutes ago, Neminem said:

I guess you need to reproduce it and then supply logs.

If you don't have logs from that time.

But no I have not see that before.

Yeah this one's a real pain.

When I view either duplicate items, they go to the same item ids URL, so they seem to share the same ID.

They also show up twice in search results so it's not something specifically with the album's playlist.

It's almost as if the entry exists in multiples in the DB which is weird considering I would assume the item ID to be a primary (unique) key.

Let's see what else I can dig up.

Edited by brothom
  • Like 1
Posted (edited)

Hey, the only time I had ever seen this previously is when there were two copies on an album - in same or different folders - sometimes exactly the same audio format (e.g.) mp3 and mp3 or sometimes (e.g.) mp3 and flac.

But I know you are careful with what you do, so just tried to replicate now and I did find one one experimental way to get to happen with 4.10.0.3 (so far): I moved an album folder from one parent albumartist folder to another

  • Then rescanned the new parent albumartist folder only, via the music folders menu tab
  • Now Emby sees two sets of the songs under the album (like you are experiencing) 
  • Then rescanned the original parent albumartist folder (that doesn't have the album folder anymore)
  • Now Emby only sees the one set of songs under the album 

Typically, when I modify or add new music files I scan the relevant parent folder, which mostly works. There has been some weirdness lately with the last couple of stable versions that has been difficult to replicate, but requires refreshing virtual album metadata as well.

Not sure if this will help, but perhaps try just rescanning both parent folders that have been changed and see if that works? Should be much quicker than scanning your whole music library at least!... (I'm still trying a few more things)...

Edited by user24
brothom
Posted
22 minutes ago, user24 said:

Not sure if this will help, but perhaps try just rescanning both parent folders that have been changed and see if that works? Should be much quicker than scanning your whole music library at least!... (I'm still trying a few more things)...

Cool you managed to somewhat duplicate that this issue though, thanks for letting me have my sanity!

No clue what folder it was previously in so that's pretty hopeless. I've rescanned the entire library (doesn't take that long on my device) but the duplicates are still there.

Expanding on what I've figured out so far; there do seem to be some duplications going on. The Items query returns exact duplicates when fetching the album data:

[
    {
        "Name": "Taurus",
        "ServerId": "XXXXXX",
        "Id": "156408",
        "CanDelete": false,
        "CanDownload": true,
        "SupportsSync": true,
        "RunTimeTicks": 2889733330,
        "IndexNumber": 1,
        "ParentIndexNumber": 1,
        "IsFolder": false,
        "Type": "Audio",
        "ParentLogoItemId": "114715",
        "ParentBackdropItemId": "114715",
        "ParentBackdropImageTags": [
            "cfb85da384eb0195e89c619ee0f97a0a"
        ],
        "UserData": {
            "PlaybackPositionTicks": 0,
            "PlayCount": 0,
            "IsFavorite": false,
            "Played": false
        },
        "PrimaryImageAspectRatio": 1,
        "Artists": [
            "HAKEN"
        ],
        "ArtistItems": [
            {
                "Name": "HAKEN",
                "Id": "114715"
            }
        ],
        "Composers": [],
        "Album": "Fauna",
        "AlbumId": "156476",
        "AlbumArtist": "HAKEN",
        "AlbumArtists": [
            {
                "Name": "HAKEN",
                "Id": "114715"
            }
        ],
        "ImageTags": {
            "Primary": "2ed0f3becdef68ac3b3ca37029d31ca5"
        },
        "BackdropImageTags": [],
        "ParentLogoImageTag": "fc6e7fcae749ed87f77874145de63fbd",
        "MediaType": "Audio"
    },
    {
        "Name": "Taurus",
        "ServerId": "XXXXXX",
        "Id": "156498",
        "CanDelete": false,
        "CanDownload": true,
        "SupportsSync": true,
        "RunTimeTicks": 2889733330,
        "IndexNumber": 1,
        "ParentIndexNumber": 1,
        "IsFolder": false,
        "Type": "Audio",
        "ParentLogoItemId": "114715",
        "ParentBackdropItemId": "114715",
        "ParentBackdropImageTags": [
            "cfb85da384eb0195e89c619ee0f97a0a"
        ],
        "UserData": {
            "PlaybackPositionTicks": 0,
            "PlayCount": 0,
            "IsFavorite": false,
            "Played": false
        },
        "PrimaryImageAspectRatio": 1,
        "Artists": [
            "HAKEN"
        ],
        "ArtistItems": [
            {
                "Name": "HAKEN",
                "Id": "114715"
            }
        ],
        "Composers": [],
        "Album": "Fauna",
        "AlbumId": "156476",
        "AlbumArtist": "HAKEN",
        "AlbumArtists": [
            {
                "Name": "HAKEN",
                "Id": "114715"
            }
        ],
        "ImageTags": {
            "Primary": "2ed0f3becdef68ac3b3ca37029d31ca5"
        },
        "BackdropImageTags": [],
        "ParentLogoImageTag": "fc6e7fcae749ed87f77874145de63fbd",
        "MediaType": "Audio"
    }
]

I'm now going to try to reproduce this more accurately from my end. Will keep you guys posted, thanks so far.

user24
Posted

Perhaps not 100% fully duplicated - even though can I get the two sets of songs quite easily - the paths are different - even though only one is true - the database sees both - likely due to the partial/folder only scan

Anyway, I have been finding various music modifications particularly difficult to take effect since the last two stable versions - Luke says it is fixed - but I'm not completely sure it is??? - therefore I've been doing similar to your method - remove the offending album folder altogether - rescan the parent folder to remove it from the db - then put it back and rescan - a bit frustrating - but it does work.

I'll check back later to see if you've found anything...

brothom
Posted

What didn't solve the issue:

Scan/refresh meta of library
Scan/refresh meta of album
Refresh meta of artis
Rename folder -> scan complete library

The only way to solve it was:

Remove folder from library -> scan library (wait until complete) -> movie folder back into library

Upon closer inspection all other albums of this artist were also affected by duplicates.
@user24I think you actually found the proper way to replicate it, but no clue how I managed to move those folder into an other artist's.

I also couldn't reproduce it by: 

Rename folder
Duplicate folder with other name -> rescan (shows duplicates) -> remove folder (duplicates gone)
Rename folder -> scan -> move back

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