Open joelpurra opened 1 month ago
In general, it also breaks filename-based file type detection
What do you mean by this?
In general, it also breaks filename-based file type detection
What do you mean by this?
I mean that it changes the filename's file extension. Video Name.srt - eng
(incorrect extension) has a different file extension type from Video Name - eng.srt
(SubRip Text (SRT) subtitle file; correct).
- Video Name.srt - eng
+ Video Name - eng.srt
May or may not matter to Kodi, because Kodi gets "told" it's a subtitle file (https://github.com/putdotio/putio-kodi/blob/v3.1.0/main.py#L135), but I certainly consider it a bug.
tree ~/.kodi/temp/plugin.video.putio
~/.kodi/temp/plugin.video.putio
└── subtitles
└── 0000000000
├── abc_de
│ └── Video Name.srt - eng
...
Got it.
We have 3 types of subtitles:
.srt
file. So, name always have extension. We don't detect language for these, always unknown. ...-{lang}.srt
. So, name always have extension and language code. {lang}
here is how it is tagged in MKV, so may be improper (seems < 0.2%)..srt
extension. Name can include language code (depends how it's uploaded), but we have language code separately.What are your thought on when we should append language code?
I think:
und
except name has explicit language in form {name}.{lang}.srt
. Identifying the language wrong is IMO worse than saying Unknown. I saw this with a HI (hearing impaired) subtitle identified as Hindi. It also matches the behavior of our other apps (currently always marked Unknown without exception).{name}.{lang}.srt
.
@berkanteber wrote (https://github.com/putdotio/putio-kodi/pull/17#issuecomment-2406127284):
The subtitle filename now (https://github.com/putdotio/putio-kodi/releases/tag/v3.1.0) has the language code/shortname appended, but it is appended after the
.srt
file extension. This makes "srt" part of the subtitle "name" as parsed by Kodi. In general, it also breaks filename-based file type detectionExample:
Video Name.srt - eng
English - Video Name - srt (External)
.