-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
[WIP] [iOS] Refresh, Edit, or Delete Media Items #1305
base: main
Are you sure you want to change the base?
Conversation
Parental Warning is giving a weird error but otherwise works. Studios and Cast need an option to select. Need to add in 3D format & Original Aspect Ratio. Need to localize the Metadata sections, Need to localize all strings in new sections Need to test Movies, Series, BoxSets once the above are done for Episodes
Hey @LePips no rush at all, but part of the metadata I am trying to wrap my head around allowing edits are Studios, Genres, People, and Tags. These are lists of values and I've gotten a system around editing them but I'm getting stumped on UI stuff again. Since these are edit screens, I made them modal but then I have trouble working around the X button in the top left. This is my current version below: Also, I am so sorry how big this one is getting. There are lot of these that are just extensions on existing enums but let me know if there is a good way for me to split these out! I could remove the Studios / Tags / People / Genres and make those their own PR but the whole mess of MetadataEditorView sections all need to kind of go together. Let me know! |
…ir own view. Once these are on their own view I should be done. Likely want feeback on existing two views first to avoid issues
I would actually like the |
…tive buttons. Very close to being ready.
Current state of this: This PR contains the ability to edit all item metadata or delete an item. All items are functional and work in editing Jellyfin items on the server. I've updated all my screenshots on the main post to reflect this state. However there are some issues I need to work out:
This PR is frankly massive but there is some room to trim down:
Things that would be cool but I'm not sure what/how to do it:
|
Per my comments in #1296 around the button styling, I would ideally want something similar for that row of buttons on iOS. The same issue with button crowding would still exist here, but luckily this and many other actions might be better on iOS in a I've looked at adding more navigation bar items before but I can't seem to find the code for the specific style that I want these buttons to be and how they would change in style how the Apple TV app does it when you scroll... so I'll have to remake that to provide some guidance. |
I can add that to the final version of this! I think edit/delete is better there as well since it's more out of the way. I don't imagine these are functions that people will be using that often so toolbar makes a lot of sense. One question, this PR is very close to being ready. From there, I am going to break it up into more digestible parts for approval. This is more just a place for me to get my head around everything before I start splitting this up. That all being said, I wanted to check with you if this is the correct way I should be doing my ViewModels for this: I tried to model this after ItemViewModel. I'd appreciate some feedback! I have one outstanding item where I have a dismissCoordinator that is crashing Swiftfin when it's triggered but only for 2 out of the 6 views. Once I have that, I'll start splitting this out for Review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ItemDetailsViewModel
works looks good to me!
|
||
// MARK: - Update Item on Server | ||
|
||
func updateItem(_ newItem: BaseItemDto, refresh: Bool = false) -> State { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the reason we would want to refresh locally vs on the server? I see that we do so differently based on the genres, people, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the Genre & Tag are just [String] updating item = newItem
just works. However, the person/studio is being input as a name. Jellyfin turns these into full BaseItemPerson/NameGuidPair. I've tried updating it as item = newItem
but the list view isn't able to get the image for the person and the Studio doesn't actually link to a Studio object since it's just guid=nil
and name=name
.
The only reason I'm not updating the Genre and Tag is it felt unnecessary.
The other route for this is to make the addPeople/addStudio view look up the item instead of just inputting from a name. I'd be game to make those lookups on the server but I might need some guidance on what we'd what that view to look like.
I spun off the first batch of this to #1310. All of the next steps are done on this PR here but there is still 1 bug that I need to work out so the impact views for that bug are going to be last:
|
Summary
The goal is to allow refreshing metadata for a select media item. Additionally, allow for manually editing metadata from iOS. I want to get the refresh working from tvOS but have no intention on allowing tvOS to change metadata text.
Eventually, I want to add the ability to add/edit metadata images, and edit subtitles but that's going to be in a later PR. Images and Subtitles require files to POST API so those are going to be a slower process.
To Do:
Screenshots
New Button (Admin Only)
Genres
Main
Metadata
People
Studios
Tags