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
Get episode range end from XBMC compatible nfo #5166
Conversation
What is the result you are expecting?
and the following as content of the .nfo file:
This is the result I'm getting with the jf-web: The episode still shows as episode 1 in the metadata editor |
Given the exact same folder structure your sent:
If the nfo is missing the system pulls in as: What I noticed: What else I considered: What could be added:
My setup, just for reference:
Reasons of this PR:
|
Thanks for your detailed explanation! What would you think about wrapping the original try/catch-block with the while loop (instead of creating a new one) and replacing this line
with this line
? Nevertheless, I would at least add a comment above the while loop that this is needed because one nfo file can contain multiple |
Additionally, please add tests for this new nfo parsing case |
I think the two xml blocks cannot be easily merged since there could be attributes that shouldn't be overridden (for example displayepisode). That said I moved the second loop inside the try catch so there is only one block now. Also added some comments and a new test for the feature. |
Also I noticed that all the tests have the same typo: succes instead of success, should I make a commit to fix those too? |
Might as well! Eventually we'll make a pass and fix all of the spelling mistakes that snuck in there |
Would it possible to give the admin the option of what separator to use? I prefer to separate my double episodes with a "space slash space" "Episode Title 1 / Episode Title 2" Also is this just for reading preconfigured nfos that are formatted in this way? Is this PR to have Jellyfin write to nfos like this as well when scanning in new media files? |
Currently this PR does not merge episode titles since the goal was to match other metadata providers. It certainly can be done but then the other providers should be updated too. I would probably choose Exporting in this format is currently not really feasible because the only thing present for the later episodes are the episode number. IMHO the only real way to handle this would be to store episodes as a many-to-one relation instead of the current one-to-one or introduce a virtual episode type which points back to the original one. The later option is probably easier to implement with the current database layout. But this should be (and is) a project level decision. I fixed the mentioned typos. If needed I can squash the commits. Also I would love to hear your opinion from the above. |
Changes
This PR allows parsing the end of multiepisode file from XBMC compatible nfo. This is required because the nfo contains each episode in a root block.
For example:
Stargate Atlantis - 1x01-02:
This resulted the file being parsed as episode 1 instead of episode 1-2.