ukdtom / SRT2UTF-8.bundle

Plex Agent, that'll convert sidecar subtitle files into UTF-8, if not
126 stars 14 forks source link

Rename subtitle files with language code #50

Closed haarismemon closed 4 years ago

haarismemon commented 4 years ago

Hey! I love your Plex plugin. I was thinking it would be great if it could also add the language code to my subtitle files if they don't have one. So I had a little play around and it got it all working, and it is working really nicely.

I was thinking that it would be great if this could be added to this original project if you like it. If you have any comments or suggestions, I am open to it.

The changes are that:

ukdtom commented 4 years ago

Wow, and haven't actually tested yet, since sidetracked with another project, but great idea!

But, and there's always a but ;)

Seen this: Please choose your preferred language before enabling the renaming of subtitle files. If the preferred language is set to None and the renaming is enabled, the language code that is appended will be 'xx'.

So in above, and to avoid that, couldn't you simply check if preferred lang was not set, and if so, avoid renaming?

haarismemon commented 4 years ago

Yeah, that's definitely a better way to approach it.

I've just pushed up the changes and tested it. Now if the preferred language is not selected (i.e. 'None'), then the subtitle files do not get renamed.

ukdtom commented 4 years ago

Thanks, currently sidetracked, but will test within the next couple of days, and hopefully merge....

Your idea is simply outstanding!

haarismemon commented 4 years ago

I really appreciate it, Tommy. Thank you.

ukdtom commented 4 years ago

You are now a collaborator of this git, if you accept ;)

This means, that you also gained access to edit the Wiki, so please update it with you new fancy stuff ;)

ukdtom commented 4 years ago

https://forums.plex.tv/t/rel-srt2utf-8/54149/372?u=dane22