mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 03:55:24 +00:00
Update reame and config file.
This commit is contained in:
parent
ae0b5bb577
commit
80393c6147
72
README.md
72
README.md
@ -56,15 +56,37 @@ You can change some behaviors by tweaking the configuration file.
|
|||||||
<details>
|
<details>
|
||||||
<summary><strong>DEFAULT</strong></summary>
|
<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)).
|
* **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.
|
* **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`
|
- **Default Value**: `false`
|
||||||
|
|
||||||
* **map_episode_name**: Mapping to choose the name of all episodes of TV Shows (see [Episode Name Usage](#Episode-name-usage)).
|
</details>
|
||||||
- **Default Value**: `%(episode_name)`
|
|
||||||
- **Example Value**: `%(tv_name) [S%(season)] [E%(episode)] %(episode_name)`
|
<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>
|
</details>
|
||||||
|
|
||||||
@ -72,7 +94,7 @@ You can change some behaviors by tweaking the configuration file.
|
|||||||
<summary><strong>M3U8_DOWNLOAD</strong></summary>
|
<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**
|
* **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.
|
* **tqdm_show_progress**: Whether to show progress during downloads or not.
|
||||||
- **Default Value**: `true`
|
- **Default Value**: `true`
|
||||||
@ -85,15 +107,53 @@ You can change some behaviors by tweaking the configuration file.
|
|||||||
<details>
|
<details>
|
||||||
<summary><strong>M3U8_FILTER</strong></summary>
|
<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.
|
* **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`
|
- **Default Value**: `true`
|
||||||
|
|
||||||
* **specific_list_audio**: A list of specific audio languages to download.
|
* **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']`
|
- **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`
|
- **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>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,5 +34,3 @@ def main_film():
|
|||||||
url=select_title.url
|
url=select_title.url
|
||||||
)
|
)
|
||||||
|
|
||||||
# End
|
|
||||||
console.print("\n[red]Done")
|
|
||||||
|
@ -53,6 +53,3 @@ def main_film_series():
|
|||||||
# If no media find
|
# If no media find
|
||||||
else:
|
else:
|
||||||
console.print("[red]Cant find a single element")
|
console.print("[red]Cant find a single element")
|
||||||
|
|
||||||
# End
|
|
||||||
console.print("\n[red]Done")
|
|
@ -1,5 +1,4 @@
|
|||||||
# 20.05.24
|
# 20.05.24
|
||||||
|
|
||||||
from .sql_table import SimpleDBManager, report_table, job_database
|
from .sql_table import SimpleDBManager, report_table
|
||||||
report_table: SimpleDBManager = report_table
|
report_table: SimpleDBManager = report_table
|
||||||
job_database: SimpleDBManager = job_database
|
|
||||||
|
@ -10,7 +10,6 @@ from Src.Util._jsonConfig import config_manager
|
|||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
CREATE_REPORT = config_manager.get_bool('M3U8_DOWNLOAD', 'create_report')
|
CREATE_REPORT = config_manager.get_bool('M3U8_DOWNLOAD', 'create_report')
|
||||||
CREATE_JOB_DB = config_manager.get_bool('DEFAULT', 'create_job_database')
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleDBManager:
|
class SimpleDBManager:
|
||||||
@ -210,12 +209,4 @@ if CREATE_REPORT:
|
|||||||
report_table.load_database()
|
report_table.load_database()
|
||||||
report_table.save_database()
|
report_table.save_database()
|
||||||
else:
|
else:
|
||||||
report_table = None
|
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
|
|
@ -460,9 +460,11 @@ class Downloader():
|
|||||||
|
|
||||||
# Rename the output file to the desired output filename if not exist
|
# Rename the output file to the desired output filename if not exist
|
||||||
if not os.path.exists(self.output_filename):
|
if not os.path.exists(self.output_filename):
|
||||||
|
|
||||||
|
# Rename file converted to original set in init
|
||||||
os.rename(out_path, self.output_filename)
|
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"))
|
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
|
# Delete all files except the output file
|
||||||
|
@ -302,6 +302,7 @@ class M3U8_Segments:
|
|||||||
ascii=' #',
|
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}]",
|
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,
|
dynamic_ncols=True,
|
||||||
|
ncols=80,
|
||||||
mininterval=0.01
|
mininterval=0.01
|
||||||
)
|
)
|
||||||
|
|
||||||
|
11
config.json
11
config.json
@ -7,14 +7,8 @@
|
|||||||
"clean_console": true,
|
"clean_console": true,
|
||||||
"root_path": "Video",
|
"root_path": "Video",
|
||||||
"map_episode_name": "%(tv_name)_S%(season)E%(episode)_%(episode_name)",
|
"map_episode_name": "%(tv_name)_S%(season)E%(episode)_%(episode_name)",
|
||||||
"create_job_database": false,
|
|
||||||
"not_close": false
|
"not_close": false
|
||||||
},
|
},
|
||||||
"SITE": {
|
|
||||||
"streamingcommunity": "foo",
|
|
||||||
"animeunity": "to",
|
|
||||||
"altadefinizione": "food"
|
|
||||||
},
|
|
||||||
"M3U8_DOWNLOAD": {
|
"M3U8_DOWNLOAD": {
|
||||||
"tdqm_workers": 30,
|
"tdqm_workers": 30,
|
||||||
"tqdm_show_progress": true,
|
"tqdm_show_progress": true,
|
||||||
@ -39,5 +33,10 @@
|
|||||||
"M3U8_PARSER": {
|
"M3U8_PARSER": {
|
||||||
"skip_empty_row_playlist": false,
|
"skip_empty_row_playlist": false,
|
||||||
"force_resolution": -1
|
"force_resolution": -1
|
||||||
|
},
|
||||||
|
"SITE": {
|
||||||
|
"streamingcommunity": "foo",
|
||||||
|
"animeunity": "to",
|
||||||
|
"altadefinizione": "food"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user