mdhiggins / radarr-sma

MIT License
25 stars 13 forks source link

ERROR - Unable to download subtitles #16

Closed c010rb1indusa closed 3 years ago

c010rb1indusa commented 3 years ago

Thank you @mdhiggins for your continued support. Been running Radarr-sma on Unraid with no issues for several months now.

After the V3 update recently I noticed that online subtitle downloads weren't working anymore. Checked the logs and found the following error.

2020-11-30 11:08:49 - resources.mediaprocessor - INFO - Attempting to download subtitles. 2020-11-30 11:08:49 - resources.mediaprocessor - ERROR - Unable to download subtitles. Traceback (most recent call last): File "/usr/local/sma/resources/mediaprocessor.py", line 1255, in downloadSubtitles video.format = og.format AttributeError: 'Movie' object has no attribute 'format'

I've attached my autoprocess.ini as well. (i purposely removed apikeys and tokens for posting online but they exist on my system).

Let me know if you need any more info and again thank you for your help.

autoProcess.ini.zip

mdhiggins commented 3 years ago

Looks like at some point subliminal renamed that property from 'format' to 'source'

Just pushed an update that addresses this to SMA, I'll rebuild the docker containers as well, that'll take about an hour (or you can turn on the $SMA_UPDATE env variable and just restart the container)

https://github.com/Diaoul/subliminal/commit/78687f45d23b1bc47fae0a5493be0198dc1fd5b5

https://github.com/mdhiggins/sickbeard_mp4_automator/commit/e882052aacd2758d5f4fadde30f81223d15f6914

Let me know if that fixes things

c010rb1indusa commented 3 years ago

Well the error is gone, but it doesn't seem to be working. I've been testing it on RARBG releases which are very common and so have sub releases across many different services/databases and the releases themselves don't come with embedded/external subs. Here's the log output. It just says 'Attempting to download subtitles.' Nothing more. And the final file contains no embedded subs.

2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Reading video stream. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Video codec detected: h264. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Pix Fmt: yuv420p. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Profile: high. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Video codec parameters None. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Creating copy video stream from source stream 0. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Reading audio streams. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Audio detected for stream 1 - aac eng 6 channel. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Creating aac audio stream source audio stream 1 [universal-audio]. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Creating ac3 audio stream from source stream 1. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Default audio stream set to eng aac 2 channel stream [default-more-channels: False]. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Reading subtitle streams. 2020-12-01 14:03:06 - resources.mediaprocessor - INFO - Attempting to download subtitles. 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Scanned for external subtitles and found 0 results in your approved languages. 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Output Data 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - {

.....

 ],
"subtitle": [],
"attachment": []

} 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Preopts 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - [] 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Postopts 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - [ "-threads", "0", "-metadata:g", "encoding_tool=SMA" ] 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Downloaded Subtitles 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - [] 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - Starting conversion. 2020-12-01 14:03:08 - resources.mediaprocessor - INFO - FFmpeg command:

However I'm not sure this is because of another unrelated issue like with renaming? So sorry if this is getting off topic. My radarr renaming scheme is the following

{Movie TitleThe} ({Release Year}).[{Quality.Full}-{Release Group}].[{ImdbId}, {TmdbId}]

Movie: Movie - Title, The (2010).[Bluray-1080p.Proper-EVOLVE].[tt0066921, 345691]

So a file before and after a rename looks like this:

The.Karate.Kid.Part.III.1989.1080p.BluRay.H264.AAC-RARBG

Karate Kid Part III, The (1989).[Bluray-1080p-RARBG].[tt0097647, 10495]

With the source, quality, release group, and IMDB/TMBD ID#; guessit shouldn't have a problem right? Will try to test with plex plugin sub-zero, which also uses subliminal, to see if renaming is the issue, But if it's something with my renaming or autoprocess.ini please let me know.

mdhiggins commented 3 years ago

You can turn on debug level logging to see why subliminal isn't finding things. It should be passing the original file name data to subliminal as well but the debug logging should help. I just tested and I'm able to download subs just fine so think this may just be a release issue or a subliminal issue, gonna close for now

If subliminal is spitting out weird errors feel free to post

https://github.com/mdhiggins/sickbeard_mp4_automator/wiki/Debug-Level-Logging

c010rb1indusa commented 3 years ago

Thanks attached a debug log sma copy.zip

mdhiggins commented 3 years ago

Hm the log didn't add much but I did just make a fake file using the same naming scheme and original filename and ran it 4 times, 3/4 times subliminal downloaded the file, one time appeared to time out, think this is just subliminal being unreliable