Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Device don't change device name in the devices page #4882

Closed
TravelerVFX opened this issue Oct 15, 2023 · 8 comments · Fixed by #4887
Closed

Rename Device don't change device name in the devices page #4882

TravelerVFX opened this issue Oct 15, 2023 · 8 comments · Fixed by #4887
Labels
bug Something isn't working

Comments

@TravelerVFX
Copy link

TravelerVFX commented Oct 15, 2023

Describe The Bug
When a device is renamed, the name isn't changed on the devices page.
On the Dashboard page, the device name is the new name.

Steps To Reproduce

  1. Go to 'XXXXX/web/index.html#!/devices.html'
  2. Click on the 3 vertical points of a device
  3. Click on 'Edit'
  4. Add name
  5. Click 'Save`
  6. Click '<-' top left corner
  7. The device name isn't changed

Expected Behavior
The device name should have been changed

Logs
No log activity of this issue

Screenshots
Screenshot 2023-10-15 at 11 07 14
Screenshot 2023-10-15 at 11 18 46

System (please complete the following information):

  • Platform: [Mac]
  • Browser: [Firefox]
  • Jellyfin Version: [10.8.11]
@TravelerVFX TravelerVFX added the bug Something isn't working label Oct 15, 2023
@nielsvanvelzen
Copy link
Member

Does this happen to all devices or only the ones from the Home Assistant integration? Last time I checked the integration did not implement our API correctly which could introduce issues like this one.

@sevenrats
Copy link
Member

I tested on a chrome browser instance and on a roku

@TravelerVFX
Copy link
Author

Does this happen to all devices or only the ones from the Home Assistant integration? Last time I checked the integration did not implement our API correctly which could introduce issues like this one.

Yes it's happening on all devices

@TravelerVFX
Copy link
Author

I tested on a chrome browser instance and on a roku

Same on Safari

@DaftFuzz
Copy link

I wonder if this may be intentional - the display name is set correctly and reported in, for example, the Activity section with the correct device display name on playback.

This is being saved as a separate entity to the device "name", which appears to not be user-settable (or certainly isn't affected by the process of editing the device as above).

@scampower3
Copy link
Member

I can confirm that it happens on Firefox too.

Looking here, this part of the code only uses the Name.

deviceHtml += "<div class='cardText'>";
deviceHtml += escapeHtml(device.Name);
deviceHtml += '</div>';
deviceHtml += "<div class='cardText cardText-secondary'>";
deviceHtml += escapeHtml(device.AppName + ' ' + device.AppVersion);
deviceHtml += '</div>';
deviceHtml += "<div class='cardText cardText-secondary'>";

I think the main problem is that the /Devices api endpoint only provides the Name and not the CustomName. I can see 2 ways of solving this issue:

  1. Update the /Devices api endpoint to include CustomName in its response.
  2. In devices.js, make requests to the /Devices/Options api endpoint for each of the device ids.

@nielsvanvelzen
Copy link
Member

I think adding the custom name to the /Devices endpoint and then showing that in the dashboard is fine. Perhaps we could show it like Custom name (original name), although if you set a custom name yourself you probably don't need to see the original one.

@TravelerVFX
Copy link
Author

I think adding the custom name to the /Devices endpoint and then showing that in the dashboard is fine. Perhaps we could show it like Custom name (original name), although if you set a custom name yourself you probably don't need to see the original one.

If I have a vote, I would prefer to display just the Custom name :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants