pax_global_header00006660000000000000000000000064130402013460014503gustar00rootroot0000000000000052 comment=657895d84a6543c1d488b8bfca7da13361b11a5a vlsub-0.10.2/000077500000000000000000000000001304020134600127165ustar00rootroot00000000000000vlsub-0.10.2/README.md000066400000000000000000000077461304020134600142130ustar00rootroot00000000000000vlsub ===== VLC extension to download subtitles from opensubtitles.org Author: Guillaume Le Maout Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche Bug report: http://addons.videolan.org/content/show.php/?content=148752 #### INSTALLATION: Vlsub doesn't work on Vlc 2.1, use one of these instead: * [vlc 2.0](http://download.videolan.org/pub/videolan/vlc/2.0.8/) * [vlc 2.2](https://www.videolan.org/vlc/releases/2.2.0.html) Create a directory "extensions" at this location if it doesn't exists, then extract the file "vlsub.lua" from the archive inside: * Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\ * Windows (current user): %APPDATA%\vlc\lua\extensions\ * Linux (all users): /usr/lib/vlc/lua/extensions/ * Linux (current user): ~/.local/share/vlc/lua/extensions/ * Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/ * Mac OS X (current user): /Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/ #### USAGE: * Start Vlc * Start your video * Click on the menu View > VLSub or VLC > Extension > VLSub on Mac OS X * Click on "Search by hash" or "Search by name" * Select a subtitles file on the list * Click on "Download selection" * That's it, the subtitles should appear on your video. * If you're not happy with your subtitles (wrong sync etc), you can select an other one and click "Download" again, that will erase the previous one and load it automatically. #### Limitation: Due to some bugs on Windows, if the path to your video contain non-english characters, the extension will not be able to save subtitles in this directory automatically (it will propose you to save it manually) and the "search by hash" method might be slower. -> If possible, use a directory with english (ASCII) characters only to store your videos (on Windows only). #### Changelog: ##### 2016-11-05 (version 0.10.0) - Support http chunked transfer encoding ##### 2014-09-21 - Improve http response handle for large header ##### 2014-09-12 (version 0.9.13) - Fix error with new http 301 redirection ##### 2014-08-19 (version 0.9.12) - Fix subtitles loading on Vlc 2.2 ##### 2014-05-08 (version 0.9.11) - Fix a bug due to opensubtitles header modifications - Add a message at startup to warn it's not gonna work if net module not present ##### 2013-09-05 (version 0.9.10) - Add possibility to set opensubtitles.org username/password in config menu to avoid download limit to unlogged users ##### 2013-08-31 (version 0.9.9) - Rewrite configuration process from scratch to avoid blocking problem with Win 8 + windows username with special characters - Allow user to set VLSub's working directory from config interface ##### 2013-07-25 (version 0.9.8) - Add a method to search subtitles for videos file inside an archive - Add a method for video with specials characters in its name or path on Windows. ##### 2013-07-13 (version 0.9.6) - Add an installer for Windows 7 - Bug fix: display download behaviour display on xp - Bug fix: Add error message if github CA certificate is not present when downloading translations - Bug fix: closing dialog on config menu on OS X ##### 2013-07-04 (version 0.9.5) - Add interface localization option ##### 2013-04-25 (version 0.9) - Simplified interface - Bug fix with subrip format (".sub") subtitles - Add a success message when subtitles are loaded - Display a download link to subtitles if direct download fail ##### 2012-12-18 (version 0.8) - [Benoit Vallee] Fixed subtitle downloading when special characters are present on the video path - [Benoit Vallee] Fixed zip file deletion after subtitle has been extracted ##### 2012-10-17 (version 0.7) - [thePanz] Added subtitle language in listing - [thePanz] Added subtitle language in downloaded file (avoid filename collisions during download) ##### version 0.6 - Use definitive user agent for opensubtitle API - Fix a bug when video file path contains accents/special characters on linux (same bug on windows not corrected yet) vlsub-0.10.2/locale/000077500000000000000000000000001304020134600141555ustar00rootroot00000000000000vlsub-0.10.2/locale/baq.xml000066400000000000000000000105511304020134600154440ustar00rootroot00000000000000Filmaren hasha kalkulatzen Saioa Hasi Saioa Amaitu Saioa egiaztatzen Azpidatziak bilatzen Denak E&zeztatu It&xi &Itxurapena Itxurapena Berezko hizkuntza: Dowload subtitles from OpenSubtitles.org &Erakutsi hizkuntza kodea agiri izenean Zer egin azpidatziarekin: Gertatu bakarrik Eskuzko jeisketa Gertatu eta gorde &Jeitsi hautapena Atala (telesailak): Laguntza Jeitsi azpidatziak <a href='http://www.opensubtitles.org/'>opensubtitles.org</a>-tik eta erakutsi hauek bideo bat ikusterakoan.<br> <br> <b><u>Erabilpena:</u></b><br> <br> VLSub zure bideoarekin batera erabiltzeko egina dago, hortaz abiarazi hura lehenik (ez badago ezer irakurtzen azpidatziak zure nabigatzailetik jeisteko lotura jasoko duzu).<br> <br> Hautatu zure azpidatzientzako hizkuntza eta klikatu VLSub-ek hornituriko bi bilaketa metodoetako bati dagokion botoia:<br> <br> <b>1 Metodoa: Bilatu hashez</b><br> Lehen metodo honekin saiatzea gomendagarria da, zeren bideo agiriaren izenean ohinarriturik egiten du bilaketa, hortaz zure bideorekin aldiberetuta dauden azpidatziak bilatu ditzakezu.<br> <br> <b>2 Metodoa: Bilatu izenez</b><br> Ez baduzu zorterik lehen metodoarekin, egiaztatu izenburua zuzena den klikatu aurretik. Telesail batentzako azpidatziak bilatzen badituzu, denboraldi eta atal zenbakia ere eman ditzakezu.<br> <br> <b>Azpidatzi Jeisketa</b><br> Hautatu azpidatzi bat zerrendatik eta klikatu 'Jeitsi'.<br> Zure bideoaren zuzenbide berean jarriko du, izen berarekin (luzapen ezberdina) hortaz Vlc-k berezgaitasunez gertatuko du bideoa abiarazten duzun hurrengoan.<br> <br> <b>/!\ Kontuz :</b> Dauden azpidatziak gainidatzi egiten dira baieztapenik galdetu gabe, hortaz jarri itzazu beste nonbait garrantzitsuak badira.<br> <br> Bilatu Vlc hedapen gehiago hemen: <a href='http://addons.videolan.org'>addons.videolan.org</a>. Hizkuntza: &Ongi &Kendu etiketak &Bilatu &Gorde Bilatu &hashez Searching translations ... Bilatu i&zenez Search translations Denboraldia (telesailak): E&rakutsi itxurap &Erakutsi laguntza Izenburua: Klikatu hemen agiria irekitzeko Bilaketa osatuta Jeitsi lotura Azpidatzia jeisten Akatsa Saioa epezkanpo, bersaiatzen Azpidatziak gertaturik Mesedez erabili metodo hau irakurketan zehar Emaitz gabe Ez dago erantzunik zerbitzaritik. Ez da azpidatzirik hautatu Agiria ez da aurkitu Agiria ez da aurkitu (legezkanpoko hizkia?) Metodo honek tokiko agiriekin bakarrik jarduten du (oraingoz) Zerbitzaria gainzamatuta, mesedez saiatu geroago emaitz Ezinezkoa azpidatziak gordetzea Gertaera Eskabide baimengabea vlsub-0.10.2/locale/cze.xml000077500000000000000000000110021304020134600154550ustar00rootroot00000000000000Výpočet hash filmu Přihlášení Odhlášení Kontrola relace Vyhledávání titulků Všechny Ne Ano Zrušit Zavřít Nastavení Nastavení Jazyk titulků Stahování titulků z OpenSubtitles.org Zobrazit kód jazyka v názvu souboru Co dělat s titulky Jen nahrát Stáhnout ručně Nahrát a uložit Stáhnout vybrané Epizoda (seriál) Pomoc Stahování titulků z <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> a jejich zobrazení během sledování videa.<br> <br> <b><u>Použití:</u></b><br> <br> VLSub je určen pro použití během sledování videa, takže jej nejprve začněte přehrávat (pokud se nic nepřehrává, dostanete link na stažení titulků ve svém prohlížeči Internetu).<br> <br> Vyberte jazyk pro vaše titulky a klepněte na tlačítko odpovídající jedné ze dvou vyhledávacích metod, které vám VLSub nabízí:<br> <br> <b>Metoda 1: Hledat podle hash</b><br> Doporučuje se vyzkoušet nejprve tuto metodu, protože ta dělá vyhledávání založené na otisku videosouboru, takže můžete najít titulky synchronizované s vaším videem.<br> <br> <b>Metoda 2: Hledat podle názvu</b><br> Pokud neuspějete s první metodou, před klepnutím na tlačítko jen zkontrolujte název, zda je správný. Pokud hledáte titulky pro seriál, můžete také uvést číslo série a epizody.<br> <br> <b>Stahování titulků</b><br> Označte jeden výsledek v seznamu a klikněte na 'Stáhnout vybrané'.<br> Bude uložen ve stejném adresáři, jako je vaše video, se stejným názvem (různá přípona), takže příště při dalším spuštění videa jejich VLC načte automaticky.<br> <br> <b>/!\ Pozor :</b> Stávající titulky jsou přepsány bez doptání si potvrzení, takže si je přesuňte jinam, pokud jsou důležité.<br> <br> Více rozšíření pro VLC najdete na <a href='http://addons.videolan.org'>addons.videolan.org</a>. Jazyk rozhraní Ok Odstranit formátovací značky Hledání Uložit Hledat podle hash Vyhledávání překladů ... Hledat podle názvu Hledat překlady Série (seriál) Ukázat nastavení Ukázat pomoc Název Pracovní adresář VLSub Kliknutím sem otevřete soubor Hledání dokončeno Link ke stažení Stahování titulků Chyba Relace vypršela, opakování Titulky načteny Použijte tuto metodu během přehrávání Žádný výsledek Server neodpovídá Nezvolené žádné titulky Soubor nebyl nalezen Soubor nebyl nalezen (odepřen znak?) Tato metoda funguje pouze s lokálním souborem (zatím) Server přetížen, zkuste to znovu později výsledky Nelze uložit titulky Úspěch Požadavek odmítnut vlsub-0.10.2/locale/dan.xml000066400000000000000000000104751304020134600154500ustar00rootroot00000000000000Udregner videohash Logger ind Logger ud Tjekker session Søger efter undertekster Alle Nej Ja Annullér Luk Indstil Indstillinger Sprog for undertekster Download undertekster fra OpenSubtitles.org Vis sprogkode i filnavnet Hvad der skal ske med undertekster Indlæs kun Manuel download Indlæs og gem Download valgte Episode (serier) Hjælp Download undertekster fra <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> og vis dem mens du ser en video.<br> <br> <b><u>Brug:</u></b><br> <br> VLSub er tænkt til at blive brugt mens du ser en video, så start først videoen (hvis intet afspilles vil du få et link til at downloade underteksterne i din browser).<br> <br> Vælg sprog for dine undertekster, og klik på en af knapperne for de to søgemetoder, som VLSub tilbyder:<br> <br> <b>Metode 1: Søg efter hash</b><br> Det er anbefalet at du prøver denne metode først, fordi den foretager en søgning ud fra videofilens identitet, så du kan finde undertekster der er synkroniseret med din video.<br> <br> <b>Metode 2: Søg efter navn</b><br> Hvis du ikke har held med den første metode, tjek at titlen er korrekt inden du trykker. Hvis du søger efter undertekster til en serie kan du angive et sæson- og episodenummer.<br> <br> <b>Downloader undertekster</b><br> Vælg en undertekst i listen og tryk på 'Download'.<br> Den lægges i samme mappe som din video, med samme navn (men anden filendelse), så VLC automatisk indlæser den næste gang at du starter videoen.<br> <br> <b>/!\ Advarsel :</b> Eksisterende undertekster vil blive overskrevet uden du bliver spurgt om bekræftigelse, så læg dem et andet sted hvis de er vigtige.<br> <br> Find flere VLC-udvidelser på <a href='http://addons.videolan.org'>addons.videolan.org</a>. Sprog for brugerflade OK Fjern tags Søg Gem Søg efter hash Søger efter oversættelser... Søg efter navn Søg efter oversættelser Sæson (serier) Vis indstillinger Vis hjælp Titel VLSub arbejdsmappe Klik her for at åbne filen Søgning fuldført Downoadlink Downloader undertekst Fejl Session udløbet, prøver igen Undertekster indlæst Brug venligst denne metode under afspilning Intet resultat Serveren svarer ikke Ingen undertekster valgt Fil ikke fundet Fil ikke fundet (ugyldigt tegn?) Denne metode virker kun med lokal fil (indtil videre) Server overbelastet, prøv igen senere resultat(er) Kunne ikke gemme undertekster Succes Uautoriseret anmodning vlsub-0.10.2/locale/dut.xml000066400000000000000000000106111304020134600154720ustar00rootroot00000000000000Bestandshash berekenen... Bezig met inloggen Bezig met uitloggen Sessie controleren Ondertitels zoeken Alle Nee Ja Annuleren Sluiten Instellingen Configuratie Ondertitel taal Download ondertitels van OpenSubtitles.org Taalcode opnemen als extensie in bestandsnaam Gebruik tweelettige extensie Wat te doen met ondertitels Enkel laden Handmatig downloaden Downloaden en laden Selectie downloaden Episode (series) Help Ondertitel downloade van <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> en weergeven terwijl de video wordt afgespeeld. <br> <br> <b><u>Gebruik:</u></b><br> <br> VLSub is bedoeld om gebruikt te worden terwijl de video afspeeld, dus start eerst een video.<br> <br> Kies de taal voor de ondertitels en klik op de knop corresponderen met de downloadopties van VLSub:<br> <br> <b>Methode 1: Zoeken op bestandshash</b><br> Het is aan te raden deze methode eerst te gebruiken, omdat het een zoekopdracht uitvoerd op basis van de unieke vingerafdruk van het filmbestand.<br> <br> <b>Methode 2: Zoeken op naam</b><br> Als het niet lukt om ondertitels te zoeken via de eerte methode, zoek dan op de naam van de video. Zorg er wel voor dat de titel correct is.Bij het zoeken van ondertitels voor een serie kan je ook een seizoen en episode opgeven.<br> <br> <b>Ondertitels downloaden</b><br> Selecteer een ondertitel in de lijst en klik op 'Downloaden'.<br> De ondertitel wordt opgeslagen in dezelfde map als het videobestand, zodat VLC het automatisch laadt als de volgende keer de video gestart wordt.<br> <br> <b>/!\ Let op :</b> Bestaande ondertitelbestanden zullen overgeschreven worden.<br> <br> Vind meer VLC extensies op <a href='http://addons.videolan.org'>addons.videolan.org</a>. Interface taal OK Tags verwijderen Ondertitel zoeken Opslaan Zoeken met bestandshash Vertalingen zoeken ... Zoeken via bestandsnaam Vertalingen zoeken Seizoen (series) Configuratie weergeven Help Titel VLSub werkmap Klik hier om het bestand te openen Zoeken voltooid Download link Ondertitel downloaden Fout Sessie verlopen, opnieuw aan het proberen... Ondertitels geladen Kan enkel worden gebruikt tijdens afspelen bestand Geen resultaat Server reageert niet Geen ondertitel geselecteerd Bestand niet gevonden Bestand niet gevonden (ongeldig karakter?) Deze method werkt enkel met lokale bestanden (op het moment) Server heeft het te druk, probeer later nog eens resultaten Kan de ondertitel niet opslaan Gelukt! Ongeauthorizeerde aanvraag vlsub-0.10.2/locale/ell.xml000066400000000000000000000146621304020134600154640ustar00rootroot00000000000000Υπολογισμός hash Γίνεται είσοδος Γίνεται έξοδος Έλεγχος συνεδρίας Γίνεται αναζήτηση υπότιτλων Όλες Ακύρωση Κλέισιμο Ρυθμίσεις Ρυθμίσεις Προεπιλεγμένη γλώσσα Κατέβασμα υπότιτλων από το OpenSubtitles.org Προβολή κωδικού γλώσσας στο όνομα αρχείου Τι να γίνεται με τους υπότιλους Φόρτωση μόνο Χειροκίνητο κατέβασμα Φόρτωση και αποθήκευση Επιλογή για κατέβασμα Επεισόδιο (σειρές) Βοήθεια Κατέβασμα υπότιτλων από <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> και προβολή με την αναπαραγωγή του βίντεο.<br> <br> <b><u>Χρήση:</u></b><br> <br> Το VLSub προορίζεται για χρήση ενώ βλέπετε το βίντεο , οπότε ξεκινήστε το πρώτα (αν τίποτα δεν αναπαράγεται θα λάβετε ένα σύνδεσμο για να κατεβάσετε τους υπότιτλους στον browser).<br> <br> Επιλέξτε τη γλώσσα για τους υπότιτλούς σας και κάντε κλικ στο ένα κουμπί από τα δυο αντίστοιχα των μεθόδων που παρέχονται απο το VLSub:<br> <br> <b>Μέθοδος 1: Αναζήτηση με hash</b><br> Προτείνεται να δοκιμάζετε αυτή τη μέθοδο πρώτα, επειδή κάνει αναζήτηση βάση του αποτυπώματος του αρχείου βίντεο, και έτσε μπορείτε να βρείτε υπότιτλους συγχρονισμένους με το βίντεο.<br> <br> <b>Μέθοδος 2: Αναζήτηση με όνομα</b><br> Αν δεν έχετε τύχη με την πρώτη μέθοδο, απλά ελέγξτε αν ο τίτλος είναι σωστός πριν κάνετε κλικ. Αν αναζητείτε υπότιτλους για ένα επεισόδιο σειράς, Μπορείτε επίσης να συμπληρώσετε τον αριθμό της σεζόν και του επεισοδίου.<br> <br> <b>Κατέβασμα Υπότιτλων</b><br> Κάντε μια επιλογή υπότιτλων από τη λίστα και κάντε κλικ στο 'Κατέβασμα'.<br> Θα τοποθετηθεί στον ίδιο φάκελο με το βίντεο, με το ίδιο όνομα (διαφορετική επέκταση) έτσι ώστε το Vlc να το φορτώσει αυτόματα την επόμενη φορά που θα ανοίξτε το βίντεο.<br> <br> <b>/!\ Προσοχή :</b> Ήδη υπάρχοντες υπότιτλοι αντικαθίσταντε χωρίς επιβεβαίωση, άρα τοποθετήστε τους αλλού αν είναι σημαντικοί.<br> <br> Βρείτε πειρσσότερα πρόσθετα για το Vlc στο <a href='http://addons.videolan.org'>addons.videolan.org</a>. Γλώσσα ΟΚ Αφαίρεση ετικετών Αναζήτηση Αποθήκευση Αναζήτηση με hash Αναζητούντε μεταφράσεις ... Αναζήτηση με όνομα Αναζήτηση μεταφράσεων Σεζόν (σειρές) Εμφάνιση ρυθμίσεων Εμφάνιση βοήθειας Τίτλος Κλικ εδώ για άνοιγμα αρχείου Αναζήτηση ολοκληρώθηκε Σύνδεσμος κατεβάσματος Οι υπότιτλοι κατεβαίνουν Σφάλμα Η συνεδρία έληξε, επαναλαμβάνεται η προσπάθεια Οι υπότιτλοι φορτώθηκαν Παρακαλώ χρησιμοποιείστε αυτή τη μέθοδο ενώ γίνεται αναπαραγωγή Κανένα αποτέλεσμα Ο σέρβερ δεν ανταποκρίνεται Δεν επιλέχτηκαν υπότιτλοι Το αρχείο δεν βρέθηκε Το αρχείο δεν βρέθηκε (ασύμβατος χαρακτήρας?) Αυτή η μέθοδος λειτουργεί με τοπικό αρχείο μόνο (προς το παρόν) Ο σέρβερ είναι υπερφορτωμένος, παρακαλώ προσπαθήστε αργότερα αποτελέσματα Αδυναμία αποθήκευσης υπότιτλων Επιτυχία Μη εξουσιοδοτημένη αίτηση vlsub-0.10.2/locale/eng.xml000066400000000000000000000104231304020134600154500ustar00rootroot00000000000000Calculating video hash Logging in Logging out Checking session Searching for subtitles All No Yes Cancel Close Config Configuration Subtitles language Download subtitles from OpenSubtitles.org Display language code in file name What to do with subtitles Load only Manual download Load and save Download selection Episode (series) Help Download subtitles from <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> and display them while watching a video.<br> <br> <b><u>Usage:</u></b><br> <br> VLSub is meant to be used while you are watching the video, so start it first (if nothing is playing you will get a link to download the subtitles in your browser).<br> <br> Choose the language for your subtitles and click on the button corresponding to one of the two research methods provided by VLSub:<br> <br> <b>Method 1: Search by hash</b><br> It is recommended to try this method first, because it performs a research based on the video file print, so you can find subtitles synchronized with your video.<br> <br> <b>Method 2: Search by name</b><br> If you have no luck with the first method, just check the title is correct before clicking. If you search subtitles for a series, you can also provide a season and episode number.<br> <br> <b>Downloading Subtitles</b><br> Select one subtitle in the list and click on 'Download'.<br> It will be put in the same directory as that of your video, with the same name (different extension) so VLC will load them automatically the next time you'll start the video.<br> <br> <b>/!\ Beware :</b> Existing subtitles are overwritten without asking confirmation, so put them elsewhere if they're important.<br> <br> Find more VLC extensions at <a href='http://addons.videolan.org'>addons.videolan.org</a>. Interface language Ok Remove tags Research Save Search by hash Searching translations ... Search by name Search translations Season (series) Show config Show help Title VLSub working directory Click here to open the file Research complete Download link Downloading subtitle Error Session expired, retrying Subtitles loaded Please use this method during playing No result Server not responding No subtitles selected File not found File not found (illegal character?) This method works with local file only (for now) Server overloaded, please retry later result(s) Unable to save subtitles Success Request unauthorized vlsub-0.10.2/locale/fre.xml000066400000000000000000000116401304020134600154550ustar00rootroot00000000000000Calcul de l'empreinte Connexion Déconnexion Vérification de la session Recherche de sous-titres Tous Non Oui Annuler Fermer Config Configuration Langue des sous-titres Télécharger des sous-titres depuis OpenSubtitles.org Indiquer la langue dans le nom de fichier Téléchargement des sous-titres Charger seulement Téléchargement manuel Charger et sauvegarder Télécharger la sélection Episode (séries) Aide Télécharge les sous-titres sur <a href="http://www.opensubtitles.org/">opensubtitles.org</a> et les affiche lors de la lecture d'une vidéo.<br> <br> <b><u>Utilisation :</u></b><br> <br> VLSub est conçu pour être utilisé lors de la lecture d'une vidéo, il faut donc lancer celle-ci en premier (si aucune vidéo n'est jouée, vous obtiendrez un lien pour télécharger les sous-titres depuis votre navigateur).<br> <br> Choisissez la langue de vos sous-titres et cliquez sur le bouton correspondant à la méthode de recherche que vous souhaitez utiliser :<br> <br> <b>Méthode 1 : Recherche par hash</b><br> Il est recommandé d'utiliser cette méthode en premier car elle utilise l'empreinte numérique, le hash, du fichier en cours de lecture, les sous-titres trouvés seront donc correctement synchronisés avec votre vidéo.<br> <br> <b>Méthode 2 : Recherche par nom</b><br> Si la première méthode n'a rien donné, vérifiez juste que le titre est correct avant de cliquer sur le bouton. Si vous cherchez des sous-titres pour un épisode de série, vous pouvez aussi renseigner le numéro de la saison et de l'épisode.<br> <br> <b>Téléchargement des sous-titres</b><br> Sélectionnez un des résultats dans la liste et cliquez sur « Télécharger ».<br> Le fichier de sous-titre sera placé dans le même dossier que votre vidéo, avec le même nom (mais une extension différente), VLC pourra le charger automatiquement à la prochaîne lecture de la vidéo.<br> <br> <b>/!\ Attention :</b> Si un fichier portant le même nom existe déjà, il sera écrasé sans confirmation, donc si vous souhaitez le conserver, déplacez-le dans un autre dossier avant de télécharger les sous-titres.<br> <br> Trouvez d'autres extensions pour VLC sur <a href="http://addons.videolan.org">addons.videolan.org</a>. Langue de l'interface Ok Supprimer les tags Recherche Sauvegarder Recherche automatique Recherche en cours... Recherche par titre Recherche traductions Saison (séries) Configuration Aide Titre VLSub working directory Cliquer ici pour ouvrir le fichier Recherche terminée Lien de téléchargement Téléchargement des sous-titres Erreur Session expirée, nouvel essai Sous-titres chargés Veuillez utiliser cette méthode pendant la lecture Aucun résultat Pas de réponse du serveur Aucun sous-titre sélectionné Fichier non trouvé Fichier non trouvé (caractére illégal?) Cette méthode ne fonctionne qu'avec les fichiers locaux Serveur surchargé, réessayer plus tard résultat(s) Impossible de sauvegarder les sous-titres Ok Accès refusé vlsub-0.10.2/locale/ger.xml000066400000000000000000000114611304020134600154570ustar00rootroot00000000000000Berechne video-Hash Einloggen Ausloggen Prüfe Sitzung Suche nach Untertiteln Alle Nein Ja Abbrechen Schließen Konfigurieren Eintellungen Untertitelsprache Untertitel von OpenSubtitles.org herunterladen Sprach-Code im Dateinamen anzeigen Was soll mit den Untertiteln gemacht werden Nur laden Manuell herunterladen Laden und speichern Auswahl herunterladen Episode (Serien) Hilfe Untertitel von <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> herunterladen und anzeigen, während das Video abgespielt wird.<br> <br> <b><u>Verwendung:</u></b><br> <br> VLSub sollte verwendet werden, während ein Video abgespielt wird. Spielen Sie daher zunächt ein Video ab (wenn nichts abgespielt wird, erhalten Sie einen Link, um die Untertitel im Browser herunterzuladen).<br> <br> Wählen Sie die Untertitel-Sprache aus und klicken Sie auf den Button einer der beiden von VLSub angebotenen Such-Methoden:<br> <br> <b>Methode 1: Suche anhand eines Hash-Wertes</b><br> Es wird empfohlen, diese Methode zuerst zu versuchen, da sie eine Suche anhand des Hash-Wertes der Video-Datei durchführt. Somit finden Sie Untertitel, die synchron zu Ihrer Video-Datei sind.<br> <br> <b>Methode 2: Suche anhand des Namens</b><br> Verwenden Sie diese Methode, wenn Sie mit der ersten keinen Erfolg hatten. Prüfen Sie zunächst den Namen und klicken Sie dann auf "Suche nach Namen". Wenn Sie Untertitel für Serien suchen, können Sie auch die Nummer der Staffel und Episode angeben.<br> <br> <b>Untertitel herunterladen</b><br> Wählen Sie einen Untertitel aus der Liste und klicken Sie auf 'herunterladen'.<br> Die Datei wird im selben Verzeichnis wie das Video abgelegt. Sie wird den gleichen Dateinamen wie die Video-Datei erhalten, jedoch mit einer anderen Dateiendung. Hierdurch wird VLC diesen Untertitel automatisch laden, wenn Sie das Video das nächste mal abspielen.<br> <br> <b>/!\ Achtung :</b> Bereits vorhandene Untertitel werden ohne Rückfrage überschrieben. Legen Sie diese woanders ab, falls sie wichtig sind.<br> <br> Mehr VLC-Erweiterungen finden Sie unter <a href='http://addons.videolan.org'>addons.videolan.org</a>. Anzeigesprache OK Tags entfernen Suchen Speichern Suche nach Hash Suche nach Übersetzungen ... Suche nach Namen Übersetzungen suchen Staffel (Serien) Konfiguration anzeigen Hilfe anzeigen Titel VLSub Arbeitsverzeichnis Klicken Sie hier um die Datei zu öffnen Suche abgeschlossen Download Link Untertitel wird heruntergeladen Fehler Sitzung abgelaufen, versuche es nochmals Untertitel geladen Bitte verwenden Sie diese Methode während des Abspielens Kein Ergebnis Server antwortet nicht Keine Untertitel ausgewählt Datei nicht gefunden Datei nicht gefunden (nicht erlaubtes Zeichen?) Diese Methode funktioniert (bisher) nur mit einer lokalen Datei Server überlastet, versuchen Sie es später nochmals Ergebnis(se) Untertitel kann nicht gespeichert werden Erfolg Anfrage nicht autorisiertvlsub-0.10.2/locale/heb.xml000066400000000000000000000126771304020134600154520ustar00rootroot00000000000000מחרוזת הגיבוב של הסרט מחושבת מתבצעת כניסה מתבצעת יציאה ההפעלה נבדקת מתבצע חיפוש אחר כתוביות הכול לא כן ביטול סגירה הגדרה הגדרות שפת התכוביות הורדת כתוביות מ־OpenSubtitles.org הצגת קוד השפה בשם הקובץ מה לעשות עם הכתוביות לטעון בלבד להוריד ידנית לטעון ולשמור להוריד את הבחירה פרק (סדרה) עזרה <div style='direction: rtl;'> הורדת כתוביות מ־<a href='http://www.opensubtitles.org/'>opensubtitles.org</a> והצגתן בעת צפייה בווידאו.<br> <br> <b><u>Usage:</u></b><br> <br> VLSub מיועדת לשימוש בעת הצפייה בווידאו, לכן יש להפעיל אותה תחילה (אם שום דבר לא מתנגן יופיע קישור להורדת הכתוביות בדפדפן שלך).<br> <br> יש לבחור את שפת הכתוביות המועדפת עליך וללחוץ על הלחצן המתאים לאחת משתי שיטות המחקר שמוצעות על ידי VLSub:<br> <br> <b>שיטה מס׳ 1: חיפוש לפי מחרוזת גיבוב</b><br> מומלץ לנסות את השיטה הזאת קודם, כיוון שהיא מבססת את המחקר על חותמת קובץ הווידאו, כך שניתן למצוא כתוביות שיסתנכרנו עם סרטון הווידאו שלך.<br> <br> <b>שיטה מס׳ 2: חיפוש לפי שם</b><br> אם לא שפר מזלך עם השיטה הראשונה, עליך פשוט לבדוק האם הכותרת נכונה לפני המשך התהליך. אם הכתוביות הרצויות לך הן של סדרה, ניתן גם לציין עונה ואת מספר הפרק.<br> <br> <b>הורדת כתוביות</b><br> ניתן לבחור בערכת כתוביות אחת מהרשימה וללחוץ על 'הורדה'.<br> פעולה זו תוסיף את הכתוביות באותה התיקייה עם קובץ הווידאו, באותו השם (עם סיומת שונה) כדי של־VLC תהיה אפשרות לטעון אותה אוטומטית בפעם הבאה שהווידאו יופעל.<br> <br> <b>/!\ לתשומת לבך :</b> כתוביות קיימות נדרסות ללא צורך באישור, לכן כדאי לשים אותן במקום אחר אם הן חשובות.<br> <br> ניתן למצוא עוד תוספות של VLC בכתובת <a href='http://addons.videolan.org'>addons.videolan.org</a>. שפת המנשק אישור הסרת תגיות מחקר שמירה חיפוש לפי מחרוזת גיבוב בחיפוש אחר כתוביות ... Sחיפוש לפי שם חיפוש כתוביות עונה (סדרה) הצגת ההגדרות הצגת העזרה כותרת תיקיית העבודה של VLSub יש ללחוץ כאן כדי לפתוח את הקובץ המחקר הושלם קישור להורדה הכתוביות בהורדה שגיאה ההפעלה פגה, מתבצע ניסיון נוסף הכתוביות נטענו נא להשתמש בשיטה זו במהלך הנגינה אין תוצאות השרת אינו מגיב לא נבחרו כתוביות הקובץ לא נמצא הקובץ לא נמצא (תווים בלתי חוקיים?) שיטה זו עובדת עם קבצים מקומיים בלבד (כרגע) השרת עמוס, נא לנסות שוב מאוחר יותר תוצאה/אות לא ניתן לשמור את הכתוביות הסתיים בהצלחה הבקשה לא אושרה vlsub-0.10.2/locale/hun.xml000066400000000000000000000112571304020134600154770ustar00rootroot00000000000000Film hash számítása Bejelentkezés Kijelentkezés Session vizsgálata Feliratok keresése Mind Nem Igen Mégse Bezár Beállítások Beállítások Felirat nyelve Feliratok letöltése az OpenSubtitles.org -ról Nyelvi kód megjelenítése a fájl nevében Mi legyen a feliratokkal Csak betöltése Kézi letöltés Betöltése és mentés Kijelölt letöltése Epizód (sorozat) Segítség Feliratok letöltése a <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> -ról valamint megjelenítésük lejátszás során.<br> <br> <b><u>Használat:</u></b><br> <br> A VLSub lejátszás közben használandó. Indítsd el a lejátszást (ha éppen nincs videó lejátszás folyamatban akkor a letöltési link a böngészőben fog megjelenni).<br> <br> Válaszd ki a keresendő felirat nyelvét, majd kattints a VLSub által támogatott két keresési metódus valamelyikére. :<br> <br> <b>Első metódus: Keresés hash alapján</b><br> Ajánlott, hogy ezzel a metódussal keress először, mert ez a videó fájl nyomata alapján keres, így a videódhoz igazított feliratot találhatsz.<br> <br> <b>Második metódus: Név szerinti keresés</b><br> Amennyiben nincs szerencséd az első metódussal, akkor használd ezt, de győződj meg róla, hogy a cím rendben van mielőtt rákattintasz a gombra. Amennyiben egy sorozathoz keresel feliratot, akkor megadhatsz évad és epizód számot is.<br> <br> <b>Feliratok letöltése</b><br> Válassz ki egy feliratot a listából és kattints a 'Letöltésre'.<br> Ugyan abba a könyvtárba fog kerülni mint a videó, ugyan azzal a névvel (különböző kiterjesztéssel), így a videó következő lejátszásakor a Vlc automatikusan be fogja tölteni.<br> <br> <b>/!\ Figyelem :</b> A már létező feliratuk megerősítés nélkül felülírásra kerülnek, tehát tedd őket máshova ha fontosak.<br> <br> További Vlc kiegészítőket a <a href='http://addons.videolan.org'>addons.videolan.org</a> oldalon találhatsz. Kezelőfelület nyelve Ok Tagek eltávolítása Kutatás Mentés Hash szerinti keresés Fordítások keresése ... Név szerinti keresés Fordítások keresése Évad (sorozat) Beállítások megjelenítése Segítség megjelenítése Cím VLSub munka könyvtár Kattints ide a fájl megnyitásához Kutatás befejezve Letöltési link Felirat letöltése Hiba Lejárt session, újra próbálkozás Feliratok betöltve Kérlek használd ezt a metódust lejátszás alatt Nincs találat A szerver nem válaszol Nincs felirat kiválasztva Nem találom a fájlt Nem találom a fájlt (nem engedélyezett karakter?) Ez a metódus csak helyi fájlokkal működik (egyelőre) A szerver túlterhelt, kérlek próbáld újra később Találat(ok) Nem sikerült a felirat mentése Siker Engedélyezetlen kérés vlsub-0.10.2/locale/ita.xml000066400000000000000000000112531304020134600154560ustar00rootroot00000000000000+Calcolo hash del filmato +Connessione +Disconnessione +Verifica sessione +Ricerca sottotitoli +Tutto +No + +Annulla +Chiudi +Config +Configurazione +Lingua sottotitoli +Scarica sottotitoli da OpenSubtitles.org +Mostra codice lingua nel nome del file +Cosa fare con i sottotitoli +Carica solamente +Scaricamento manuale +Carica e salva +Selezione scaricamento +Episodio (serie) +Guida + Scarica i sottotitoli da <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> e li visualizza mentre viene riprodotto un video.<br> <br> <b><u>Utilizzo:</u></b><br> <br> VLSub è stato pensato per essere utilizzato mentre si sta visualizzando un video (se non ci sono video riprodotti, verrà visualizzato un link per scaricare i sottotitoli nel browser).<br> <br> Scegli la lingua dei sottotitoli e fai clic sul pulsante corrispondente ad uno dei due metodi di ricerca forniti da VLSub:<br> <br> <b>Metodo 1: Ricerca per hash</b><br> Si consiglia di provare ad utilizzare prima questo metodo perchè esegue una ricerca basata sull'impronta del video quindi possono essere trovati sottotitoli perfettamente sincronizzati con l'audio.<br> <br> <b> Metodo 2: Ricerca per nome</b><br> Se il primo metodo non fornisce risultati, assicurati che il nome del video sia corretto prima di fare clic su questo pulsante. Se cerchi i sottotitoli per una serie, puoi inserire anche il numero della stagione e dell'episodio.<br> <br> <b>Scaricamento sottotitoli</b><br> Seleziona un sottotitolo nella lista e fai clic su 'Scaricamento'.<br> Sarà posizionato nella stessa cartella del tuo video con lo stesso nome (ma con estensione diversa) in modo che Vlc lo carichi automaticamente la prossima volta che il video sarà caricato.<br> <br> <b>/!\ Attenzione :</b> I sottotitoli con lo stesso nome verranno sovrascritti senza chiedere conferma, quindi rinominali o spostali altrove se sono importanti.<br> <br> Scarica altre estensioni di Vlc s a <a href='http://addons.videolan.org'>addons.videolan.org</a>. +Lingua interfaccia +Ok +Rimuovi tag +Cerca +Salva +Cerca per hash +Ricerca traduzioni... +Cerca per nome +Ricerca traduzioni +Stagione (serie) +Mostra config +Mostra guida +Titolo +Cartella di lavoro di VLSub +Fai clic qui per aprire il file +Ricerca completa +Link scaricamento +Scaricamento sottotitolo +Errore +Sessione scaduta, riprovo +Sottotitoli caricati +Prego usare questo metodo durante la riproduzione +Nessun risultato +Il server non risponde +Nessun sottotitolo selezionato +File non trovato +File non trovato (carattere non valido?) +Questo metodo funziona solo con file locali (per adesso) +Server sovraccarico, prego riprova più tardi +Risultati +Impossibile salvare sottotitoli +Successo +Richiesta non autorizzata vlsub-0.10.2/locale/pob.xml000066400000000000000000000106341304020134600154630ustar00rootroot00000000000000Calculando hash Fazendo Login Fazendo Logout Checando sessão Procurando legendas Todos Cancelar Fechar Configurações Configuração Idioma das legendas Baixe legendas em OpenSubtitles.org Mostrar código do idioma no nome do arquivo O que fazer com as legendas Apenas carregar Download manual Carregar e salvar Baixar seleção Episódio (seriados) Ajuda Baixe legendas de <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> e exiba-os enquanto assiste um vídeo.<br> <br> <b><u>Uso:</u></b><br> <br> VLSub é destinado para usar enquanto você assiste um vídeo, então abra-o primeiro (se nada for exibido, você receberá um link para baixar a legenda em seu navegador).<br> <br> Selecione o idioma de sua legenda e clique no botão que corresponde a um dos dois métodos de pesquisa disponiblizados pelo VLSub:<br> <br> <b>Método 1: Busca por hash</b><br> é recomendável o uso deste método primeiro, pois ele realiza uma pesquisa baseada na assinatura do arquivo, sendo assim você pode encontrar legendas sincronizadas com o vídeo.<br> <br> <b>Método 2: Busca por nome</b><br> Se você não tiver sorte com o primeiro método, verifique se o nome está correto antes de clicar. Se você procura legendas para seriados, você pode também fornecer o n&uatilde;mero da temporada e do episódio.<br> <br> <b>Baixando legendas</b><br> Selecione uma legenda na lista e clique em 'Download'.<br> O arquivo será colocado no mesmo diretório que seu vídeo contendo o mesmo nome (extensões diferentes) e o VLC carregará o arquivo automaticamente na próxima vêz que você iniciar o vídeo.<br> <br> <b>/!\ Atenção:</b> Legendas existentes serão substituídas sem confirmação, então coloque-as em outro lugar se elas forem importantes.<br> <br> Encontre mais extensões para o VLC em <a href='http://addons.videolan.org'>addons.videolan.org</a>. Idioma da interface Ok Remover tags Pesquisa Salvar Procurar por hash Procurando traduções... Procurar por nome Procure traduções Temporada (seriados) Mostrar configurações Mostrar ajuda Título Clique para abrir o arquivo Pesquisa concluída Link para download Baixando legenda Erro Sessão expirada, tentando novamente Legenda carregada Por favor, utlize este método quando estiver tocando Sem resultados Servidor não responde Nenhuma legenda selecionada Arquivo não encontrado Arquivo não encontrado (caractére não permitido?) Este método funciona apenas para arquivos locais (por enquanto) Servidor sobrecarregado, tente novamente mais tarde encontrada(s) Não foi possível salvar a legenda Sucesso Solicitação não autorizada vlsub-0.10.2/locale/pol.xml000066400000000000000000000106771304020134600155040ustar00rootroot00000000000000Liczę hash filmu Zalogowuję Wylogowuję Sprawdzam sesję Szukam napisów All Nie Tak Anuluj Zamknij Konfiguracja Ustawienia Język napisów Ściągnij napisy z OpenSubtitles.org Pokaż kod języka w nazwie pliku Co zrobić z napisami Tylko załaduj Ściągnij ręcznie Załaduj i zapisz Zaznaczenie ściągania Epizody (serial) Pomoc Ściągaj napisy z <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> oraz wyświetlaj je podczas oglądania wideo.<br> <br> <b><u>Użytkowanie:</u></b><br> <br> VLSub jest przeznaczone do użytku w trakcie oglądania video, więc najpierw uruchom wideo (jeśli nic nie jest odgrywane zobaczysz link do ściągnięcia napisów w swojej przeglądarce).<br> <br> Wybierz język dla swoich napisów i kliknij przycisk odpowiadający jednej z dwóch metod wyszukiwania udostępnionych przez VLSub:<br> <br> <b>Methoda 1: Wyszukaj po hashu</b><br> Rekomendujemy spróbować najpierw tej metody, ponieważ wykonuje wyszukiwanie na bazie unikalnego "odcisku palca" dla pliku wideo, dzięki czemu napisy będą zsynchronizowane z twoim wideo.<br> <br> <b>Methoda 2: Wyszukaj po nazwie</b><br> Jeśli nie udało się pierwszą metodą, sprawdź czy tytuł jest prawidłowy i wypróbuj drugiej. Jeśli szukasz napisów dla serialu, możesz też dodać nr sezonu i odcinka.<br> <br> <b>Ściąganie napisów</b><br> Wybierz napisy z listy i kliknij przycisk 'Ściągnij'.<br> Zostaną zapisane w tym samym folderze co wideo, z tą samą nazwą (inne rozszerzenie) więc VLC załaduje je automatycznie przy następnym uruchomieniu tego wideo.<br> <br> <b>/!\ Uwaga :</b> Istniejące napisy są nadpisywane bez pytania o potwierdzenie, więc umieść je gdzie indziej, jeśli są ważne.<br> <br> Więcej rozszerzeń VLC znajdziesz na <a href='http://addons.videolan.org'>addons.videolan.org</a>. Język interfejsu Ok Usuń tagi Ponownie wyszukaj Zapisz Wyszukaj po hashu Wyszukuję tłumaczenia ... Wyszukaj po nazwie Szukaj tłumaczeń Sezon (serial) Pokaż ustawienia Pokaż pomoc Tytuł Folder roboczy VLSub Kliknij tu, aby otworzyć plik Wyszukiwanie zakończone Link do ściągnięcia Ściągam napisy Błąd Sesja wygasła, próbuję ponownie Napisy załadowane Proszę używaj tej metody podczas odgrywania Brak wyników Serwer nie odpowiada Nie wybrano napisów Pliku nie znaleziono Pliku nie znaleziono (niedozwolony znak?) Ta metoda działa tylko dla lokalnych plików (póki co) Serwer przeładowany, proszę spróbuj później wynik(i) Nie można zapisać napisów Powodzenie Żądanie nieautoryzowane vlsub-0.10.2/locale/por.xml000066400000000000000000000111211304020134600154730ustar00rootroot00000000000000A calcular a hash do vídeo A entrar A sair A verificar a sessão A procurar legendas Todos Não Sim Cancelar Fechar Config Configuração Idioma das legendas Descarregar legendas de OpenSubtitles.org Mostrar o código da língua no nome do ficheiro O que fazer com as legendas Apenas carregar Download manual Carregar e guardar Descarregar selecção Episódio (série) Ajuda Descarregar legendas de <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> e apresentá-las durante a reprodução do vídeo.<br> <br> <b><u>Uso:</u></b><br> <br> O VLSub deve ser usado durante a reprodução de um vídeo, por isso comece um (se nada estiver a ser reproduzido irá obter um link para fazer o download das legendas no seu browser).<br> <br> Escolha a língua das suas legendas e de seguida clique num dos botões correspondente aos dois métodos de pesquisa disponibilizados pelo VLSub:<br> <br> <b>Método 1: Procurar por hash</b><br> É recomendado que experimente este método primeiro, porque a procura é baseada no reconhecimento do ficheiro e deverá encontrar legendas sincronizadas com o vídeo.<br> <br> <b>Método 2: Procurar por nome</b><br> Se não teve sorte com o primeiro método, verifique que o título está correcto antes de clicar. Se estiver à procura de legendas para uma série pode também indicar o número da temporada e do episódio.<br> <br> <b>A carregar legendas</b><br> Selecione uma legenda da lista e clique em 'Descarregar'.<br> Será posta no mesmo directório que o vídeo, com o mesmo nome (com a diferença da extensão) e será carregada automaticamente pelo VLC a próxima vez que começar o vídeo.<br> <br> <b>/!\ Cuidado :</b> Legendas existentes serão substituídas sem perguntar por confirmação, por isso ponha-as noutro lado se forem importantes.<br> <br> Encontre mais extensões para o VLC em <a href='http://addons.videolan.org'>addons.videolan.org</a>. Idioma da interface Ok Remover tags Pesquisa Guardar Procurar por hash A procurar traduções... Procurar por nome Procurar traduções Temporada (série) Apresentar configurações Apresentar ajuda Título VLSub directório de trabalho Clique aqui para abrir o ficheiro Pesquisa terminada Link para download A descarregar legenda Erro Sessão expirada, a tentar de novo Legendas carregadas Por favor use este método durante a reprodução Sem resultado O servidor não responde Nenhuma legenda está selecionada Ficheiro não encontrado Ficheiro não encontrado (caractér ilegal?) Este método funciona apenas com ficheiros locais (de momento) Servidor sobrecarregado, por favor tente mais tarde resultado(s) Não foi possível guardar as legendas Sucesso Pedido não autorizado vlsub-0.10.2/locale/rum.xml000066400000000000000000000111661304020134600155070ustar00rootroot00000000000000Se calculează hash-ul filmului Autentificare Dezautentificare Se verifică sesiunea Se caută subtitluri Toate Nu Da Renunță Închide Config Configurare Limba subtitlurilor Descarcă subtitluri de la OpenSubtitles.org Afișează codul de limbă în numele fișierului Ce se va face cu subtitlurile Doar încarcă Descărcare manuală Încarcă și salvează Descarcă ce e selectat Episod (serii) Ajutor Descarcă subtitluri de la <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> și afișează-le în timpul redării unui film.<br> <br> <b><u>Utilizare:</u></b><br> <br> VLSub este recomandat să fie folosit în timpul vizionării unui film, deci mai întâi pornește-l (dacă nimic nu este redat vei primi o legătură pentru descărcarea subtitlurilor în navigatorul tău).<br> <br> Alege limba pentru subtitlurile tale și apasă butonul corespunzător uneia din cele două metode de căutare furnizate de VLSub:<br> <br> <b>Metoda 1: Caută după hash</b><br> Este recomandat să încerci mai întâi această metodă deoarece va efectua o căutare după amprenta fișierului video și vei găsi subtitluri sincronizate cu filmul tău.<br> <br> <b>Metoda 2: Caută după nume</b><br> Dacă nu ai succes cu prima metodă, doar verifică dacă titlul este corect înainte să apeși. Când cauți subtitluri pentru o serie poți furniza de asemenea și un sezon și un număr de episod.<br> <br> <b>Descărcarea subtitlurilor</b><br> Alege un subtitlu din listă și apasă pe butonul 'Descarcă'.<br> Va fi pus în același dosar ca și filmul, cu același nume (extensie diferită) și astfel Vlc le va încarca automat data următoare când pornești filmul.<br> <br> <b>/!\ Atenție:</b> Subtitlurile existente sunt suprascrise fără confirmare, deci pune-le în altă parte dacă sunt importante.<br> <br> Poți găsi mai multe extensii Vlc la <a href='http://addons.videolan.org'>addons.videolan.org</a>. Limba interfeței Ok Înlătură etichetele Caută Salvează Caută după hash Se caută traduceri... Caută după nume Caută traduceri Sezon (serii) Afișează config Afișează ajutor Titlu Dosarul de lucru al VLSub Apasă aici pentru a deschide fișierul Cautare finalizată Legătură pentru descărcare Se descărcă subtitlul Eroare Sesiunea a expirat, se încearcă din nou Subtitluri încărcate Te rog folosește această metodă în timpul redării Niciun rezultat Serverul nu răspunde Niciun subtitlu selectat Fișierul nu a fost găsit Fișierul nu a fost găsit (character nelegal?) Această metodă funcționează doar cu un fișier local (momentan) Server supraîncărcat, te rog încearcă din nou mai târziu rezultat(e) Nu se pot salva subtitlurile Succes Cerere neautorizată vlsub-0.10.2/locale/slo.xml000077500000000000000000000110221304020134600154730ustar00rootroot00000000000000Výpočet hash filmu Prihlásenie Odhlásenie Kontrola relácie Vyhľadávanie titulkov Všetky Nie Áno Zrušiť Zavrieť Nastavenie Nastavenie Jazyk titulkov Sťahovanie titulkov z OpenSubtitles.org Zobraziť kód jazyka v názve súboru Čo robiť s titulkami Len nahrať Stiahnuť ručne Nahrať a uložiť Stiahnuť vybrané Epizóda (seriál) Pomoc Sťahovanie titulkov z <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> a ich zobrazenie počas sledovania videa.<br> <br> <b><u>Použitie:</u></b><br> <br> VLSub je určený pre použitie počas sledovania videa, takže ho najprv začnite prehrávať (pokiaľ sa nič neprehráva, dostanete link na stiahnutie titulkov vo svojom prehliadači Internetu).<br> <br> Vyberte jazyk pre vaše titulky a kliknite na tlačidlo zodpovedajúce jednej z dvoch vyhľadávacích metód, ktoré vám VLSub ponúka:<br> <br> <b>Metóda 1: Hľadať podľa hash</b><br> Odporúča sa vyskúšať najprv túto metódu, pretože tá robí vyhľadávanie založené na odtlačku videosúboru, takže môžete nájsť titulky synchronizované s vaším videom.<br> <br> <b>Metóda 2: Hľadať podľa názvu</b><br> Ak neuspejete s prvou metódou, pred kliknutím na tlačidlo len skontrolujte názov, či je správny. Ak hľadáte titulky pre seriál, môžete tiež uviesť číslo série a epizódy.<br> <br> <b>Sťahovanie titulkov</b><br> Označte jeden výsledok v zozname a kliknite na 'Stiahnuť vybrané'.<br> Bude uložený v rovnakom adresári, ako je vaše video, s rovnakým názvom (rôzna prípona), takže nabudúce pri ďalšom spustení videa ich VLC načíta automaticky.<br> <br> <b>/!\ Pozor :</b> Existujúce titulky sú prepísané bez vypýtania si potvrdenia, takže si ich presuňte inde, ak sú dôležité.<br> <br> Viac rozšírení pre VLC nájdete na <a href='http://addons.videolan.org'>addons.videolan.org</a>. Jazyk rozhrania Ok Odstrániť formátovacie značky Hľadanie Uložiť Hľadať podľa hash Vyhľadávanie prekladov... Hľadať podľa názvu Hľadať preklady Séria (seriál) Ukázať nastavenie Ukázať pomoc Názov Pracovný adresár VLSub Kliknutím sem otvoríte súbor Hľadanie dokončené Link na stiahnutie Sťahovanie titulkov Chyba Relácia vypršala, opakovanie Titulky načítané Použite túto metódu počas prehrávania Žiadny výsledok Server neodpovedá Nezvolené žiadne titulky Súbor nebol nájdený Súbor nebol nájdený (nepovolený znak?) Táto metóda funguje iba s lokálnym súborom (zatiaľ) Server preťažený, skúste to znova neskôr výsledky Nemožno uložiť titulky Úspech Požiadavka odmietnutá vlsub-0.10.2/locale/spa.xml000066400000000000000000000136611304020134600154710ustar00rootroot00000000000000Calculando el hash del video Iniciar sesión Cerrar sesión Comprobando sesión Buscando subtítulos Todos No Cancelar Cerrar Configurar Configuración Idioma de los subtítulos Descargar subtítulos de OpenSubtitles.org Incluir el código del idioma en el nombre del archivo ¿Qué hacer con los subtitulos? Sólo cargar Descarga manual Cargar y guardar Descargar seleccionados Capítulo (serie) Ayuda Descarga los subtítulos de <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> y los añade automáticamente mientras reproduces un video.<br> <br> <b><u>Uso:</u></b><br> <br> VLSub está pensado para utilizarse mientras reproduces un video, así que comienza por reproducir tu video (si ningún video se encuentra en reproducción vas a obtener un enlace para descargar los subtítulos con tu navegador).<br> <br> Selecciona el idioma de los subtítulos y haz clic en el botón correspondiente a uno de los dos métodos de búsqueda proporcionados por VLSub:<br> <br> <b>Método 1: Buscar por hash</b><br> Se recomienda probar primero con este método porque la búsqueda se basa en información propia del archivo de video, así que encontrarás subtítulos especialmente sincronizados con tu video.<br> <br> <b> Método 2: Buscar por nombre</b><br> Si no tuviste suerte con el primer método puedes buscar por nombre. Asegurate de comprobar que el título sea el correcto antes de hacer clic para buscar. Si estás buscando subtítulos para una serie también puedes indicar la temporada y el número de capítulo.<br> <br> <b>Descargar subtítulos</b><br>Selecciona uno de los subtítulos en la lista y haz clic en "Descargar seleccionados". Se descargará en el mismo directorio donde se ubica tu video y con el mismo nombre (pero diferente extensión) para que VLC lo cargue automáticamente cuando reproduzcas el video de nuevo.<br> <br> <b>/!\ Cuidado :</b> Los subtítulos pre existentes serán sobrescritos sin solicitar confirmación alguna, así que guarda una copia en cualquier otro directorio si deseas conservarlos.<br> <br> Encuentra más extensiones para VLC en el sitio <a href='http://addons.videolan.org'>addons.videolan.org</a>. Idioma de la interfaz <strong>VLSub no está funcionando en VLC 2.1.x en ninguna plataforma</strong> dado que el módulo lua "net" necesario para interactuar con opensubtitles ha sido removido para las extensiones en esta versión de VLC. <br> <strong>Funciona en VLC Vlc 2.2 para Mac y Linux.</strong> <br> <strong>En Windows tienes que instalar una versión más antigua de VLC (2.0.8 por ejemplo)</strong> para poder usar VLSub: <br> <a target="_blank" rel="nofollow" href="http://download.videolan.org/pub/videolan/vlc/2.0.8/"> http://download.videolan.org/pub/videolan/vlc/2.0.8/</a><br> Ok Contraseña Nombre de usuario Quitar etiquetas Buscar Guardar Buscar por hash Buscando traducciones... Buscar por nombre Buscar traducciones Temporada (serie) Mostrar configuración Mostrar ayuda Título Directorio de trabajo de VLSub Haga clic aquí para abrir el archivo Búsqueda finalizada Enlace de descarga Descargando subtítulo No se puede encontrar una ruta adecuada para guardar la configuración, por favor indicala manulmente Error la ruta contiene caracteres ilegales, por favor corrijela antes de continuar Expiró la sesión, probando de nuevo Subtítulos cargados Por favor usa este método durante la reproducción Sin resultados El servidor no responde Ningún subtítulo fue seleccionado Archivo no encontrado Archivo no encontrado (¿caracter ilegal?) Este método sólo funciona con un archivo local (por el momento) Servidor sobrecargado, por favor prueba más tarde resultado(s) Falla al guardar los subtítulos Éxito Petición no autorizada vlsub-0.10.2/locale/swe.xml000066400000000000000000000104511304020134600154760ustar00rootroot00000000000000Beräknar film-hash Loggar in Loggar ut Kollar session Kollar undertexter Alla Nej Ja Avbryt Stäng Konfigurera Konfiguration Undertextspråk Ladda ner undertexter från OpenSubtitles.org Visa språkkod i filnamn Hur hantera undertexter Läs in endast Manuell nedladdning Läs in och spara Ladda ner Episod (serier) Hjälp Ladda ner undertexter från <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> och visa dem medan du tittar på film.<br> <br> <b><u>Usage:</u></b><br> <br> VLSub är tänkt att användas medan du spelar upp filmen, så starta den först (om ingen film spelas upp, får du en länk till nedladdning i din webbläsare).<br> <br> Välj språk för dina undertexter och klicka på knappen för en av de två sökmetoder som stöds av VLSub:<br> <br> <b>Metod 1: Sök via hash</b><br> Du rekommenderas att prova den här metoden först, eftersom sökningen då baseras på filmfilens avtryck, så att du kan hitta undertexter som är synkroniserade med din film.<br> <br> <b>Metod 2: Sök via namn</b><br> Används om första metoden misslyckas. Kolla bara så att filmtiteln är korrekt innan du klickar. Söker du undertexter till en serie, kan du även specificera säsong och episodnummer.<br> <br> <b>Ladda ner undertexter</b><br> Välj en undertext i listan och klicka på 'Ladda ner'.<br> Den kommer att läggas i samma mapp som din film, med samma namn (annan filändelse) så att VLC läser in den automatiskt nästa gång du startar filmen.<br> <br> <b>/!\ OBS!</b> Befintliga undertexter skrivs över utan föregående varning, så flytta dem ifall det är viktigt att de sparas.<br> <br> Kolla fler VLC-tillägg <a href='http://addons.videolan.org'>addons.videolan.org</a>. Användarspråk OK Ta bort taggar Sök igen Spara Sök via hash Söker översättningar... Sök via namn Sök översättningar Säsong (serier) Konfigurera Hjälp Titel VLSub arbetsmapp Klicka här för att öppna filen Sökning slutförd Nedladdningslänk Laddar ner undertext Fel Sessionen har upphört att gälla, försöker igen Undertexter inlästa Använd den här metoden under uppspelning Inget resultat Servern svarar inte Inga undertexter valda Filen kan inte hittas Filen kan inte hittas (ogiltiga tecken?) Den här metoden stöder endast lokala filer (tills vidare) Servern överbelastad, försök senare resultat Kan inte spara undertexter Slutfört Obehörig begäran vlsub-0.10.2/locale/ukr.xml000066400000000000000000000134631304020134600155070ustar00rootroot00000000000000Розрахунок вiдео хашу Увiйти Вийти Перевiрити сеанс Пошук субтитрiв Усi Вiдмiнити Закрити Настройки Настройки Мова субтитрiв Завантаження субтитрiв з OpenSubtitles.org Показувати мовний код в назвi файлу Що робити з субтитрами Тiльки завантажити Ручне завантаження Завантажити i зберегти Завантажити вибранi Епiзод (серiï) Допомога Завинтажити субтитри з <a href='http://www.opensubtitles.org/'>opensubtitles.org</a> i показати протягом вiдтворення.<br> <br> <b><u>Використання:</u></b><br> <br> VLSub буде використовуватись протягом вiдтворення, так що вiдкрийте його першим (якщо нiчого немає у вiдтвореннi, получите посилання для загрузки з браузера).<br> <br> Вибери мову субтитрiв i нажми на вiдповiдну кнопку, одного з двох методiв пошуку представлених вiд VLSub:<br> <br> <b>Метод 1: Пошук по хашу</b><br>Це рекомендований метод, тому що пошук ведеться завдяки розпiзнавання вiдео, це дає змову найти синхронiзованi субтитри для вiдео.<br> <br> <b>Метод 2: Пошук по iменi</b><br> Якщо перший метод не спрацював, перевiр назву чи вона вiрна перед тим як нажати на кнопку, можеш ввести номер сезону i номер серiï.<br> <br> <b>Завантаження субтитрiв</b><br>Вибери однi субтитри з списку i нажми на "Завантажити".<br> Завантажаться в ту ж папку де знаходиться вiдео, з таким ж iм'ям(рiзнi розширення) тому Vlc ïх завантажить автоматично коли почнеться вiдтворення вiдео.<br> <br> <b>/!\ Обережно :</b> iснуючi субтитри будуть перезаписанi без запиту пiдтвердження, тому якщо тобi важливi iснуючi субтитри, переiменуй ïх або збережи у iншiй папцi.<br> <br> Можеш знайти бiльше розширеннь для Vlc на цiй сторiнцi <a href='http://addons.videolan.org'>addons.videolan.org</a>. Мова iнтерфейсу Ок Видалити таг Новий пошук Зберегти Шукати за хашем Пошук перекладу... Пошук по iменi Пошук перекладу Сезон (серiï) Показати файл настройок Показати допомогу Назва Нажати тут щоб вiдкрити Новий пошук завершений Скачати посилання Скачати субтитри Помилка Сеанс закiнчився, повторне пiдключення Субтитри завантаженнi Будь ласка використовуй цей медот протягом вiдтворення Без результатiв Сервер не вiдповiдає Субтитри не вибранi Файл не знайденний Файл не знайденний (недозволеннi символи?) Цей метод працює тiльки з локальними файлами (на даний момент) Сервер перезавантаженний, будь ласка спробуй чуть пiзнiше результат(iв) Неможливо зберегти субтитри Правильно Неавторизований запит vlsub-0.10.2/vlsub.lua000066400000000000000000001710521304020134600145620ustar00rootroot00000000000000--[[ VLSub Extension for VLC media player 1.1 and 2.0 Copyright 2013 Guillaume Le Maout Authors: Guillaume Le Maout Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche Bug report: http://addons.videolan.org/content/show.php/?content=148752 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. --]] --[[ Global var ]]-- -- You can set here your default language by replacing nil with -- your language code (see below).Example: -- language = "fre", -- language = "ger", -- language = "eng", -- ... local options = { language = nil, downloadBehaviour = 'save', langExt = false, removeTag = false, showMediaInformation = true, progressBarSize = 80, intLang = 'eng', translations_avail = { eng = 'English', cze = 'Czech', dan = 'Danish', dut = 'Nederlands', fre = 'Français', ell = 'Greek', baq = 'Basque', pob = 'Brazilian Portuguese', por = 'Portuguese (Portugal)', rum = 'Romanian', slo = 'Slovak', spa = 'Spanish', swe = 'Swedish', ukr = 'Ukrainian', hun = 'Hungarian' }, translation = { int_all = 'All', int_descr = 'Download subtitles from OpenSubtitles.org', int_research = 'Research', int_config = 'Config', int_configuration = 'Configuration', int_help = 'Help', int_search_hash = 'Search by hash', int_search_name = 'Search by name', int_title = 'Title', int_season = 'Season (series)', int_episode = 'Episode (series)', int_show_help = 'Show help', int_show_conf = 'Show config', int_dowload_sel = 'Download selection', int_close = 'Close', int_ok = 'Ok', int_save = 'Save', int_cancel = 'Cancel', int_bool_true = 'Yes', int_bool_false = 'No', int_search_transl = 'Search translations', int_searching_transl = 'Searching translations ...', int_int_lang = 'Interface language', int_default_lang = 'Subtitles language', int_dowload_behav = 'What to do with subtitles', int_dowload_save = 'Load and save', int_dowload_load = 'Load only', int_dowload_manual = 'Manual download', int_display_code = 'Display language code in file name', int_remove_tag = 'Remove tags', int_vlsub_work_dir = 'VLSub working directory', int_os_username = 'Username', int_os_password = 'Password', int_help_mess =[[ Download subtitles from opensubtitles.org and display them while watching a video.

Usage:

Start your video. If you use Vlsub witout playing a video you will get a link to download the subtitles in your browser but the subtitles won't be saved and loaded automatically.

Choose the language for your subtitles and click on the button corresponding to one of the two research methods provided by VLSub:

Method 1: Search by hash
It is recommended to try this method first, because it performs a research based on the video file print, so you can find subtitles synchronized with your video.

Method 2: Search by name
If you have no luck with the first method, just check the title is correct before clicking. If you search subtitles for a series, you can also provide a season and episode number.

Downloading Subtitles
Select one subtitle in the list and click on 'Download'.
It will be put in the same directory that your video, with the same name (different extension) so VLC will load them automatically the next time you'll start the video.

/!\\ Beware : Existing subtitles are overwritten without asking confirmation, so put them elsewhere if they're important.

Find more VLC extensions at addons.videolan.org. ]], int_no_support_mess = [[ VLSub is not working with Vlc 2.1.x on any platform because the lua "net" module needed to interact with opensubtitles has been removed in this release for the extensions.
Works with Vlc 2.2 on mac and linux.
On windows you have to install an older version of Vlc (2.0.8 for example) to use Vlsub:
http://download.videolan.org/pub/videolan/vlc/2.0.8/
]], action_login = 'Logging in', action_logout = 'Logging out', action_noop = 'Checking session', action_search = 'Searching subtitles', action_hash = 'Calculating movie hash', mess_success = 'Success', mess_error = 'Error', mess_no_response = 'Server not responding', mess_unauthorized = 'Request unauthorized', mess_expired = 'Session expired, retrying', mess_overloaded = 'Server overloaded, please retry later', mess_no_input = 'Please use this method during playing', mess_not_local = 'This method works with local file only (for now)', mess_not_found = 'File not found', mess_not_found2 = 'File not found (illegal character?)', mess_no_selection = 'No subtitles selected', mess_save_fail = 'Unable to save subtitles', mess_click_link = 'Click here to open the file', mess_complete = 'Research complete', mess_no_res = 'No result', mess_res = 'result(s)', mess_loaded = 'Subtitles loaded', mess_not_load = 'Unable to load subtitles', mess_downloading = 'Downloading subtitle', mess_dowload_link = 'Download link', mess_err_conf_access ='Can\'t find a suitable path to save'.. 'config, please set it manually', mess_err_wrong_path ='the path contains illegal character, '.. 'please correct it', mess_err_cant_download_interface_translation='could not download interface translation' } } local languages = { {'alb', 'Albanian'}, {'ara', 'Arabic'}, {'arm', 'Armenian'}, {'baq', 'Basque'}, {'ben', 'Bengali'}, {'bos', 'Bosnian'}, {'bre', 'Breton'}, {'bul', 'Bulgarian'}, {'bur', 'Burmese'}, {'cat', 'Catalan'}, {'chi', 'Chinese'}, {'hrv', 'Croatian'}, {'cze', 'Czech'}, {'dan', 'Danish'}, {'dut', 'Dutch'}, {'eng', 'English'}, {'epo', 'Esperanto'}, {'est', 'Estonian'}, {'fin', 'Finnish'}, {'fre', 'French'}, {'glg', 'Galician'}, {'geo', 'Georgian'}, {'ger', 'German'}, {'ell', 'Greek'}, {'heb', 'Hebrew'}, {'hin', 'Hindi'}, {'hun', 'Hungarian'}, {'ice', 'Icelandic'}, {'ind', 'Indonesian'}, {'ita', 'Italian'}, {'jpn', 'Japanese'}, {'kaz', 'Kazakh'}, {'khm', 'Khmer'}, {'kor', 'Korean'}, {'lav', 'Latvian'}, {'lit', 'Lithuanian'}, {'ltz', 'Luxembourgish'}, {'mac', 'Macedonian'}, {'may', 'Malay'}, {'mal', 'Malayalam'}, {'mon', 'Mongolian'}, {'nor', 'Norwegian'}, {'oci', 'Occitan'}, {'per', 'Persian'}, {'pol', 'Polish'}, {'por', 'Portuguese'}, {'pob', 'Brazilian Portuguese'}, {'rum', 'Romanian'}, {'rus', 'Russian'}, {'scc', 'Serbian'}, {'sin', 'Sinhalese'}, {'slo', 'Slovak'}, {'slv', 'Slovenian'}, {'spa', 'Spanish'}, {'swa', 'Swahili'}, {'swe', 'Swedish'}, {'syr', 'Syriac'}, {'tgl', 'Tagalog'}, {'tel', 'Telugu'}, {'tha', 'Thai'}, {'tur', 'Turkish'}, {'ukr', 'Ukrainian'}, {'urd', 'Urdu'}, {'vie', 'Vietnamese'} } -- Languages code conversion table: iso-639-1 to iso-639-3 -- See https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes local lang_os_to_iso = { sq = "alb", ar = "ara", hy = "arm", eu = "baq", bn = "ben", bs = "bos", br = "bre", bg = "bul", my = "bur", ca = "cat", zh = "chi", hr = "hrv", cs = "cze", da = "dan", nl = "dut", en = "eng", eo = "epo", et = "est", fi = "fin", fr = "fre", gl = "glg", ka = "geo", de = "ger", el = "ell", he = "heb", hi = "hin", hu = "hun", is = "ice", id = "ind", it = "ita", ja = "jpn", kk = "kaz", km = "khm", ko = "kor", lv = "lav", lt = "lit", lb = "ltz", mk = "mac", ms = "may", ml = "mal", mn = "mon", no = "nor", oc = "oci", fa = "per", pl = "pol", pt = "por", po = "pob", ro = "rum", ru = "rus", sr = "scc", si = "sin", sk = "slo", sl = "slv", es = "spa", sw = "swa", sv = "swe", tl = "tgl", te = "tel", th = "tha", tr = "tur", uk = "ukr", ur = "urd", vi = "vie" } local dlg = nil local input_table = {} -- General widget id reference local select_conf = {} -- Drop down widget / option table association local app_name = "VLsub"; local app_version = "0.10.2"; local app_useragent = app_name.." "..app_version; --[[ VLC extension stuff ]]-- function descriptor() return { title = app_useragent, version = app_version, author = "exebetche", url = 'http://www.opensubtitles.org/', shortdesc = app_name; description = options.translation.int_descr, capabilities = {"menu", "input-listener" } } end function activate() vlc.msg.dbg("[VLsub] Welcome") if not check_config() then vlc.msg.err("[VLsub] Unsupported VLC version") return false end if vlc.input.item() then openSub.getFileInfo() openSub.getMovieInfo() end show_main() end function close() vlc.deactivate() end function deactivate() vlc.msg.dbg("[VLsub] Bye bye!") if dlg then dlg:hide() end if openSub.session.token and openSub.session.token ~= "" then openSub.request("LogOut") end end function menu() return { lang.int_research, lang.int_config, lang.int_help } end function meta_changed() return false end function input_changed() collectgarbage() set_interface_main() collectgarbage() end --[[ Interface data ]]-- function interface_main() dlg:add_label(lang["int_default_lang"]..':', 1, 1, 1, 1) input_table['language'] = dlg:add_dropdown(2, 1, 2, 1) dlg:add_button(lang["int_search_hash"], searchHash, 4, 1, 1, 1) dlg:add_label(lang["int_title"]..':', 1, 2, 1, 1) input_table['title'] = dlg:add_text_input( openSub.movie.title or "", 2, 2, 2, 1) dlg:add_button(lang["int_search_name"], searchIMBD, 4, 2, 1, 1) dlg:add_label(lang["int_season"]..':', 1, 3, 1, 1) input_table['seasonNumber'] = dlg:add_text_input( openSub.movie.seasonNumber or "", 2, 3, 2, 1) dlg:add_label(lang["int_episode"]..':', 1, 4, 1, 1) input_table['episodeNumber'] = dlg:add_text_input( openSub.movie.episodeNumber or "", 2, 4, 2, 1) input_table['mainlist'] = dlg:add_list(1, 5, 4, 1) input_table['message'] = nil input_table['message'] = dlg:add_label(' ', 1, 6, 4, 1) dlg:add_button( lang["int_show_help"], show_help, 1, 7, 1, 1) dlg:add_button( ' '..lang["int_show_conf"]..' ', show_conf, 2, 7, 1, 1) dlg:add_button( lang["int_dowload_sel"], download_subtitles, 3, 7, 1, 1) dlg:add_button( lang["int_close"], close, 4, 7, 1, 1) assoc_select_conf( 'language', 'language', openSub.conf.languages, 2, lang["int_all"]) display_subtitles() end function set_interface_main() -- Update movie title and co. if video input change if not type(input_table['title']) == 'userdata' then return false end openSub.getFileInfo() openSub.getMovieInfo() input_table['title']:set_text( openSub.movie.title or "") input_table['episodeNumber']:set_text( openSub.movie.episodeNumber or "") input_table['seasonNumber']:set_text( openSub.movie.seasonNumber or "") end function interface_config() input_table['intLangLab'] = dlg:add_label( lang["int_int_lang"]..':', 1, 1, 1, 1) input_table['intLangBut'] = dlg:add_button( lang["int_search_transl"], get_available_translations, 2, 1, 1, 1) input_table['intLang'] = dlg:add_dropdown(3, 1, 1, 1) dlg:add_label( lang["int_default_lang"]..':', 1, 2, 2, 1) input_table['default_language'] = dlg:add_dropdown(3, 2, 1, 1) dlg:add_label( lang["int_dowload_behav"]..':', 1, 3, 2, 1) input_table['downloadBehaviour'] = dlg:add_dropdown(3, 3, 1, 1) dlg:add_label( lang["int_display_code"]..':', 1, 4, 0, 1) input_table['langExt'] = dlg:add_dropdown(3, 4, 1, 1) dlg:add_label( lang["int_remove_tag"]..':', 1, 5, 0, 1) input_table['removeTag'] = dlg:add_dropdown(3, 5, 1, 1) if openSub.conf.dirPath then if openSub.conf.os == "win" then dlg:add_label( "".. lang["int_vlsub_work_dir"].."", 1, 6, 2, 1) else dlg:add_label( "".. lang["int_vlsub_work_dir"].."", 1, 6, 2, 1) end else dlg :add_label( lang["int_vlsub_work_dir"], 1, 6, 2, 1) end input_table['dir_path'] = dlg:add_text_input( openSub.conf.dirPath, 2, 6, 2, 1) dlg:add_label( lang["int_os_username"]..':', 1, 7, 0, 1) input_table['os_username'] = dlg:add_text_input( type(openSub.option.os_username) == "string" and openSub.option.os_username or "", 2, 7, 2, 1) dlg:add_label( lang["int_os_password"]..':', 1, 8, 0, 1) input_table['os_password'] = dlg:add_text_input( type(openSub.option.os_password) == "string" and openSub.option.os_password or "", 2, 8, 2, 1) input_table['message'] = nil input_table['message'] = dlg:add_label(' ', 1, 9, 3, 1) dlg:add_button( lang["int_cancel"], show_main, 2, 10, 1, 1) dlg:add_button( lang["int_save"], apply_config, 3, 10, 1, 1) input_table['langExt']:add_value( lang["int_bool_"..tostring(openSub.option.langExt)], 1) input_table['langExt']:add_value( lang["int_bool_"..tostring(not openSub.option.langExt)], 2) input_table['removeTag']:add_value( lang["int_bool_"..tostring(openSub.option.removeTag)], 1) input_table['removeTag']:add_value( lang["int_bool_"..tostring(not openSub.option.removeTag)], 2) assoc_select_conf( 'intLang', 'intLang', openSub.conf.translations_avail, 2) assoc_select_conf( 'default_language', 'language', openSub.conf.languages, 2, lang["int_all"]) assoc_select_conf( 'downloadBehaviour', 'downloadBehaviour', openSub.conf.downloadBehaviours, 1) end function interface_help() local help_html = lang["int_help_mess"] input_table['help'] = dlg:add_html( help_html, 1, 1, 4, 1) dlg:add_label( string.rep (" ", 100), 1, 2, 3, 1) dlg:add_button( lang["int_ok"], show_main, 4, 2, 1, 1) end function interface_no_support() local no_support_html = lang["int_no_support_mess"] input_table['no_support'] = dlg:add_html( no_support_html, 1, 1, 4, 1) dlg:add_label( string.rep (" ", 100), 1, 2, 3, 1) end function trigger_menu(dlg_id) if dlg_id == 1 then close_dlg() dlg = vlc.dialog( openSub.conf.useragent) interface_main() elseif dlg_id == 2 then close_dlg() dlg = vlc.dialog( openSub.conf.useragent..': '..lang["int_configuration"]) interface_config() elseif dlg_id == 3 then close_dlg() dlg = vlc.dialog( openSub.conf.useragent..': '..lang["int_help"]) interface_help() end collectgarbage() --~ !important end function show_main() trigger_menu(1) end function show_conf() trigger_menu(2) end function show_help() trigger_menu(3) end function close_dlg() vlc.msg.dbg("[VLSub] Closing dialog") if dlg ~= nil then --~ dlg:delete() -- Throw an error dlg:hide() end dlg = nil input_table = nil input_table = {} collectgarbage() --~ !important end --[[ Drop down / config association]]-- function assoc_select_conf(select_id, option, conf, ind, default) -- Helper for i/o interaction between drop down and option list select_conf[select_id] = { cf = conf, opt = option, dflt = default, ind = ind } set_default_option(select_id) display_select(select_id) end function set_default_option(select_id) -- Put the selected option of a list in first place of the associated table local opt = select_conf[select_id].opt local cfg = select_conf[select_id].cf local ind = select_conf[select_id].ind if openSub.option[opt] then table.sort(cfg, function(a, b) if a[1] == openSub.option[opt] then return true elseif b[1] == openSub.option[opt] then return false else return a[ind] < b[ind] end end) end end function display_select(select_id) -- Display the drop down values with an optional default value at the top local conf = select_conf[select_id].cf local opt = select_conf[select_id].opt local option = openSub.option[opt] local default = select_conf[select_id].dflt local default_isset = false if not default then default_isset = true end for k, l in ipairs(conf) do if default_isset then input_table[select_id]:add_value(l[2], k) else if option then input_table[select_id]:add_value(l[2], k) input_table[select_id]:add_value(default, 0) else input_table[select_id]:add_value(default, 0) input_table[select_id]:add_value(l[2], k) end default_isset = true end end end --[[ Config & interface localization]]-- function check_config() -- Make a copy of english translation to use it as default -- in case some element aren't translated in other translations eng_translation = {} for k, v in pairs(openSub.option.translation) do eng_translation[k] = v end -- Get available translation full name from code trsl_names = {} for i, lg in ipairs(languages) do trsl_names[lg[1]] = lg[2] end if is_window_path(vlc.config.datadir()) then openSub.conf.os = "win" slash = "\\" else openSub.conf.os = "lin" slash = "/" end local path_generic = {"lua", "extensions", "userdata", "vlsub"} local dirPath = slash..table.concat(path_generic, slash) local filePath = slash.."vlsub_conf.xml" local config_saved = false sub_dir = slash.."vlsub_subtitles" -- Check if config file path is stored in vlc config local other_dirs = {} for path in vlc.config.get("sub-autodetect-path"):gmatch("[^,]+") do if path:match(".*"..sub_dir.."$") then openSub.conf.dirPath = path:gsub( "%s*(.*)"..sub_dir.."%s*$", "%1") config_saved = true end table.insert(other_dirs, path) end -- if not stored in vlc config -- try to find a suitable config file path if openSub.conf.dirPath then if not is_dir(openSub.conf.dirPath) and (openSub.conf.os == "lin" or is_win_safe(openSub.conf.dirPath)) then mkdir_p(openSub.conf.dirPath) end else local userdatadir = vlc.config.userdatadir() local datadir = vlc.config.datadir() -- check if the config already exist if file_exist(userdatadir..dirPath..filePath) then -- in vlc.config.userdatadir() openSub.conf.dirPath = userdatadir..dirPath config_saved = true elseif file_exist(datadir..dirPath..filePath) then -- in vlc.config.datadir() openSub.conf.dirPath = datadir..dirPath config_saved = true else -- if not found determine an accessible path local extension_path = slash..path_generic[1] ..slash..path_generic[2] -- use the same folder as the extension if accessible if is_dir(userdatadir..extension_path) and file_touch(userdatadir..dirPath..filePath) then openSub.conf.dirPath = userdatadir..dirPath elseif file_touch(datadir..dirPath..filePath) then openSub.conf.dirPath = datadir..dirPath end -- try to create working dir in user folder if not openSub.conf.dirPath and is_dir(userdatadir) then if not is_dir(userdatadir..dirPath) then mkdir_p(userdatadir..dirPath) end if is_dir(userdatadir..dirPath) and file_touch(userdatadir..dirPath..filePath) then openSub.conf.dirPath = userdatadir..dirPath end end -- try to create working dir in vlc folder if not openSub.conf.dirPath and is_dir(datadir) then if not is_dir(datadir..dirPath) then mkdir_p(datadir..dirPath) end if file_touch(datadir..dirPath..filePath) then openSub.conf.dirPath = datadir..dirPath end end end end if openSub.conf.dirPath then vlc.msg.dbg("[VLSub] Working directory: " .. (openSub.conf.dirPath or "not found")) openSub.conf.filePath = openSub.conf.dirPath..filePath openSub.conf.localePath = openSub.conf.dirPath..slash.."locale" if config_saved and file_exist(openSub.conf.filePath) then vlc.msg.dbg( "[VLSub] Loading config file: "..openSub.conf.filePath) load_config() else vlc.msg.dbg("[VLSub] No config file") getenv_lang() config_saved = save_config() if not config_saved then vlc.msg.dbg("[VLSub] Unable to save config") end end -- Check presence of a translation file -- in "%vlsub_directory%/locale" -- Add translation files to available translation list local file_list = list_dir(openSub.conf.localePath) local translations_avail = openSub.conf.translations_avail if file_list then for i, file_name in ipairs(file_list) do local lg = string.gsub( file_name, "^(%w%w%w).xml$", "%1") if lg and not openSub.option.translations_avail[lg] then table.insert(translations_avail, { lg, trsl_names[lg] }) end end end -- Load selected translation from file if openSub.option.intLang ~= "eng" and not openSub.conf.translated then local transl_file_path = openSub.conf.localePath.. slash..openSub.option.intLang..".xml" if file_exist(transl_file_path) then vlc.msg.dbg( "[VLSub] Loading translation from file: ".. transl_file_path) load_transl(transl_file_path) end end else vlc.msg.dbg("[VLSub] Unable to find a suitable path".. "to save config, please set it manually") end lang = nil lang = options.translation -- just a short cut if not vlc.net or not vlc.net.poll then dlg = vlc.dialog( openSub.conf.useragent..': '..lang["mess_error"]) interface_no_support() dlg:show() return false end SetDownloadBehaviours() if not openSub.conf.dirPath then setError(lang["mess_err_conf_access"]) end -- Set table list of available translations from assoc. array -- so it is sortable for k, l in pairs(openSub.option.translations_avail) do if k == openSub.option.int_research then table.insert(openSub.conf.translations_avail, 1, {k, l}) else table.insert(openSub.conf.translations_avail, {k, l}) end end collectgarbage() return true end function load_config() -- Overwrite default conf with loaded conf local tmpFile = io.open(openSub.conf.filePath, "rb") if not tmpFile then return false end local resp = tmpFile:read("*all") tmpFile:flush() tmpFile:close() local option = parse_xml(resp) for key, value in pairs(option) do if type(value) == "table" then if key == "translation" then openSub.conf.translated = true for k, v in pairs(value) do openSub.option.translation[k] = v end else openSub.option[key] = value end else if value == "true" then openSub.option[key] = true elseif value == "false" then openSub.option[key] = false else openSub.option[key] = value end end end collectgarbage() end function load_transl(path) -- Overwrite default conf with loaded conf local tmpFile = assert(io.open(path, "rb")) local resp = tmpFile:read("*all") tmpFile:flush() tmpFile:close() openSub.option.translation = nil openSub.option.translation = parse_xml(resp) collectgarbage() end function apply_translation() -- Overwrite default conf with loaded conf for k, v in pairs(eng_translation) do if not openSub.option.translation[k] then openSub.option.translation[k] = eng_translation[k] end end end function getenv_lang() -- Retrieve the user OS language local os_lang = os.getenv("LANG") if os_lang then -- unix, mac os_lang = string.sub(os_lang, 0, 2) if type(lang_os_to_iso[os_lang]) then openSub.option.language = lang_os_to_iso[os_lang] end else -- Windows local lang_w = string.match( os.setlocale("", "collate"), "^[^_]+") for i, v in ipairs(openSub.conf.languages) do if v[2] == lang_w then openSub.option.language = v[1] end end end end function apply_config() -- Apply user config selection to local config local lg_sel = input_table['intLang']:get_value() local sel_val local opt local sel_cf if lg_sel and lg_sel ~= 1 and openSub.conf.translations_avail[lg_sel] then local lg = openSub.conf.translations_avail[lg_sel][1] if not set_translation(lg) then vlc.msg.err("[VLSub] Couldn't not set translation") return false end SetDownloadBehaviours() end for select_id, v in pairs(select_conf) do if input_table[select_id] and select_conf[select_id] then sel_val = input_table[select_id]:get_value() sel_cf = select_conf[select_id] opt = sel_cf.opt if sel_val == 0 then openSub.option[opt] = nil else openSub.option[opt] = sel_cf.cf[sel_val][1] end set_default_option(select_id) end end openSub.option.os_username = input_table['os_username']:get_text() openSub.option.os_password = input_table['os_password']:get_text() if input_table["langExt"]:get_value() == 2 then openSub.option.langExt = not openSub.option.langExt end if input_table["removeTag"]:get_value() == 2 then openSub.option.removeTag = not openSub.option.removeTag end -- Set a custom working directory local dir_path = input_table['dir_path']:get_text() local dir_path_err = false if trim(dir_path) == "" then dir_path = nil end if dir_path ~= openSub.conf.dirPath then if openSub.conf.os == "lin" or is_win_safe(dir_path) or not dir_path then local other_dirs = {} for path in vlc.config.get( "sub-autodetect-path"):gmatch("[^,]+" ) do path = trim(path) if path ~= (openSub.conf.dirPath or "")..sub_dir then table.insert(other_dirs, path) end end openSub.conf.dirPath = dir_path if dir_path then table.insert(other_dirs, string.gsub(dir_path, "^(.-)[\\/]?$", "%1")..sub_dir) if not is_dir(dir_path) then mkdir_p(dir_path) end openSub.conf.filePath = openSub.conf.dirPath.. slash.."vlsub_conf.xml" openSub.conf.localePath = openSub.conf.dirPath.. slash.."locale" else openSub.conf.filePath = nil openSub.conf.localePath = nil end vlc.config.set( "sub-autodetect-path", table.concat(other_dirs, ", ")) else dir_path_err = true setError(lang["mess_err_wrong_path"].. "
".. string.gsub( dir_path, "[^%:%w%p%s§¤]+", "%1" ).. "") end end if openSub.conf.dirPath and not dir_path_err then local config_saved = save_config() trigger_menu(1) if not config_saved then setError(lang["mess_err_conf_access"]) end else setError(lang["mess_err_conf_access"]) end end function save_config() -- Dump local config into config file if openSub.conf.dirPath and openSub.conf.filePath then vlc.msg.dbg( "[VLSub] Saving config file: ".. openSub.conf.filePath) if file_touch(openSub.conf.filePath) then local tmpFile = assert( io.open(openSub.conf.filePath, "wb")) local resp = dump_xml(openSub.option) tmpFile:write(resp) tmpFile:flush() tmpFile:close() tmpFile = nil else return false end collectgarbage() return true else vlc.msg.dbg("[VLSub] Unable fount a suitable path ".. "to save config, please set it manually") setError(lang["mess_err_conf_access"]) return false end end function SetDownloadBehaviours() openSub.conf.downloadBehaviours = nil openSub.conf.downloadBehaviours = { {'save', lang["int_dowload_save"]}, {'manual', lang["int_dowload_manual"]} } end function get_available_translations() -- Get all available translation files from the internet -- (drop previous direct download from github repo -- causing error with github https CA certficate on OS X an XP) -- https://github.com/exebetche/vlsub/tree/master/locale local translations_url = "http://addons.videolan.org/CONTENT/".. "content-files/148752-vlsub_translations.xml" if input_table['intLangBut']:get_text() == lang["int_search_transl"] then openSub.actionLabel = lang["int_searching_transl"] local translations_content = get(translations_url) if not translations_content then collectgarbage() return false end local translations_avail = openSub.option.translations_avail all_trsl = parse_xml(translations_content) local lg, trsl for lg, trsl in pairs(all_trsl) do if lg ~= options.intLang[1] and not translations_avail[lg] then translations_avail[lg] = trsl_names[lg] or "" table.insert(openSub.conf.translations_avail, { lg, trsl_names[lg] }) input_table['intLang']:add_value( trsl_names[lg], #openSub.conf.translations_avail) end end setMessage(success_tag(lang["mess_complete"])) collectgarbage() end return true end function set_translation(lg) openSub.option.translation = nil openSub.option.translation = {} if lg == 'eng' then for k, v in pairs(eng_translation) do openSub.option.translation[k] = v end else -- If translation file exists in /locale directory load it if openSub.conf.localePath and file_exist(openSub.conf.localePath.. slash..lg..".xml") then local transl_file_path = openSub.conf.localePath.. slash..lg..".xml" vlc.msg.dbg("[VLSub] Loading translation from file: ".. transl_file_path) load_transl(transl_file_path) apply_translation() else -- Load translation file from internet if not all_trsl and not get_available_translations() then setMessage(error_tag(lang["mess_err_cant_download_interface_translation"])) return false end if not all_trsl or not all_trsl[lg] then vlc.msg.dbg("[VLSub] Error, translation not found") return false end openSub.option.translation = all_trsl[lg] apply_translation() all_trsl = nil end end lang = nil lang = openSub.option.translation collectgarbage() return true end --[[ Core ]]-- openSub = { itemStore = nil, actionLabel = "", conf = { url = "http://api.opensubtitles.org/xml-rpc", path = nil, HTTPVersion = "1.1", userAgentHTTP = app_useragent, useragent = app_useragent, translations_avail = {}, downloadBehaviours = nil, languages = languages }, option = options, session = { loginTime = 0, token = "" }, file = { hasInput = false, uri = nil, ext = nil, name = nil, path = nil, protocol = nil, cleanName = nil, dir = nil, hash = nil, bytesize = nil, fps = nil, timems = nil, frames = nil }, movie = { title = "", seasonNumber = "", episodeNumber = "", sublanguageid = "" }, request = function(methodName) local params = openSub.methods[methodName].params() local reqTable = openSub.getMethodBase(methodName, params) local request = ""..dump_xml(reqTable) local host, path = parse_url(openSub.conf.url) local header = { "POST "..path.." HTTP/"..openSub.conf.HTTPVersion, "Host: "..host, "User-Agent: "..openSub.conf.userAgentHTTP, "Content-Type: text/xml", "Content-Length: "..string.len(request), "", "" } request = table.concat(header, "\r\n")..request local response local status, responseStr = http_req(host, 80, request) if status == 200 then response = parse_xmlrpc(responseStr) if response then if response.status == "200 OK" then return openSub.methods[methodName] .callback(response) elseif response.status == "406 No session" then openSub.request("LogIn") elseif response then setError("code '".. response.status.. "' ("..status..")") return false end else setError("Server not responding") return false end elseif status == 401 then setError("Request unauthorized") response = parse_xmlrpc(responseStr) if openSub.session.token ~= response.token then setMessage("Session expired, retrying") openSub.session.token = response.token openSub.request(methodName) end return false elseif status == 503 then setError("Server overloaded, please retry later") return false end end, getMethodBase = function(methodName, param) if openSub.methods[methodName].methodName then methodName = openSub.methods[methodName].methodName end local request = { methodCall={ methodName=methodName, params={ param=param }}} return request end, methods = { LogIn = { params = function() openSub.actionLabel = lang["action_login"] return { { value={ string=openSub.option.os_username } }, { value={ string=openSub.option.os_password } }, { value={ string=openSub.movie.sublanguageid } }, { value={ string=openSub.conf.useragent } } } end, callback = function(resp) openSub.session.token = resp.token openSub.session.loginTime = os.time() return true end }, LogOut = { params = function() openSub.actionLabel = lang["action_logout"] return { { value={ string=openSub.session.token } } } end, callback = function() return true end }, NoOperation = { params = function() openSub.actionLabel = lang["action_noop"] return { { value={ string=openSub.session.token } } } end, callback = function(resp) return true end }, SearchSubtitlesByHash = { methodName = "SearchSubtitles", params = function() openSub.actionLabel = lang["action_search"] setMessage(openSub.actionLabel..": ".. progressBarContent(0)) return { { value={ string=openSub.session.token } }, { value={ array={ data={ value={ struct={ member={ { name="sublanguageid", value={ string=openSub.movie.sublanguageid } }, { name="moviehash", value={ string=openSub.file.hash } }, { name="moviebytesize", value={ double=openSub.file.bytesize } } }}}}}}} } end, callback = function(resp) openSub.itemStore = resp.data end }, SearchSubtitles = { methodName = "SearchSubtitles", params = function() openSub.actionLabel = lang["action_search"] setMessage(openSub.actionLabel..": ".. progressBarContent(0)) local member = { { name="sublanguageid", value={ string=openSub.movie.sublanguageid } }, { name="query", value={ string=openSub.movie.title } } } if openSub.movie.seasonNumber ~= nil then table.insert(member, { name="season", value={ string=openSub.movie.seasonNumber } }) end if openSub.movie.episodeNumber ~= nil then table.insert(member, { name="episode", value={ string=openSub.movie.episodeNumber } }) end return { { value={ string=openSub.session.token } }, { value={ array={ data={ value={ struct={ member=member }}}}}} } end, callback = function(resp) openSub.itemStore = resp.data end }, SearchSubtitles2 = { methodName = "SearchSubtitles", params = function() openSub.actionLabel = lang["action_search"] setMessage(openSub.actionLabel..": ".. progressBarContent(0)) local member = { { name="sublanguageid", value={ string=openSub.movie.sublanguageid } }, { name="tag", value={ string=openSub.file.completeName } } } return { { value={ string=openSub.session.token } }, { value={ array={ data={ value={ struct={ member=member }}}}}} } end, callback = function(resp) openSub.itemStore = resp.data end } }, getInputItem = function() return vlc.item or vlc.input.item() end, getFileInfo = function() -- Get video file path, name, extension from input uri local item = openSub.getInputItem() local file = openSub.file if not item then file.hasInput = false; file.cleanName = nil; file.protocol = nil; file.path = nil; file.ext = nil; file.uri = nil; else vlc.msg.dbg("[VLSub] Video URI: "..item:uri()) local parsed_uri = vlc.net.url_parse(item:uri()) file.uri = item:uri() file.protocol = parsed_uri["protocol"] file.path = parsed_uri["path"] -- Corrections -- For windows file.path = string.match(file.path, "^/(%a:/.+)$") or file.path -- For file in archive local archive_path, name_in_archive = string.match( file.path, '^([^!]+)!/([^!/]*)$') if archive_path and archive_path ~= "" then file.path = string.gsub( archive_path, '\063', '%%') file.path = vlc.strings.decode_uri(file.path) file.completeName = string.gsub( name_in_archive, '\063', '%%') file.completeName = vlc.strings.decode_uri( file.completeName) file.is_archive = true else -- "classic" input file.path = vlc.strings.decode_uri(file.path) file.dir, file.completeName = string.match( file.path, '^(.+/)([^/]*)$') local file_stat = vlc.net.stat(file.path) if file_stat then file.stat = file_stat end file.is_archive = false end file.name, file.ext = string.match( file.completeName, '^([^/]-)%.?([^%.]*)$') if file.ext == "part" then file.name, file.ext = string.match( file.name, '^([^/]+)%.([^%.]+)$') end file.hasInput = true; file.cleanName = string.gsub( file.name, "[%._]", " ") vlc.msg.dbg("[VLSub] file info "..(dump_xml(file))) end collectgarbage() end, getMovieInfo = function() -- Clean video file name and check for season/episode pattern in title if not openSub.file.name then openSub.movie.title = "" openSub.movie.seasonNumber = "" openSub.movie.episodeNumber = "" return false end local showName, seasonNumber, episodeNumber = string.match( openSub.file.cleanName, "(.+)[sS](%d?%d)[eE](%d%d).*") if not showName then showName, seasonNumber, episodeNumber = string.match( openSub.file.cleanName, "(.-)(%d?%d)[xX](%d%d).*") end if showName then openSub.movie.title = showName openSub.movie.seasonNumber = seasonNumber openSub.movie.episodeNumber = episodeNumber else openSub.movie.title = openSub.file.cleanName openSub.movie.seasonNumber = "" openSub.movie.episodeNumber = "" end collectgarbage() end, getMovieHash = function() -- Calculate movie hash openSub.actionLabel = lang["action_hash"] setMessage(openSub.actionLabel..": ".. progressBarContent(0)) local item = openSub.getInputItem() if not item then setError(lang["mess_no_input"]) return false end openSub.getFileInfo() if not openSub.file.path then setError(lang["mess_not_found"]) return false end local data_start = "" local data_end = "" local size local chunk_size = 65536 -- Get data for hash calculation if openSub.file.is_archive then vlc.msg.dbg("[VLSub] Read hash data from stream") local file = vlc.stream(openSub.file.uri) local dataTmp1 = "" local dataTmp2 = "" size = chunk_size data_start = file:read(chunk_size) while data_end do size = size + string.len(data_end) dataTmp1 = dataTmp2 dataTmp2 = data_end data_end = file:read(chunk_size) collectgarbage() end data_end = string.sub((dataTmp1..dataTmp2), -chunk_size) elseif not file_exist(openSub.file.path) and openSub.file.stat then vlc.msg.dbg("[VLSub] Read hash data from stream") local file = vlc.stream(openSub.file.uri) if not file then vlc.msg.dbg("[VLSub] No stream") return false end size = openSub.file.stat.size local decal = size%chunk_size data_start = file:read(chunk_size) -- "Seek" to the end file:read(decal) for i = 1, math.floor(((size-decal)/chunk_size))-2 do file:read(chunk_size) end data_end = file:read(chunk_size) file = nil else vlc.msg.dbg("[VLSub] Read hash data from file") local file = io.open( openSub.file.path, "rb") if not file then vlc.msg.dbg("[VLSub] No stream") return false end data_start = file:read(chunk_size) size = file:seek("end", -chunk_size) + chunk_size data_end = file:read(chunk_size) file = nil end -- Hash calculation local lo = size local hi = 0 local o,a,b,c,d,e,f,g,h local hash_data = data_start..data_end local max_size = 4294967296 local overflow for i = 1, #hash_data, 8 do a,b,c,d,e,f,g,h = hash_data:byte(i,i+7) lo = lo + a + b*256 + c*65536 + d*16777216 hi = hi + e + f*256 + g*65536 + h*16777216 if lo > max_size then overflow = math.floor(lo/max_size) lo = lo-(overflow*max_size) hi = hi+overflow end if hi > max_size then overflow = math.floor(hi/max_size) hi = hi-(overflow*max_size) end end openSub.file.bytesize = size openSub.file.hash = string.format("%08x%08x", hi,lo) vlc.msg.dbg("[VLSub] Video hash: "..openSub.file.hash) vlc.msg.dbg("[VLSub] Video bytesize: "..size) collectgarbage() return true end, checkSession = function() if openSub.session.token == "" then openSub.request("LogIn") else openSub.request("NoOperation") end end } function searchHash() local sel = input_table["language"]:get_value() if sel == 0 then openSub.movie.sublanguageid = 'all' else openSub.movie.sublanguageid = openSub.conf.languages[sel][1] end openSub.getMovieHash() if openSub.file.hash then openSub.checkSession() openSub.request("SearchSubtitlesByHash") display_subtitles() end end function searchIMBD() openSub.movie.title = trim(input_table["title"]:get_text()) openSub.movie.seasonNumber = tonumber( input_table["seasonNumber"]:get_text()) openSub.movie.episodeNumber = tonumber( input_table["episodeNumber"]:get_text()) local sel = input_table["language"]:get_value() if sel == 0 then openSub.movie.sublanguageid = 'all' else openSub.movie.sublanguageid = openSub.conf.languages[sel][1] end if openSub.movie.title ~= "" then openSub.checkSession() openSub.request("SearchSubtitles") display_subtitles() end end function display_subtitles() local mainlist = input_table["mainlist"] mainlist:clear() if openSub.itemStore == "0" then mainlist:add_value(lang["mess_no_res"], 1) setMessage(""..lang["mess_complete"]..": ".. lang["mess_no_res"]) elseif openSub.itemStore then for i, item in ipairs(openSub.itemStore) do mainlist:add_value( (item.SubFileName or "???").. " ["..(item.SubLanguageID or "?").."]".. " ("..(item.SubSumCD or "?").." CD)", i) end setMessage(""..lang["mess_complete"]..": ".. #(openSub.itemStore).." "..lang["mess_res"]) end end function get_first_sel(list) local selection = list:get_selection() for index, name in pairs(selection) do return index end return 0 end function download_subtitles() local index = get_first_sel(input_table["mainlist"]) if index == 0 then setMessage(lang["mess_no_selection"]) return false end openSub.actionLabel = lang["mess_downloading"] local item = openSub.itemStore[index] if openSub.option.downloadBehaviour == 'manual' or not openSub.file.hasInput then local link = "" link = link..""..lang["mess_dowload_link"]..":" link = link.."  " link = link.."  " link = link..item.MovieReleaseName.."" setMessage(link) return false end local message = "" local subfileName = openSub.file.name or "" if openSub.option.langExt then subfileName = subfileName.."."..item.SubLanguageID end subfileName = subfileName.."."..item.SubFormat local tmp_dir local file_target_access = true if is_dir(openSub.file.dir) then tmp_dir = openSub.file.dir elseif openSub.conf.dirPath then tmp_dir = openSub.conf.dirPath message = "
"..error_tag(lang["mess_save_fail"].."  ".. "".. lang["mess_click_link"].."") else setError(lang["mess_save_fail"].."  ".. "".. lang["mess_click_link"].."") return false end local tmpFileURI, tmpFileName = dump_zip( item.ZipDownloadLink, tmp_dir, item.SubFileName) vlc.msg.dbg("[VLsub] tmpFileName: "..tmpFileName) -- Determine if the path to the video file is accessible for writing local target = openSub.file.dir..subfileName if not file_touch(target) then if openSub.conf.dirPath then target = openSub.conf.dirPath..slash..subfileName message = "
".. error_tag(lang["mess_save_fail"].."  ".. "".. lang["mess_click_link"].."") else setError(lang["mess_save_fail"].."  ".. "".. lang["mess_click_link"].."") return false end end vlc.msg.dbg("[VLsub] Subtitles files: "..target) -- Unzipped data into file target local stream = vlc.stream(tmpFileURI) local data = "" local subfile = io.open(target, "wb") while data do subfile:write(data) data = stream:read(65536) end subfile:flush() subfile:close() stream = nil collectgarbage() if not os.remove(tmpFileName) then vlc.msg.err("[VLsub] Unable to remove temp: "..tmpFileName) end -- load subtitles if add_sub(target) then message = success_tag(lang["mess_loaded"]) .. message else message = error_tag(lang["mess_not_load"]) .. message end setMessage(message) end function dump_zip(url, dir, subfileName) -- Dump zipped data in a temporary file setMessage(openSub.actionLabel..": "..progressBarContent(0)) local resp = get(url) if not resp then setError(lang["mess_no_response"]) return false end local tmpFileName = dir..subfileName..".gz" if not file_touch(tmpFileName) then return false end local tmpFile = assert(io.open(tmpFileName, "wb")) tmpFile:write(resp) tmpFile:flush() tmpFile:close() tmpFile = nil collectgarbage() return "zip://"..make_uri(tmpFileName) .."!/"..subfileName, tmpFileName end function add_sub(subPath) if vlc.item or vlc.input.item() then subPath = decode_uri(subPath) vlc.msg.dbg("[VLsub] Adding subtitle :" .. subPath) return vlc.input.add_subtitle(subPath) end return false end --[[ Interface helpers]]-- function progressBarContent(pct) local accomplished = math.ceil( openSub.option.progressBarSize*pct/100) local left = openSub.option.progressBarSize - accomplished local content = "".. string.rep ("-", accomplished).."".. "".. string.rep ("-", left).. "" return content end function setMessage(str) if input_table["message"] then input_table["message"]:set_text(str) dlg:update() end end function setError(mess) setMessage(error_tag(mess)) end function success_tag(str) return "".. lang["mess_success"]..": "..str.."" end function error_tag(str) return "".. lang["mess_error"]..": "..str.."" end --[[ Network utils]]-- function get(url) local host, path = parse_url(url) local header = { "GET "..path.." HTTP/"..openSub.conf.HTTPVersion, "Host: "..host, "User-Agent: "..openSub.conf.userAgentHTTP, "", "" } local request = table.concat(header, "\r\n") local status, response = http_req(host, 80, request) if status == 200 then return response else vlc.msg.err("[VLSub] HTTP "..tostring(status).." : "..response) return false end end function http_req(host, port, request) local fd = vlc.net.connect_tcp(host, port) if not fd then setError("Unable to connect to server") return nil, "" end local pollfds = {} pollfds[fd] = vlc.net.POLLIN vlc.net.send(fd, request) vlc.net.poll(pollfds) local response = vlc.net.recv(fd, 2048) local buf = "" local headerStr, header, body local contentLength, status, TransferEncoding, chunked local pct = 0 while response and #response>0 do buf = buf..response if not header then headerStr, body = buf:match("(.-\r?\n)\r?\n(.*)") if headerStr then header = parse_header(headerStr); status = tonumber(header["statuscode"]); contentLength = tonumber(header["Content-Length"]); if not contentLength then contentLength = tonumber(header["X-Uncompressed-Content-Length"]) end TransferEncoding = trim(header["Transfer-Encoding"]); chunked = (TransferEncoding=="chunked"); buf = body; body = ""; end end if chunked then chunk_size_hex, chunk_content = buf:match("(%x+)\r?\n(.*)") chunk_size = tonumber(chunk_size_hex,16) chunk_content_len = chunk_content:len() chunk_remaining = chunk_size-chunk_content_len while chunk_content_len > chunk_size do body = body..chunk_content:sub(0, chunk_size) buf = chunk_content:sub(chunk_size+2) chunk_size_hex, chunk_content = buf:match("(%x+)\r?\n(.*)") if not chunk_size_hex or chunk_size_hex == "0" then chunk_size = 0 break end chunk_size = tonumber(chunk_size_hex,16) chunk_content_len = chunk_content:len() chunk_remaining = chunk_size-chunk_content_len end if chunk_size == 0 then break end end if contentLength then if #body == 0 then bodyLength = #buf else bodyLength = #body end pct = bodyLength / contentLength * 100 setMessage(openSub.actionLabel..": "..progressBarContent(pct)) if bodyLength >= contentLength then break end end vlc.net.poll(pollfds) response = vlc.net.recv(fd, 1024) end if not chunked then body = buf end if status == 301 and header["Location"] then local host, path = parse_url(trim(header["Location"])) request = request :gsub("^([^%s]+ )([^%s]+)", "%1"..path) :gsub("(Host: )([^\n]*)", "%1"..host) return http_req(host, port, request) end return status, body end function parse_header(data) local header = {} for name, s, val in string.gmatch( data, "([^%s:]+)(:?)%s([^\n]+)\r?\n") do if s == "" then header['statuscode'] = tonumber(string.sub(val, 1 , 3)) else header[name] = val end end return header end function parse_url(url) local url_parsed = vlc.net.url_parse(url) return url_parsed["host"], url_parsed["path"], url_parsed["option"] end --[[ XML utils]]-- function parse_xml(data) local tree = {} local stack = {} local tmp = {} local level = 0 local op, tag, p, empty, val table.insert(stack, tree) local resolve_xml = vlc.strings.resolve_xml_special_chars for op, tag, p, empty, val in string.gmatch( data, "[%s\r\n\t]*<(%/?)([%w:_]+)(.-)(%/?)>".. "[%s\r\n\t]*([^<]*)[%s\r\n\t]*" ) do if op=="/" then if level>0 then level = level - 1 table.remove(stack) end else level = level + 1 if val == "" then if type(stack[level][tag]) == "nil" then stack[level][tag] = {} table.insert(stack, stack[level][tag]) else if type(stack[level][tag][1]) == "nil" then tmp = nil tmp = stack[level][tag] stack[level][tag] = nil stack[level][tag] = {} table.insert(stack[level][tag], tmp) end tmp = nil tmp = {} table.insert(stack[level][tag], tmp) table.insert(stack, tmp) end else if type(stack[level][tag]) == "nil" then stack[level][tag] = {} end stack[level][tag] = resolve_xml(val) table.insert(stack, {}) end if empty ~= "" then stack[level][tag] = "" level = level - 1 table.remove(stack) end end end collectgarbage() return tree end function parse_xmlrpc(xmlText) local stack = {} local tree = {} local tmp, name = nil, nil table.insert(stack, tree) local FromXmlString = vlc.strings.resolve_xml_special_chars local data_handle = { int = function(v) return tonumber(v) end, i4 = function(v) return tonumber(v) end, double = function(v) return tonumber(v) end, boolean = function(v) return tostring(v) end, base64 = function(v) return tostring(v) end, -- FIXME ["string"] = function(v) return FromXmlString(v) end } for c, label, empty, value in xmlText:gmatch("<(%/?)([%w_:]+)(%/?)>([^<]*)") do if c == "" then -- start tag if label == "struct" or label == "array" then tmp = nil tmp = {} if name then stack[#stack][name] = tmp else table.insert(stack[#stack], tmp) end table.insert(stack, tmp) name = nil elseif label == "name" then name = value elseif data_handle[label] then if name then stack[#stack][name] = data_handle[label](value) else table.insert(stack[#stack], data_handle[label](value)) end name = nil end if empty == "/" -- empty tag and #stack>0 and (label == "struct" or label == "array") then table.remove(stack) end else -- end tag if #stack>0 and (label == "struct" or label == "array")then table.remove(stack) end end end return tree[1] end function dump_xml(data) local level = 0 local stack = {} local dump = "" local convert_xml = vlc.strings.convert_xml_special_chars local function parse(data, stack) local data_index = {} local k local v local i local tb for k,v in pairs(data) do table.insert(data_index, {k, v}) table.sort(data_index, function(a, b) return a[1] < b[1] end) end for i,tb in pairs(data_index) do k = tb[1] v = tb[2] if type(k)=="string" then dump = dump.."\r\n"..string.rep( " ", level).. "<"..k..">" table.insert(stack, k) level = level + 1 elseif type(k)=="number" and k ~= 1 then dump = dump.."\r\n"..string.rep( " ", level-1).. "<"..stack[level]..">" end if type(v)=="table" then parse(v, stack) elseif type(v)=="string" then dump = dump..(convert_xml(v) or v) elseif type(v)=="number" then dump = dump..v else dump = dump..tostring(v) end if type(k)=="string" then if type(v)=="table" then dump = dump.."\r\n"..string.rep( " ", level-1).. "" else dump = dump.."" end table.remove(stack) level = level - 1 elseif type(k)=="number" and k ~= #data then if type(v)=="table" then dump = dump.."\r\n"..string.rep( " ", level-1).. "" else dump = dump.."" end end end end parse(data, stack) collectgarbage() return dump end --[[ Misc utils]]-- function make_uri(str) str = str:gsub("\\", "/") local windowdrive = string.match(str, "^(%a:).+$") local encode_uri = vlc.strings.encode_uri_component local encodedPath = "" for w in string.gmatch(str, "/([^/]+)") do encodedPath = encodedPath.."/"..encode_uri(w) end if windowdrive then return "file:///"..windowdrive..encodedPath else return "file://"..encodedPath end end function file_touch(name) -- test write ability if not name or trim(name) == "" then return false end local f=io.open(name ,"w") if f~=nil then io.close(f) return true else return false end end function file_exist(name) -- test readability if not name or trim(name) == "" then return false end local f=io.open(name ,"r") if f~=nil then io.close(f) return true else return false end end function is_dir(path) if not path or trim(path) == "" then return false end -- Remove slash at the end or it won't work on Windows path = string.gsub(path, "^(.-)[\\/]?$", "%1") local f, _, code = io.open(path, "rb") if f then _, _, code = f:read("*a") f:close() if code == 21 then return true end elseif code == 13 then return true end return false end function list_dir(path) if not path or trim(path) == "" then return false end local dir_list_cmd local list = {} if not is_dir(path) then return false end if openSub.conf.os == "win" then dir_list_cmd = io.popen('dir /b "'..path..'"') elseif openSub.conf.os == "lin" then dir_list_cmd = io.popen('ls -1 "'..path..'"') end if dir_list_cmd then for filename in dir_list_cmd:lines() do if string.match(filename, "^[^%s]+.+$") then table.insert(list, filename) end end return list else return false end end function mkdir_p(path) if not path or trim(path) == "" then return false end if openSub.conf.os == "win" then os.execute('mkdir "' .. path..'"') elseif openSub.conf.os == "lin" then os.execute("mkdir -p '" .. path.."'") end end function decode_uri(str) return str:gsub("/", slash) end function is_window_path(path) return string.match(path, "^(%a:.+)$") end function is_win_safe(path) if not path or trim(path) == "" or not is_window_path(path) then return false end return string.match(path, "^%a?%:?[\\%w%p%s§¤]+$") end function trim(str) if not str then return "" end return string.gsub(str, "^[\r\n%s]*(.-)[\r\n%s]*$", "%1") end function remove_tag(str) return string.gsub(str, "{[^}]+}", "") end