• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Development Server Development Change Item's Name using the API

     
    • 0 Vote(s) - 0 Average

    Change Item's Name using the API

    Change Item's Name using the API
    Facundo Batista
    Offline

    Junior Member

    Posts: 6
    Threads: 4
    Joined: 2023 Dec
    Reputation: 0
    #1
    2023-12-12, 01:43 PM
    Hello!

    tl;dr: I cannot set the item's name, I get a 400.

    I'm getting an item from the SERVER/Items endpoint, if I print it I see:

    Code:
    {'BackdropImageTags': ['88c073d8ed4d352f1b9dc2a7fca2029b'],
    'ChannelId': None,
    'CommunityRating': 7.607,
    'Container': 'mkv,webm',
    'CriticRating': 94,
    'HasSubtitles': True,
    'Id': '664d7ffdf0922c7eee0ea4f611481ae4',
    'ImageBlurHashes': {
        'Backdrop': {'88c073d8ed4d352f1b9dc2a7fca2029b': 'WKJ$~m%Lbu5,-o^Pi_-VIpNGNa$j0|n$Rj=|%1w^t6-os.w]xZ9]'},
        'Logo': {'77deb07dd1c82eb0aa484c6db58cf951c': 'HRKj+Mt75+n%I:J7NaR*oL}Fn%-BWVxaf+soayNa'},
        'Primary': {'49425ae25bbc6c83304e8dc48eae0d30': 'dbKdPd?Go}?Gcu%2xst7KmNG$*t6IvxtoIay9bs+R%R*'}
    },
    'ImageTags': {
        'Logo': '77deb07dd1c82eb0aa484c6db58f951c',
        'Primary': '49425ae25bbc6c83304e8dc48eae0d30'
    },
    'IsFolder': False,
    'LocationType': 'FileSystem',
    'MediaType': 'Video',
    'Name': 'El día de la marmota',
    'OfficialRating': 'PG',
    'OriginalTitle': 'Groundhog Day',
    'Path': '/data/Permanente/Eterno/Groundhog Day.mkv',
    'PremiereDate': '1993-02-11T00:00:00.0000000Z',
    'ProductionYear': 1993,
    'RunTimeTicks': 60641710080,
    'ServerId': '621086aaa8ef40939c2945a44a7b37bc',
    'Type': 'Movie',
    'VideoType': 'VideoFile'}


    So I change the name and then hit update:

    Code:
        media["Name"] = "Groundhog Day"
        resp = requests.post(f"{jf_server}/Items/{media['Id']}", json=media, headers=headers)

    All I get is a 400 response, just "Error processing request." in the response text.

    The server logs are not providing more info:

    Code:
    [2023-12-12 10:16:23.299 -03:00] [ERR] Error processing request. URL "POST" "/Items/664d7ffdf0922c7eee0ea4f611481ae4".
    System.ArgumentNullException: Value cannot be null. (Parameter 'source')

    (I couldn't find a "source" in that endpoint parameters)

    Any clue what's going on? Thanks!
    tmsrxzar
    Offline

    Senior Member

    Posts: 755
    Threads: 6
    Joined: 2023 Nov
    Reputation: 20
    #2
    2023-12-12, 06:39 PM
    my solution to such issues is using the developer panel on the browser then inspect the calls when i do it manually then duplicate into my own code, i am honestly not even sure where the api documentation is
    give it a try, it's best recommendation i can give
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode