ukdtom / srt2utf-8.bundle Goto Github PK
View Code? Open in Web Editor NEWPlex Agent, that'll convert sidecar subtitle files into UTF-8, if not
Plex Agent, that'll convert sidecar subtitle files into UTF-8, if not
Hello,
First of all thanks for this very useful plugin. One issue I am having is that I don't want the in-place file conversion and, for my use case, a much better solution would be a new file. I have made a fork and will change the code to support such an option. Would you be interested in merging it in your code?
Thanks,
Hi, I've followed all the steps, but for some reason, at this point (Then make sure, that the SRT2UTF-8 agent is selected...) the Str2Utf-8 option does not show up on my list. There's just the Local Media Assets (TV) - for this only happens on the TV Shows options. On the Movies agents, this plugin shows up and works perfectly.
How can I fix it?
Oh, I'm accessing Plex Media Server with my PS4 and using my notebook as the server.
P.S.: Sorry if it's hard to understand what I've said, English is not my native language. ;)
Hi
thank you so much for developing this powerful tool. I am new to Plex and my Plex media server in NAS - Synology. This is my first plugin installed on plex. I install the bundle and put it in NAS-Synology in this path:
/Plex/Library/Application Support/Plex Media Server/Plug-ins
When I try to open Plex, I don't see it in the Plugins tab or Agents for both movies and TS Shows.
Is it because I download the different version?
Or maybe I need to install another plugin?
Hi. I unpacked zip to C:\Users\username\AppData\Local\Plex Media Server\Plug-ins\SRT2UTF-8.bundle-master but in agents plugin is not visible, What i did wrong?
When going into agents on PMS, and clicking on the links, the link is outdated, and use old forum link syntax
breaks the agent, so file's ain't been picked up
Thanks for your work!
Would it be a lot of work to enable your plugin on TV shows (series) on personal media agent?
I dont understand why its only functional on movies agent...
Thank you very much, merry christmas and a happy new year...
Serbian subtitle means they can be mostly Latin and some in Cyrillic. Serbian subtitles are not just Cyrillic.
If I add .SR. to add info that subtitle is Serbian to Plex, SRT2UTF-8 will broke ansi parts when converting because you set it to think that all "SR" are Cyrillic subtitles. After the conversion subtitle got mixed with broken Cyrillic parts and rest in the Latin.
I don't know why some people still use ansi seems they are using some old version of subtitle workshop which is only ansi.
Now I need to change every downloaded subtitle from "SR" Serbian to "HR" to Croatian in order to prevent SRT2UTF-8 plugin to break all the subtitles Latin subtitles.
I don't know how to overcome the problem should I remove serbian.edm or should I make copy of croatian.edm to serbian.edm.
But if I make it like that, I would lose Cyrillic support when there is Cyrillic type of Serbian subtitle.
Is it possible that you make detector in serbian.edm that it detect is the subtitle Cyrillic or Latin.
Like if the Latin letters are detected and if srt contain more than 65% of Latin letters presume its completely Latin.
It will be great if this plugin fix the subtitles during the conversion (remove the extra spaces, correct the order, ...) as the transcoder and some players unable to show subtitles with such issues.
Currently I use (srtwiz) to do such correction manually.
Thanks in advance,
All the settings, as well as file encoding etc
I have synology nas ds720+ and I add plex media server to it to play my local movies and series ,, and I use arabic subtitle some of it show strange characters ,, after some search I found that this plugin can solves my problem ,, I download it and but it in this folder
/volume1/PlexMediaServer/AppData/Plex Media Server/Plug-ins/SRT2UTF-8.bundle
but when I go to my plex media server to the Plugins it show No plugins installed.
some help here
Hi! I came across a hard to find problem when copy videos on Ubunty 18.04 .
Normally I go to the folder by a symlink but this time I went by the real path, then the top folder had another owner and I got permission drwxr-sr-x instead of normally drwxrwsr-x.
I noticed difference when I deleted files they not went to the trash bin but a message about permanent delete came up instead. But I could copy the videos so I not think so much about it. This led to more than 50 subtitles were deleted by the plugin.
It was not consistent sometimes the plugin manage to create to the backup file, but mostly the subfile was gone not one time the plugin could create the utf-8 file.
It should be about permission plex runs as user plex and normally have group write permission in this folder. This time the group did not have write permission, why the plugin got half way permission so it could sometimes create backup file but not the utf-8 file and delete original file I not understand.
Maybe there could be a test in the plugin for full permission before handle the file?
Made an error, that cause an error when checking the files
From the forums:
I tested plugin on Windows 1250 central european enconding. IT produced bad subs, special characters are not appearing correctly. I took a look at the logs and it appears that plugin misidentified them as windows-1252? (BeautifulSoup reports encoding as windows-1252)
Hi Dane, can you please add support for SubZero subtitle agent as well! Thanks a lot!
Hi,
I was following the Installation wiki page and the link to know where to find the plugins folder points to Zendesk of Plex which is broken requiring username and password.
I found this other support article from Plex.tv which I guess it has the same content as the previous one in the past:
https://support.plex.tv/articles/201106098-how-do-i-find-the-plug-ins-folder/
I would love to open a pull-request suggesting the change, but Github doesn't provide a easy way to do it 🙏
Thank you for the plugin and the wiki! Very helpful
Cheers
SRT2UTF-8 can't handle a TV-Show section, if theMovieDB is the primary Agent
Majority of subtitles that are downloaded from podnapisi.net are in ANSI format with special chars that represent diacritics for Serbian/Croatian, when your plugin converts them to UTF-8 they get heavily broken because they're not properly detected.
ANSI | Windows-1250 | UTF-8 |
---|---|---|
ð |
đ |
đ |
æ |
ć |
ć |
è |
č |
č |
In other words ANSI -> UTF-8 is converting letters that are in different unicode blocks entirely.
Correct would be ANSI -> W-1250 -> UTF-8, that way we get desired letters.
(manually doing so via notepad++ gives proper results)
So I'm not sure if problem is in your bundle or it's an upstream problem of chared
Seems like we don't support that primary agent
Firstly it doesn't even appear under Agents -> Programmes -> Personal Media Shows
I tried to add 'com.plexapp.agents.none' under contributes_to in init.py,
after that it was shown in Plex, but subtitles were not changed to UTF8.
Just noticed that subtitles I upload to Plex via web interface still aren't displayed properly.
How to achieve this?
Forced subtitles is not supported in any language
exp:
sub_name.forced.srt
sub_name.eng.forced.srt
Hi;
I'm from Turkey and naturally I prefer Turkish subtitles. So I have been using this plug-in for a long time and I like. But approxtimately for 1 months plug-in is generating new subtitle file by randomly, it is skipping most of it. For example it is generating a new subtitle for episode 1 and episode 3, but it is skipping episode 2. I refreshed meta-data many times but nothing wasn't changed.
I hope you fix.
Hello,
I have PMS running on Ubuntu. Unfortunately, your plug-in doesn't work for me. Could I have an assistance please? Here is the stacktrace. The log file is attached to same issue on Plex Forum https://forums.plex.tv/discussion/comment/1469993/#Comment_1469993
CRITICAL (agentkit:1078) - Exception in the update function of agent named 'Srt2Utf-8 (Movies)', called with guid 'com.plexapp.agents.imdb://tt2024544?lang=en' (most recent call last):
#126 File "/usr/lib/plexmediaserver/Resources/Plug-ins-313f93718/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1076, in _update
#127 agent.update(obj, media, lang, **kwargs)
#128 File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/SRT2UTF-8.bundle/Contents/Code/__init__.py", line 53, in update
#129 GetFiles(part)
#130 File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/SRT2UTF-8.bundle/Contents/Code/__init__.py", line 153, in GetFiles
#131 FixFile(sTest, sMyLang)
#132 File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/SRT2UTF-8.bundle/Contents/Code/__init__.py", line 112, in FixFile
#133 sMyEnc = FindEncBS(sFile, sMyLang)
#134 File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/SRT2UTF-8.bundle/Contents/Code/__init__.py", line 191, in FindEncBS
#135 if sCurrentEnc == CP_Windows_ISO.cpWindows[lang]:
#136 File "/usr/lib/plexmediaserver/Resources/Plug-ins-313f93718/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in
#137 _getitem_ = lambda x, y: x.__getitem__(y),
#138 KeyError: 'xx'
Thank you :)
I've noticed that Srt2Utf-8 is not converting some of my subtitles anymore.
Looking on the logs I found out that it is because OpenSubtitles agent is configured for Portuguese Brasil and it inform it's language as "pb".
Looking on the code there is no entry for the "pb" language, which I think it should be included.
Even though I name my srt files as ".pt.srt", I have no control of what OpenSubtitles agent do.
chinese_traditional
hebrew
Trying to get this work on CentOS7, but all tries are failing...
on windows or osx is everything working.
log file: http://pastebin.com/raw/D0AHMTsS
oh and permissions are OK.. i just tested it for user plex
If it can be used on music agencies that are really better, can this hope come true?
Hello ukdtom!
Firstly thanks a lot for your nice work! I tried yesterday the early access to new version of plex player and unfortunately character encoding was wrong again, when i get back to current stable version (not early access) everything work just fine again. Any ideas? Do you know about changes in early access version? Thanks a lot for helping, Tomáš
Use this issue for reporting back on the beta test
in line 90
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.