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

Remove broken features from web interface #37

Merged
merged 17 commits into from
Jan 20, 2019
Merged

Remove broken features from web interface #37

merged 17 commits into from
Jan 20, 2019

Conversation

dkanada
Copy link
Member

@dkanada dkanada commented Jan 15, 2019

Several components in the javascript API don't have any source code available, including wakeonlan, serverdiscovery, cameraroll, and fileupload, which I assume was supposed to be a part of the cameraroll feature. We might want to implement serverdiscovery eventually, but wakeonlan and cameraroll should be removed. I would also like to remove all sync related functionality and simply extend the download feature for mobile as well. I will list some reasons for these actions below that I mentioned in chat, but they are all my personal opinions so everything is open to discussion. My primary reason for removing these features is to make the code easier to maintain without losing any functionality.

  1. wakeonlan is bloat, it shouldn't be handled by a web client, and has no implementation in the API so it is useless at the moment.
  2. cameraroll shouldn't be in the core functionality of this program, a media server should serve media, not upload media. I have no issues with a library type for photos, but there should be no option to upload any media.
  3. sync has support in the API but no support in any client apps, and it shouldn't be handled by the server at all. The current interface for sync doesn't mesh at ALL with the native apps, since the interface (jellyfin-web) was designed for online use and any attempt at a bundled offline option (included in jellyfin-web) will not feel polished. This should be handled by clients themselves either with a portion of native code or an interface that was designed from the start to be used offline as well.
  4. all of these can be supported with third party plugins. If someone wants to make them for their own client I have no problems with that.

This is also a good time to ask what we are doing to sync the jellyfin-apiclient-javascript between its own repository and this project. I don't want to make changes here and then have to manually edit the other repository in the future.

@dkanada dkanada changed the base branch from master to dev January 15, 2019 18:21
@cvium
Copy link
Member

cvium commented Jan 16, 2019

This is also a good time to ask what we are doing to sync the jellyfin-apiclient-javascript between its own repository and this project. I don't want to make changes here and then have to manually edit the other repository in the future.

We should probably do a hard fork from jellyfin-archive/jellyfin-apiclient-javascript@c390d77 and publish it to npm or whatever. Then import with <favorite package manager>.

@dkanada dkanada changed the title WIP: remove several broken features from web interface remove several broken features from web interface Jan 16, 2019
@hawken93
Copy link
Contributor

Looking good :)

var infoHtml = responses[0];
var downloadsHtml = responses[1];

return new Promise(function (resolve, reject) {
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, there's nothing to resolve these new promises unless I'm missing something.

Copy link
Member Author

@dkanada dkanada Jan 19, 2019

Choose a reason for hiding this comment

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

Yeah, turns out I had it right the first time. The promises were only made to call some external methods and they were resolved right here. Without the method calls the promises aren't necessary. I'll remove them in a minute.

Copy link
Member

Choose a reason for hiding this comment

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

The way I see it there's two solutions. Removing the promises and not adding them to the promise array (this one you missed), or resolving them immediately. I prefer the former. Sorry I didn't suggest that instead...

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't that what I did the first time though? I removed the promises and didn't return any values from those two methods.

Copy link
Member Author

Choose a reason for hiding this comment

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

Check the current source for my original solution, I added it again.

Copy link
Member

@cvium cvium Jan 19, 2019

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

How about my latest commit? Removed the return statement so it just loads normally.

Copy link
Contributor

@JustAMan JustAMan left a comment

Choose a reason for hiding this comment

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

LGTM, remaining de-uglification should be done in a separate PR.

@cvium
Copy link
Member

cvium commented Jan 19, 2019

Nice. LGTM now.

@joshuaboniface joshuaboniface changed the title remove several broken features from web interface Remove broken features from web interface Jan 20, 2019
@joshuaboniface joshuaboniface merged commit f28b16c into jellyfin:dev Jan 20, 2019
@dkanada dkanada deleted the remove branch January 20, 2019 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants