-
Notifications
You must be signed in to change notification settings - Fork 8
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
Srt files from Bazarr #70
Comments
Essentially duplicate of #48 It's intended. Janitorr doesn't know about files that aren't managed by the arrs and cleanup is a lot harder (and worse, will depend on Jellyfin setup) if I copy over all files. Metadata is up to you. You should be using TRaSH Guides naming so that Jellyfin/Emby will automatically pick everything up. Ideally, you should NOT be putting your metadata in the same folder as your media. I understand the subtitle problem and I'm willing to give it some thought, but you should really be grabbing media that has enough of them already embedded. The more files I have to carry over that aren't managed by the arrs, the more orphaned data I have to clean up somehow. |
Thanks for your answer!
I already have no issue regarding identification, it's more about customization (ie changing metadata's language for some specific movies)
I've basically configured that with the hope to make media info more "portable" (but I have no actual use case except for Janitorr I think).
Glad to see that part of the request did make sense! :) And well, you often don't have so much choice regarding embedded subtitles, plus I even sometimes have to translate some (for movies that don't have any official release in that language), or generate some from whisper, etc. And Bazarr is pretty useful for that!
Oh well I didn't really know it's supposed to work without file access, you're right it sounds quite more complicated than it would seem then 😅 Although that just reminded me, when you say
I guess they aren't really "managed" by it, but those extra files are still shown in radarr : I've just checked at a random movie, and paths for my srt, nfo, bif, and json files are listed. Couldn't this be managed without orphaned data issues then? (Sorry I should have checked the code before maybe :)) |
I need to look into what the arrs supply in terms of files. Now that you mention it, I remember seeing it in Radarr too. I may be able to enrich it with extra data through a user option to move all files over. I don't want to start persisting data for Janitorr as of right now. So keeping track of what files are in the leaving-soon folders is not desirable. Recursively checking all folders and assuming they all belong to Janitorr also doesn't necessarily work because you can turn options like I'll keep it open and see if deletion via arrs is possible. I'm sure it is for Radarr, but deleting seasons is going to be different. |
I see! Also if you think it makes more sense to focus on subtitles only and not all other extra files, another way could maybe to use Bazarr API directly? So it could work for Movies & TV shows directly. I've just had a look, you can easily get srt path from the API using Sonarr's SerieID and EpisodeID for example |
So I had a better look at Bazarr API, here are the endpoints I've found with their structured responses:
{
"data": [
{
[...]
"subtitles": [
{
[...]
"path": "/data/media/Movies/Movie/MovieName.en.srt",
},
[...]
],
[...]
}
]
}
{
"data": [
{
"episode": 14,
[...]
"subtitles": [
{
"path": "/data/media/Series/SerieName/Season/EpisodeName.en.srt",
[...]
},
[...]
]
},
[...]
]
} Do you think it could work? Thanks! |
This is going to happen. I just don't know when. Adding another optional service to be triggered by the service responsible for Jellyfin is going to require some refactoring unless I'm turning the existing code even dirtier than it already is. |
@Schaka I can look into it if you want (I just have to see how to build locally first), but if a big refactoring is needed that might be better that you do it? |
I started development here: #80 |
You can try the images in the feature branch. They're tagged 80-merge, native-80-merge, native-amd64-80-merge, etc. |
Cool! I think there's an issue with
|
That was stupid. I changed the call later on and didn't test it again: |
Almost there :)
I believe the url param shouldn't be |
Changes are coming. I must've been very tired. I just went by their swagger generated docs. |
Please try again. I've been running it on my server for a bit but can only do limited testing. It took me a while to debug and make the (minimal) changes I had to because I've been strapped for time. |
Thanks for the update! |
Trace log should show, if files are meant to be copied over:
Debug logging should show actual files attempted to be copied over:
Are you seeing any of that? |
I believe I've found all issues now. I was testing components in too much of an isolated state. Please let me know if it works for you. |
I've checked at the logs, not sure it's normal:
with a huge list of movies included in this array It seems some subtitles are copied, but not the right ones/to the right folders. I see for example 3 srt than aren't supposed to be in leaving-soon are copied in some movie folders.
with Movie1 not supposed to be used Also, probably not related but, there is an error "Malformed input or input contains unmappable characters" because one of the path contains |
That was a stupid bug. The second bug I've been trying to chase down. It's related to encoding. I believe it's a bug in GraalVM and I'm looking into (temporary) workarounds. |
@Schaka Looks good for subtitles, thanks! Still the issue with "Malformed input or input contains unmappable characters" though, this time with a file containing |
Yeah that's a bug in Oracle's GraalVM, or more specifically how it's using in the Paketo's native image builder. Since they officially advertise those buildpacks, I hope they're going to fix it soon . I've reported the issue to both. Closing this ticket. I've already created follow ups for the accented/umlaut character issue. |
Not sure if this is a bug / misconfiguration on my end, or a feature request, but I would have expected the Leaving Soon folders to contain all extra files from the original ones: mainly subtitles, but could also be nfo, theme.mp3, trickplay...
For files generated by Jellyfin I guess it's not a huge issue, as configuring the Leaving Soon directory to generate nfo/theme/trickplay should be good enough (although not ideal to generate them twice, specially if you have changed things - like metadata language - manually)
But for subtitles it's kind of a big deal, in my case they're created by an external tool (bazarr) that only manage subtitles for Radarr's directories.
The text was updated successfully, but these errors were encountered: