Compare commits
19 Commits
dd8f472ac5
...
6ac0c76d65
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ac0c76d65 | ||
|
|
59503b566c | ||
|
|
b390eaf2a0 | ||
|
|
dcfc0f734b | ||
|
|
ab0df0fed3 | ||
|
|
8ad50fd881 | ||
|
|
5ed97e0b9b | ||
|
|
7d85b45d68 | ||
|
|
de56e85d2e | ||
| d84797e6a5 | |||
|
|
e3964b0002 | ||
|
|
54a3df7f7c | ||
|
|
f381fad31f | ||
|
|
e6734cb4ef | ||
|
|
dcd79b74fd | ||
|
|
4d7f728f25 | ||
|
|
ad7562f387 | ||
| e7426398ee | |||
| 20ae4e763f |
980
bin/ffx.py
980
bin/ffx.py
File diff suppressed because it is too large
Load Diff
2
bin/ffx/ffx_controller.py
Normal file
2
bin/ffx/ffx_controller.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
class FfxController():
|
||||||
|
pass
|
||||||
2
bin/ffx/file_pattern.py
Normal file
2
bin/ffx/file_pattern.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
class FilePattern():
|
||||||
|
pass
|
||||||
93
bin/ffx/language_data.py
Normal file
93
bin/ffx/language_data.py
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
from enum import Enum
|
||||||
|
import difflib
|
||||||
|
|
||||||
|
class LanguageData(Enum):
|
||||||
|
|
||||||
|
AFRIKAANS = {"name": "Afrikaans", "iso639_1": "af", "iso639_2": "afr"}
|
||||||
|
ALBANIAN = {"name": "Albanian", "iso639_1": "sq", "iso639_2": "alb"}
|
||||||
|
ARABIC = {"name": "Arabic", "iso639_1": "ar", "iso639_2": "ara"}
|
||||||
|
ARMENIAN = {"name": "Armenian", "iso639_1": "hy", "iso639_2": "arm"}
|
||||||
|
AZERBAIJANI = {"name": "Azerbaijani", "iso639_1": "az", "iso639_2": "aze"}
|
||||||
|
BASQUE = {"name": "Basque", "iso639_1": "eu", "iso639_2": "baq"}
|
||||||
|
BELARUSIAN = {"name": "Belarusian", "iso639_1": "be", "iso639_2": "bel"}
|
||||||
|
BULGARIAN = {"name": "Bulgarian", "iso639_1": "bg", "iso639_2": "bul"}
|
||||||
|
CATALAN = {"name": "Catalan", "iso639_1": "ca", "iso639_2": "cat"}
|
||||||
|
CHINESE = {"name": "Chinese", "iso639_1": "zh", "iso639_2": "chi"}
|
||||||
|
CROATIAN = {"name": "Croatian", "iso639_1": "hr", "iso639_2": "hrv"}
|
||||||
|
CZECH = {"name": "Czech", "iso639_1": "cs", "iso639_2": "cze"}
|
||||||
|
DANISH = {"name": "Danish", "iso639_1": "da", "iso639_2": "dan"}
|
||||||
|
DUTCH = {"name": "Dutch", "iso639_1": "nl", "iso639_2": "dut"}
|
||||||
|
ENGLISH = {"name": "English", "iso639_1": "en", "iso639_2": "eng"}
|
||||||
|
ESTONIAN = {"name": "Estonian", "iso639_1": "et", "iso639_2": "est"}
|
||||||
|
FINNISH = {"name": "Finnish", "iso639_1": "fi", "iso639_2": "fin"}
|
||||||
|
FRENCH = {"name": "French", "iso639_1": "fr", "iso639_2": "fre"}
|
||||||
|
GEORGIAN = {"name": "Georgian", "iso639_1": "ka", "iso639_2": "geo"}
|
||||||
|
GERMAN = {"name": "German", "iso639_1": "de", "iso639_2": "ger"}
|
||||||
|
GREEK = {"name": "Greek", "iso639_1": "el", "iso639_2": "gre"}
|
||||||
|
HEBREW = {"name": "Hebrew", "iso639_1": "he", "iso639_2": "heb"}
|
||||||
|
HINDI = {"name": "Hindi", "iso639_1": "hi", "iso639_2": "hin"}
|
||||||
|
HUNGARIAN = {"name": "Hungarian", "iso639_1": "hu", "iso639_2": "hun"}
|
||||||
|
ICELANDIC = {"name": "Icelandic", "iso639_1": "is", "iso639_2": "ice"}
|
||||||
|
INDONESIAN = {"name": "Indonesian", "iso639_1": "id", "iso639_2": "ind"}
|
||||||
|
IRISH = {"name": "Irish", "iso639_1": "ga", "iso639_2": "gle"}
|
||||||
|
ITALIAN = {"name": "Italian", "iso639_1": "it", "iso639_2": "ita"}
|
||||||
|
JAPANESE = {"name": "Japanese", "iso639_1": "ja", "iso639_2": "jpn"}
|
||||||
|
KAZAKH = {"name": "Kazakh", "iso639_1": "kk", "iso639_2": "kaz"}
|
||||||
|
KOREAN = {"name": "Korean", "iso639_1": "ko", "iso639_2": "kor"}
|
||||||
|
LATIN = {"name": "Latin", "iso639_1": "la", "iso639_2": "lat"}
|
||||||
|
LATVIAN = {"name": "Latvian", "iso639_1": "lv", "iso639_2": "lav"}
|
||||||
|
LITHUANIAN = {"name": "Lithuanian", "iso639_1": "lt", "iso639_2": "lit"}
|
||||||
|
MACEDONIAN = {"name": "Macedonian", "iso639_1": "mk", "iso639_2": "mac"}
|
||||||
|
MALAY = {"name": "Malay", "iso639_1": "ms", "iso639_2": "may"}
|
||||||
|
MALTESE = {"name": "Maltese", "iso639_1": "mt", "iso639_2": "mlt"}
|
||||||
|
NORWEGIAN = {"name": "Norwegian", "iso639_1": "no", "iso639_2": "nor"}
|
||||||
|
PERSIAN = {"name": "Persian", "iso639_1": "fa", "iso639_2": "per"}
|
||||||
|
POLISH = {"name": "Polish", "iso639_1": "pl", "iso639_2": "pol"}
|
||||||
|
PORTUGUESE = {"name": "Portuguese", "iso639_1": "pt", "iso639_2": "por"}
|
||||||
|
ROMANIAN = {"name": "Romanian", "iso639_1": "ro", "iso639_2": "rum"}
|
||||||
|
RUSSIAN = {"name": "Russian", "iso639_1": "ru", "iso639_2": "rus"}
|
||||||
|
NORTHERN_SAMI = {"name": "Northern Sami", "iso639_1": "se", "iso639_2": "sme"}
|
||||||
|
SAMOAN = {"name": "Samoan", "iso639_1": "sm", "iso639_2": "smo"}
|
||||||
|
SANGO = {"name": "Sango", "iso639_1": "sg", "iso639_2": "sag"}
|
||||||
|
SANSKRIT = {"name": "Sanskrit", "iso639_1": "sa", "iso639_2": "san"}
|
||||||
|
SARDINIAN = {"name": "Sardinian", "iso639_1": "sc", "iso639_2": "srd"}
|
||||||
|
SERBIAN = {"name": "Serbian", "iso639_1": "sr", "iso639_2": "srp"}
|
||||||
|
SHONA = {"name": "Shona", "iso639_1": "sn", "iso639_2": "sna"}
|
||||||
|
SINDHI = {"name": "Sindhi", "iso639_1": "sd", "iso639_2": "snd"}
|
||||||
|
SINHALA = {"name": "Sinhala", "iso639_1": "si", "iso639_2": "sin"}
|
||||||
|
SLOVAK = {"name": "Slovak", "iso639_1": "sk", "iso639_2": "slk"}
|
||||||
|
SLOVENIAN = {"name": "Slovenian", "iso639_1": "sl", "iso639_2": "slv"}
|
||||||
|
SOMALI = {"name": "Somali", "iso639_1": "so", "iso639_2": "som"}
|
||||||
|
SOUTHERN_SOTHO = {"name": "Southern Sotho", "iso639_1": "st", "iso639_2": "sot"}
|
||||||
|
SPANISH = {"name": "Spanish", "iso639_1": "es", "iso639_2": "spa"}
|
||||||
|
SUNDANESE = {"name": "Sundanese", "iso639_1": "su", "iso639_2": "sun"}
|
||||||
|
SWAHILI = {"name": "Swahili", "iso639_1": "sw", "iso639_2": "swa"}
|
||||||
|
SWATI = {"name": "Swati", "iso639_1": "ss", "iso639_2": "ssw"}
|
||||||
|
SWEDISH = {"name": "Swedish", "iso639_1": "sv", "iso639_2": "swe"}
|
||||||
|
TAGALOG = {"name": "Tagalog", "iso639_1": "tl", "iso639_2": "tgl"}
|
||||||
|
TAMIL = {"name": "Tamil", "iso639_1": "ta", "iso639_2": "tam"}
|
||||||
|
THAI = {"name": "Thai", "iso639_1": "th", "iso639_2": "tha"}
|
||||||
|
TURKISH = {"name": "Turkish", "iso639_1": "tr", "iso639_2": "tur"}
|
||||||
|
UKRAINIAN = {"name": "Ukrainian", "iso639_1": "uk", "iso639_2": "ukr"}
|
||||||
|
URDU = {"name": "Urdu", "iso639_1": "ur", "iso639_2": "urd"}
|
||||||
|
VIETNAMESE = {"name": "Vietnamese", "iso639_1": "vi", "iso639_2": "vie"}
|
||||||
|
WELSH = {"name": "Welsh", "iso639_1": "cy", "iso639_2": "wel"}
|
||||||
|
|
||||||
|
def find(name : str):
|
||||||
|
|
||||||
|
closestMatches = difflib.get_close_matches(name, [l.value["name"] for l in LanguageData], n=1)
|
||||||
|
|
||||||
|
if closestMatches:
|
||||||
|
foundLangs = [l for l in LanguageData if l.value['name'] == closestMatches[0]]
|
||||||
|
return foundLangs[0] if foundLangs else None
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
def get(lang : str):
|
||||||
|
|
||||||
|
selectedLangs = [l for l in LanguageData if l.value['iso639_2'] == lang]
|
||||||
|
|
||||||
|
if selectedLangs:
|
||||||
|
return selectedLangs[0]
|
||||||
|
else:
|
||||||
|
return None
|
||||||
2
bin/ffx/show.py
Normal file
2
bin/ffx/show.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
class Show():
|
||||||
|
pass
|
||||||
2
bin/ffx/show_controller.py
Normal file
2
bin/ffx/show_controller.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
class ShowController():
|
||||||
|
pass
|
||||||
56
bin/ffx/stream_descriptor.py
Normal file
56
bin/ffx/stream_descriptor.py
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
from language_data import LanguageData
|
||||||
|
from stream_type import StreamType
|
||||||
|
|
||||||
|
class StreamDescriptor():
|
||||||
|
|
||||||
|
def __init__(self,
|
||||||
|
streamType : StreamType,
|
||||||
|
language : LanguageData,
|
||||||
|
title : str,
|
||||||
|
codec : str,
|
||||||
|
subIndex : int = -1):
|
||||||
|
|
||||||
|
self.__streamType = streamType
|
||||||
|
self.__subIndex = subIndex
|
||||||
|
|
||||||
|
self.__streamLanguage = language
|
||||||
|
self.__streamTitle = title
|
||||||
|
|
||||||
|
self.__codecName = codec
|
||||||
|
|
||||||
|
# "index": 4,
|
||||||
|
# "codec_name": "hdmv_pgs_subtitle",
|
||||||
|
# "codec_long_name": "HDMV Presentation Graphic Stream subtitles",
|
||||||
|
# "codec_type": "subtitle",
|
||||||
|
# "codec_tag_string": "[0][0][0][0]",
|
||||||
|
# "codec_tag": "0x0000",
|
||||||
|
# "r_frame_rate": "0/0",
|
||||||
|
# "avg_frame_rate": "0/0",
|
||||||
|
# "time_base": "1/1000",
|
||||||
|
# "start_pts": 0,
|
||||||
|
# "start_time": "0.000000",
|
||||||
|
# "duration_ts": 1421035,
|
||||||
|
# "duration": "1421.035000",
|
||||||
|
# "disposition": {
|
||||||
|
# "default": 1,
|
||||||
|
# "dub": 0,
|
||||||
|
# "original": 0,
|
||||||
|
# "comment": 0,
|
||||||
|
# "lyrics": 0,
|
||||||
|
# "karaoke": 0,
|
||||||
|
# "forced": 0,
|
||||||
|
# "hearing_impaired": 0,
|
||||||
|
# "visual_impaired": 0,
|
||||||
|
# "clean_effects": 0,
|
||||||
|
# "attached_pic": 0,
|
||||||
|
# "timed_thumbnails": 0,
|
||||||
|
# "non_diegetic": 0,
|
||||||
|
# "captions": 0,
|
||||||
|
# "descriptions": 0,
|
||||||
|
# "metadata": 0,
|
||||||
|
# "dependent": 0,
|
||||||
|
# "still_image": 0
|
||||||
|
# },
|
||||||
|
# "tags": {
|
||||||
|
# "language": "ger",
|
||||||
|
# "title": "German Full"
|
||||||
6
bin/ffx/stream_type.py
Normal file
6
bin/ffx/stream_type.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
class StreamType(Enum):
|
||||||
|
VIDEO = 1
|
||||||
|
AUDIO = 2
|
||||||
|
SUBTITLE = 3
|
||||||
Reference in New Issue
Block a user