22 lines
543 B
Python
22 lines
543 B
Python
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass
|
|
class StreamDesc:
|
|
stream_no: int
|
|
stream_lang: str
|
|
stream_type: str
|
|
stream_input_no: int
|
|
|
|
def __init__(self, stream_line, s_type, i_stream_in):
|
|
out = stream_line.split("|")
|
|
self.stream_no = int(out[0])
|
|
if "en" == out[1]:
|
|
self.stream_lang = "eng"
|
|
elif "de" == out[1]:
|
|
self.stream_lang = "ger"
|
|
else:
|
|
self.stream_lang = out[1]
|
|
self.stream_type = s_type
|
|
self.stream_input_no = i_stream_in
|