Update reame and config file.

This commit is contained in:
Ghost 2024-05-27 18:57:40 +02:00
parent ae0b5bb577
commit 80393c6147
8 changed files with 77 additions and 30 deletions

View File

@ -56,15 +56,37 @@ You can change some behaviors by tweaking the configuration file.
<details>
<summary><strong>DEFAULT</strong></summary>
* **debug**: Enables or disables debug mode.
- **Default Value**: `false`
* **log_file**: The file where logs will be written.
- **Default Value**: `app.log`
* **clean_console**: Clears the console before the script runs.
- **Default Value**: `true`
* **root_path**: Path where the script will add movies and TV series folders (see [Path Examples](#Path-examples)).
- **Default Value**: `media/streamingcommunity`
- **Default Value**: `Video`
* **map_episode_name**: Mapping to choose the name of all episodes of TV Shows (see [Episode Name Usage](#Episode-name-usage)).
- **Default Value**: `%(tv_name)_S%(season)E%(episode)_%(episode_name)`
* **not_close**: When activated, prevents the script from closing after its initial execution, allowing it to restart automatically after completing the first run.
- **Default Value**: `false`
* **map_episode_name**: Mapping to choose the name of all episodes of TV Shows (see [Episode Name Usage](#Episode-name-usage)).
- **Default Value**: `%(episode_name)`
- **Example Value**: `%(tv_name) [S%(season)] [E%(episode)] %(episode_name)`
</details>
<details>
<summary><strong>SITE</strong></summary>
* **streamingcommunity**: Configuration value for streamingcommunity site.
- **Default Value**: `foo`
* **animeunity**: Configuration value for animeunity site.
- **Default Value**: `to`
* **altadefinizione**: Configuration value for altadefinizione site.
- **Default Value**: `food`
</details>
@ -72,7 +94,7 @@ You can change some behaviors by tweaking the configuration file.
<summary><strong>M3U8_DOWNLOAD</strong></summary>
* **tdqm_workers**: The number of workers that will cooperate to download .ts files. **A high value may slow down your PC**
- **Default Value**: `20`
- **Default Value**: `30`
* **tqdm_show_progress**: Whether to show progress during downloads or not.
- **Default Value**: `true`
@ -85,15 +107,53 @@ You can change some behaviors by tweaking the configuration file.
<details>
<summary><strong>M3U8_FILTER</strong></summary>
* **use_codec**: Whether to use a specific codec for processing.
- **Default Value**: `false`
* **use_gpu**: Whether to use GPU acceleration.
- **Default Value**: `false`
* **default_preset**: The default preset for ffmpeg conversion.
- **Default Value**: `ultrafast`
* **check_output_conversion**: Verify if the conversion run by ffmpeg is free from corruption.
- **Default Value**: `false`
* **cleanup_tmp_folder**: Upon final conversion, ensures the removal of all unformatted audio, video tracks, and subtitles from the temporary folder, thereby maintaining cleanliness and efficiency.
- **Default Value**: `true`
* **specific_list_audio**: A list of specific audio languages to download.
- **Example Value**: `['ara', 'baq', 'cat', 'chi', 'cze', 'dan', 'dut', 'eng', 'fil', 'fin', 'forced-ita', 'fre', 'ger', 'glg', 'gre', 'heb', 'hin', 'hun', 'ind', 'ita', 'jpn', 'kan', 'kor', 'mal', 'may', 'nob', 'nor', 'pol', 'por', 'rum', 'rus', 'spa', 'swe', 'tam', 'tel', 'tha', 'tur', 'ukr', 'vie']`
* **check_output_conversion**: Verify if the conversion run by ffmpeg is free from corruption.
* **specific_list_subtitles**: A list of specific subtitle languages to download.
- **Example Value**: `['eng']`
</details>
<details>
<summary><strong>M3U8_REQUESTS</strong></summary>
* **disable_error**: Whether to disable error messages.
- **Default Value**: `false`
* **timeout**: The timeout value for requests.
- **Default Value**: `10`
* **verify_ssl**: Whether to verify SSL certificates.
- **Default Value**: `false`
</details>
<details>
<summary><strong>M3U8_PARSER</strong></summary>
* **skip_empty_row_playlist**: Whether to skip empty rows in the playlist m3u8.
- **Default Value**: `false`
* **force_resolution**: Forces the use of a specific resolution. `-1` means no forced resolution.
- **Default Value**: `-1`
- **Example Value**: `1080`
</details>

View File

@ -34,5 +34,3 @@ def main_film():
url=select_title.url
)
# End
console.print("\n[red]Done")

View File

@ -53,6 +53,3 @@ def main_film_series():
# If no media find
else:
console.print("[red]Cant find a single element")
# End
console.print("\n[red]Done")

View File

@ -1,5 +1,4 @@
# 20.05.24
from .sql_table import SimpleDBManager, report_table, job_database
from .sql_table import SimpleDBManager, report_table
report_table: SimpleDBManager = report_table
job_database: SimpleDBManager = job_database

View File

@ -10,7 +10,6 @@ from Src.Util._jsonConfig import config_manager
# Variable
CREATE_REPORT = config_manager.get_bool('M3U8_DOWNLOAD', 'create_report')
CREATE_JOB_DB = config_manager.get_bool('DEFAULT', 'create_job_database')
class SimpleDBManager:
@ -210,12 +209,4 @@ if CREATE_REPORT:
report_table.load_database()
report_table.save_database()
else:
report_table = None
if CREATE_JOB_DB:
job_database = SimpleDBManager("Job_database.csv", ["Id", "Name", "Season_n"])
job_database.load_database()
job_database.save_database()
else:
job_database = None
report_table = None

View File

@ -460,9 +460,11 @@ class Downloader():
# Rename the output file to the desired output filename if not exist
if not os.path.exists(self.output_filename):
# Rename file converted to original set in init
os.rename(out_path, self.output_filename)
print("\n")
# Print size of the file
console.print(Panel(f"[bold green]Download completed![/bold green]\nFile size: [bold]{format_size(os.path.getsize(self.output_filename))}[/bold]", title=f"{os.path.basename(self.output_filename.replace('.mp4', ''))}", border_style="green"))
# Delete all files except the output file

View File

@ -302,6 +302,7 @@ class M3U8_Segments:
ascii=' #',
bar_format=f"{Colors.YELLOW}Downloading {Colors.WHITE}({add_desc}{Colors.WHITE}): {Colors.RED}{{percentage:.2f}}% {Colors.MAGENTA}{{bar}} {Colors.YELLOW}{{elapsed}} {Colors.WHITE}< {Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]",
dynamic_ncols=True,
ncols=80,
mininterval=0.01
)

View File

@ -7,14 +7,8 @@
"clean_console": true,
"root_path": "Video",
"map_episode_name": "%(tv_name)_S%(season)E%(episode)_%(episode_name)",
"create_job_database": false,
"not_close": false
},
"SITE": {
"streamingcommunity": "foo",
"animeunity": "to",
"altadefinizione": "food"
},
"M3U8_DOWNLOAD": {
"tdqm_workers": 30,
"tqdm_show_progress": true,
@ -39,5 +33,10 @@
"M3U8_PARSER": {
"skip_empty_row_playlist": false,
"force_resolution": -1
},
"SITE": {
"streamingcommunity": "foo",
"animeunity": "to",
"altadefinizione": "food"
}
}