Closed D3athSpank closed 6 years ago
Bazarr rely on Subliminal library to download subtitles. Subliminal work best if don’t rename files. For some providers, it can use file hash but not for all of them. I suggest you try it without renaming so Subliminal can do an educated guess.
Ok, could it be possible to make Bazarr download subtitles targeting the real filename that sonarr is downloading, prior sonar renaming, instead?
I'm afraid not. Sonarr doesn't keep track of original filename, only the current one.
Maybe you can send me the output of a call to your Sonarr API?
/api/episode?seriesId=<seriesId>&apikey=<apikey>
Replace seriesId by a valid series with episode files renamed (you can get it from Bazarr episode pageURL). Fill in your API key.
Heres the output (subset of a episode)
{
"seriesId": 6,
"episodeFileId": 59,
"seasonNumber": 3,
"episodeNumber": 6,
"title": "Episode 6",
"airDate": "2016-03-04",
"airDateUtc": "2016-03-04T21:00:00Z",
"overview": "As the investigation reaches its final stages, Detective Inspector Perez and his team discover the person responsible for the deaths of Robbie Morton and Michael Thompson is closer to home than any of them thought.",
"episodeFile": {
"seriesId": 6,
"seasonNumber": 3,
"relativePath": "Season 3/Shetland - S03E06 - Episode 6.mkv",
"path": "/tv/Shetland/Season 3/Shetland - S03E06 - Episode 6.mkv",
"size": 1124741796,
"dateAdded": "2018-02-18T18:31:03.614782Z",
"sceneName": "Shetland.S03E06.1080p.WEB.h264-SFM-xpost",
"quality": {
"quality": {
"id": 3,
"name": "WEBDL-1080p"
},
"revision": {
"version": 1,
"real": 0
}
},
"qualityCutoffNotMet": false,
"id": 59
},
"hasFile": true,
"monitored": true,
"absoluteEpisodeNumber": 14,
"unverifiedSceneNumbering": false,
"id": 82
},
There is a field called sceneName
that looks interesting... and it maches the file that is listed under History for that episode.
While, the relativePath
, path
is the renamed filename
Did some more investigation and it looks like that sceneName
field is only valid for episodes downloaded through sonarr, and not for episodes imported, which makes sense.
But to get Bazarr to look for subtitles with sceneName
as an option would be awesome
Thank for the output. It make sense and I'll take a look at it.
@morpheus65535 Awesome thank you!
You can try the development branch that should do exactly what you're looking for. Please report back whether it works or not. Thanks!
Thank you! I will try this, although Im using your docker version, so i need to figure out how to get this development branch into a docker container :smile:
Ok, i found on your wiki how to run from source, will run it on my Win machine using the guide later today.
You don't have to do anything complicated. In settings, you can change to development branch. In system-->tasks, update Bazarr and restart your docker container.
Nice! Will test as soon as i get home!
Ok so I switch to development, ran the task, and restarted Docker. Then I redownloaded an episode in Sonarr Heres the api output:
{
"seriesId": 6,
"episodeFileId": 69,
"seasonNumber": 2,
"episodeNumber": 6,
"title": "Blue Lightning - Part 2",
"airDate": "2014-04-15",
"airDateUtc": "2014-04-15T20:00:00Z",
"overview": "Time is running out for Detective Inspector Perez as prime suspect Peter Latimer lies critically ill in hospital. Was the fire a drunken accident, or was Peter Latimer the second victim of a murderer still free on Fair Isle?",
"episodeFile": {
"seriesId": 6,
"seasonNumber": 2,
"relativePath": "Season 2/Shetland - S02E06 - Blue Lightning - Part 2.mkv",
"path": "/tv/Shetland/Season 2/Shetland - S02E06 - Blue Lightning - Part 2.mkv",
"size": 836648837,
"dateAdded": "2018-02-23T19:06:53.427204Z",
"sceneName": "Shetland.S02E06.720p.HDTV.x264-TLA",
"quality": {
"quality": {
"id": 4,
"name": "HDTV-720p"
},
"revision": {
"version": 1,
"real": 0
}
},
"qualityCutoffNotMet": false,
"id": 69
},
"hasFile": true,
"monitored": true,
"absoluteEpisodeNumber": 8,
"unverifiedSceneNumbering": false,
"id": 76
}
So the sceneName is there
"sceneName": "Shetland.S02E06.720p.HDTV.x264-TLA",
and it gets renamed by Sonarr to
"path": "/tv/Shetland/Season 2/Shetland - S02E06 - Blue Lightning - Part 2.mkv",
But the problem is I can not find in any logs of Bazarr if the file download is subtitel for the sceneName or if it uses the renamed on...
So Im a bit unsure if this is working as expected... or if Im even running the development
Which version of Bazarr are you running, 0.3.2 or 0.3.5? The latest is from the dev branch.
Can you run Bazarr with debug log level (restart required), clear the log, download a subtitles and send me the log? You can do it in private over private message in Discord if you want.
Ok i did that and have the log, but i dont have Discord.... And I am on 0.3.5 😄
Edit: Apparently one could send message without an account on Discord so I think I managed to send you the logfile
Should I consider this issue closed?
Yes, its working as excpected in dev branch :smile:
Fine, I’ll merge it to master branch and close this issue. Thanks for feedback!
Hi!
I have renaming enabled in sonarr, hence all my episodes are named: {Series Title} - S{season:00}E{episode:00} - {Episode Title} from file ex: Shetland.S01E01.1080p.WEB.h264-SFM-xpost.mkv
Will this break bazarr to find the exact right subtitle?