Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Fix Various Issues With The fileorganizer Dialog #18

Merged

Conversation

mark-monteiro
Copy link
Contributor

@mark-monteiro mark-monteiro commented Dec 11, 2019

This PR addresses several issues with the fileorganizer dialog:

  • Initialize label for media selector correctly
  • Replace 'Emby' with 'Jellyfin' in error message
  • Display a default error message if none is provided by the server
  • Open the fileorganizer dialog only after it has been fully initialized
  • Add more detail to unhanded server errors

NOTE: The version number for the plugin has not been updated here. I'm not sure how releases are performed and how changes should be coordinated with the existing PR #17

dlg.querySelector('#selectMedias').setAttribute('label', 'Movie');
dlg.querySelector('[for="selectMedias"]').innerHTML = 'Movie';
mediaSelector.setAttribute('label', 'Movie');
if (mediaSelector && mediaSelector.setLabel) mediaSelector.setLabel('Movie');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the dialog first opens, the <label> element for the selector has not yet been created so we check for that here. The label text is still initialized correctly by the emby-select component when it loads using the label attribute value. See: https://github.com/jellyfin/jellyfin-web/blob/master/src/components/emby-select/emby-select.js#L151

}

// Show dialog
dialogHelper.open(dlg);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open the dialog only after all other initialization has completed so that it is ready to be viewed

@anthonylavado
Copy link
Member

Alright - Now that the plug-in has been updated with the other reps, I'll review this one, and if it's good, we'll cut a release.

@anthonylavado anthonylavado merged commit b15d168 into jellyfin-archive:master Dec 14, 2019
@mark-monteiro mark-monteiro deleted the fix-fileorganize-dialog branch December 14, 2019 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants