Jump to content

Batch update the "sort title" using API


Recommended Posts

Posted

The "sort title" automatically removed the "the" in front of the title and this is a problem for my usecase.

 

I'm looking into the API, I have found the `get emby/Items` endpoint to fetch a single item, but the sort title is not there.
I tried to call the endpoint to update one item using this curl:

 

```

curl -X "POST" "https://emby.jumpjump.link/emby/Items/122190?api_key=xxxxxxxxx" \
     -H 'Content-Type: text/plain; charset=utf-8' \
     -d "{ \"ForcedSortName\": \"asdfas\" }"

```

 

assuming that `ForcedSortName` is the property I'm looking for..but no luck I get a `400 - Value cannot be null. (Parameter 'source')`

 

Thanks

 

Happy2Play
Posted

You should edit your system.xml <SortRemoveWords> and Refresh metadata to rewrite.

  <SortRemoveWords>
    <string>the</string>
    <string>a</string>
    <string>an</string>
    <string>das</string>
    <string>der</string>
    <string>el</string>
    <string>la</string>
  </SortRemoveWords>

As you have a factor of do you write nfo files or not.  If you don't then updating via the api or directly in the database should work.

 

Don't believe there is a ForcedSortName

Item Information (emby.media)

 

Don't know what exactly you are trying to do but most likely you might have to lock Sort title also depending on what exactly you are trying to accomplish as SortName could always revert per system settings.

image.png.4c65b30b38da93330e0a32191a277dc3.png

Posted

thanks! editing the xml solved the problem

  • Thanks 1

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