Skip to content

Error with [Win 7] #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonnyprogamer opened this issue Apr 20, 2024 · 32 comments
Closed

Error with [Win 7] #114

jonnyprogamer opened this issue Apr 20, 2024 · 32 comments

Comments

@jonnyprogamer
Copy link

Salve, sto provando ad avviare lo script dal source dato che dal runtime non si avvia per mancanza di DLL (il tool che è usato per impacchettare Python non supporta Win 7), ho già ffmpeg nel %PATH% di Windows e tutti i requisiti sono stati installati, ma mi escono fuori vari errori, ecco l'output:

image

Traceback (most recent call last):
  File "run.py", line 11, in <module>
    from Src.Api import (
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Api\__init__.py",
line 3, in <module>
    from .film import download_film
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Api\film.py", line
 10, in <module>
    from Src.Lib.FFmpeg.my_m3u8 import Downloader
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\__init_
_.py", line 3, in <module>
    from .util.installer import check_ffmpeg
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\util\__
init__.py", line 3, in <module>
    from .helper import (
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\util\he
lper.py", line 95, in <module>
    def format_duration(seconds: float) -> list[int, int, int]:
TypeError: 'type' object is not subscriptable

Da quel che vedo penso che sia perchè sto usando Python 3.8 invece di 3.11 o successivi (come richiesto dal Readme), ma l'ultima versione di Python che supporta Win 7 è la 3.8
Sarebbe possibile far girare questo script su Python 3.8 in modo che funzioni anche su Windows 7? Grazie! (volevo entrare sul discord per discutere del problema ma il link è scaduto)

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Ciao si potrebbe essere, se fai ffmpeg sul terminale esce qualcosa ? Prova per il momento la versione pre release sempre sulla 1.0 che forse funziona.https://discord.gg/zjfsD36JHD, lo so scade sempre nonostanze mette no expire. Versione compilata su win 11: https://github.com/Ghost6446/StreamingCommunity_api/releases/download/v1.0.0/StreamingCommunity_api_win.rar

@Arrowar Arrowar changed the title Compatibilità con Windows 7 Error with [Win 7] Apr 20, 2024
@jonnyprogamer
Copy link
Author

Si ffmpeg funziona, ora entro nel discord.

image

@jonnyprogamer
Copy link
Author

La versione di "pyinstaller" usata non funziona su Win 7:

image

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Se hai vs code apri C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\util\helper.py e guarda se vs code rivela errori, teoricamente dovrebbe essere in quel file il problema.

@jonnyprogamer
Copy link
Author

Si, ci sono alcuni errori, il primo sembra che i moduli console.py e config.py non vengano trovati dal helper.py, questo perchè siamo in una sub directory (VSCode dava questo errore: Import "Src.Util.console" could not be resolved), ed ho modificato in questo modo:
da:

from Src.Util.console import console
from Src.Util.config import config_manager

a:

from ....Util.config import config_manager
from ....Util.console import console

poi mi sembrava che la funzione "list" non è usata correttamente, VSCode dava questo errore: (Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified. Subscript for class "list" will generate runtime exception; enclose type annotation in quotes)

perciò l'ho modificata in questo modo:
da: def format_duration(seconds: float) -> list[int, int, int]:
a: def format_duration(seconds: float) -> List[int]:

e poi il return del valore:
da: return int(hours), int(minutes), int(seconds)
a: return [int(hours), int(minutes), int(seconds)]

ho importato da "typing" List e Dict, ed ho sistemato anche le altre righe nel file (che usavano list) che portavano lo stesso problema.

Non so nulla di Python quindi può darsi che quello che ho fatto sia completamente errato, ho solo seguito quello che mi diceva VSCode e la documentazione 😂

Comunque ora mi da un errore sul file "os.py":

Traceback (most recent call last):
  File "run.py", line 11, in <module>
    from Src.Api import (
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Api\__init__.py",
line 3, in <module>
    from .film import download_film
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Api\film.py", line
 10, in <module>
    from Src.Lib.FFmpeg.my_m3u8 import Downloader
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\__init_
_.py", line 3, in <module>
    from .util.installer import check_ffmpeg
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\util\__
init__.py", line 15, in <module>
    from .installer import check_ffmpeg
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Lib\FFmpeg\util\in
staller.py", line 16, in <module>
    from Src.Util.os import decompress_file
  File "C:\Users\jonnyprogamer\Desktop\Streaming Community Downloader\StreamingCommunity_api-main\Src\Util\os.py", line
226, in <module>
    def decode_bytes(bytes_data: bytes, encodings_to_try: list[str] = None) -> str:
TypeError: 'type' object is not subscriptable

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Ok che film o serie / ep stavi scaricando?

@jonnyprogamer
Copy link
Author

No non mi si avvia proprio il programma, ora provo a smanettare con il file "os.py"

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Certo prova a togliere tutti i :int :list ... e -> int, -> str per vedere se è quello che gli da problemi.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Stano che con python 3.8 dia così tanti problemi.

@jonnyprogamer
Copy link
Author

Nel modulo typing non esiste "l'Unpack" che viene richiesto da "my_request.py" 😢

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Nel modulo typing non esiste "l'Unpack" che viene richiesto da "my_request.py" 😢

Allora ho fatto delle prova con la version di pyton 3.7, o si rimuove tutti i tipi delle variabili, altrimenti non c'è modo di farlo partire. TI consiglio di scaricare il installare almeno una version >= 3.10. Prova a seguire questa guida per scaricare le versioni successive: https://github.com/adang1345/PythonWin7

@jonnyprogamer
Copy link
Author

Sto modificando il codice passo passo per togliere tutti gli errori, al momento sono arrivato finalmente a sistemare il file "useragent.py", non so perchè vi siete creati una libreria che fa richieste HTTP, la ho cambiata con quella standard di Python e sono riuscito a scaricare la lista di User Agent

@jonnyprogamer
Copy link
Author

In caso fallisco provo ad installare Python tramite quel metodo (sapevo che esisteva ma ho evitato di usarlo)

@jonnyprogamer
Copy link
Author

Il codice modificato di useragent.py:

import requests

def get_browser_user_agents_online(browser: str) -> List[str]:
    """
    Retrieve browser user agent strings from a website using Python requests library.

    Args:
        browser (str): The name of the browser (e.g., 'chrome', 'firefox', 'safari').
        proxies (dict, optional): Dictionary containing proxy settings (e.g., {'http': 'http://proxy.example.com:8080'}).

    Returns:
        List[str]: List of user agent strings for the specified browser.
    """
    url = f"https://useragentstring.com/pages/{browser}/"

    try:
        response = requests.get(url) 
        response.raise_for_status()

        html_content = response.text
        browser_user_agents = re.findall(r"<a href=\'/.*?>(.+?)</a>", html_content, re.UNICODE)
        filtered_user_agents = [ua for ua in browser_user_agents if "more" not in ua.lower()]

        if not filtered_user_agents:
            logging.warning(f"No valid user agents found for '{browser}'.")
        
        return filtered_user_agents
    
    except requests.RequestException as e:
        logging.error(f"Failed to fetch user agents for '{browser}': {str(e)}")
        return []

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Sto modificando il codice passo passo per togliere tutti gli errori, al momento sono arrivato finalmente a sistemare il file "useragent.py", non so perchè vi siete creati una libreria che fa richieste HTTP, la ho cambiata con quella standard di Python e sono riuscito a scaricare la lista di User Agent

Si si non c'è problema, ho provato a farne il più facile perché mi andava di fare ed è risultata anche un pelino più veloce su una media di richieste. Ora la sto testando per tutte le richieste rimuovendo requests ma uscirà nella prossima versione.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Sto modificando il codice passo passo per togliere tutti gli errori, al momento sono arrivato finalmente a sistemare il file "useragent.py", non so perchè vi siete creati una libreria che fa richieste HTTP, la ho cambiata con quella standard di Python e sono riuscito a scaricare la lista di User Agent

Si si non c'è problema, ho provato a farla perché mi andava di farla e capire come funzionava l'originale, ed è risultata anche un pelino più veloce su una media di richieste. Ora la sto testando per tutte le richieste rimuovendo requests completamente, ma uscirà nella prossima versione. Comunque il nome che gli ho dato è sempre requests così se non funziona più basta cancellare il file e gli import.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

In caso fallisco provo ad installare Python tramite quel metodo (sapevo che esisteva ma ho evitato di usarlo)

Hanno implementato delle funzioni nuove come è normale che sia, dimmi se ci riesci.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Il codice modificato di useragent.py:

import requests

def get_browser_user_agents_online(browser: str) -> List[str]:
    """
    Retrieve browser user agent strings from a website using Python requests library.

    Args:
        browser (str): The name of the browser (e.g., 'chrome', 'firefox', 'safari').
        proxies (dict, optional): Dictionary containing proxy settings (e.g., {'http': 'http://proxy.example.com:8080'}).

    Returns:
        List[str]: List of user agent strings for the specified browser.
    """
    url = f"https://useragentstring.com/pages/{browser}/"

    try:
        response = requests.get(url) 
        response.raise_for_status()

        html_content = response.text
        browser_user_agents = re.findall(r"<a href=\'/.*?>(.+?)</a>", html_content, re.UNICODE)
        filtered_user_agents = [ua for ua in browser_user_agents if "more" not in ua.lower()]

        if not filtered_user_agents:
            logging.warning(f"No valid user agents found for '{browser}'.")
        
        return filtered_user_agents
    
    except requests.RequestException as e:
        logging.error(f"Failed to fetch user agents for '{browser}': {str(e)}")
        return []

Basta che guardi le versioni vecchie, prima delle 1.0, il codice usa la libreria random_user_agent ma aveva qualche problema con pyinstaller, quindi mi sono fatto anche quella.

@jonnyprogamer
Copy link
Author

Ah capito, ora sono riuscito ad avviare il programma, mi chiede di installare Python 3.11 o successivo, provo a rimuovere il check e vedo che succede:

python run.py
Insert category (0: Film/Series, 1: Anime): [0/1] (0): 0
[19:39:16] Install python version > 3.11 run.py:59

@jonnyprogamer
Copy link
Author

image

C'è l'ho fatta a far partire il programma ahahaha, bastava rinchiudere le varie "list" e "tuple" in site.py con la single quote '
Probabilmente riesco a far girare anche la libreria personalizzata adesso 👍

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

image

C'è l'ho fatta a far partire il programma ahahaha, bastava rinchiudere le varie "list" e "tuple" in site.py con la single quote ' Probabilmente riesco a far girare anche la libreria personalizzata adesso 👍

Perfetto, questa è un'ottima notizia . 😁

@jonnyprogamer
Copy link
Author

Il download procede anche senza problemi, ora controllo anche se fa il join e poi in caso vedo se riesco a fare andare la libreria my_request, 👍

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Si dovrebbe andare tutto, se trovi problemi di stuttering ogni tanto è normale, sto finendo di scrivere un'altra libreria ma ci vorrà un po' di tempo.

@jonnyprogamer
Copy link
Author

Yes il download funziona perfettamente, In caso ti dico tutte le modifiche che ho fatto così puoi controllarle e inserirle per la prossima versione, ora provo a far andare la libreria 😂

@jonnyprogamer
Copy link
Author

Grazie per il supporto, in effetti il problema "grave" è solo "l''Unpack" in my_request.py, che non esiste in 3.8, ma credo di poterlo aggirare

@jonnyprogamer
Copy link
Author

jonnyprogamer commented Apr 20, 2024

Non sono capace di modificare la libreria HTTP quindi per ora la lascio stare, in ogni caso penso che quella sia l'unica cosa da modificare un pò per farla andare su Win 7, e forse utilizzare una versione più vecchia di pyinstaller, oltre a questo funziona tutto (l'ultima versione di ffmpeg gira ancora sul 7) nessun problema tanto fa le stesse cose di requests, ffmpeg si dovrebbero funzionare anche le versioni vecchie, forse se lo aggiorni, va un pelino più veloce.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Di niente, si unpack serve per avere quando chiami per esempio get tutti i metodi della classe reuqests, ma teoricamente dovrebbe esserci una soluzioni, per tutti gli altri avevi provato ad importarli da typing e sempre funzionare. Errore mio che quando ho fatti alcuni file invece di importarli da typing gli go usati normalmente, ma effettivamente c'era un motivo.

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Yes il download funziona perfettamente, In caso ti dico tutte le modifiche che ho fatto così puoi controllarle e inserirle per la prossima versione, ora provo a far andare la libreria 😂

Gentilissimo se riesci. 😀😀

@jonnyprogamer
Copy link
Author

Di niente, si unpack serve per avere quando chiami per esempio get tutti i metodi della classe reuqests, ma teoricamente dovrebbe esserci una soluzioni, per tutti gli altri avevi provato ad importarli da typing e sempre funzionare. Errore mio che quando ho fatti alcuni file invece di importarli da typing gli go usati normalmente, ma effettivamente c'era un motivo.

Si penso che in questa versione non si poteva fare, comunque ora ti elenco tutte le modifiche

Gentilissimo se riesci

Prego non c'è di che, siamo su GitHub alla fine, e pure giusto contribuire ogni tanto, anche con poca esperienza ahaha 😂

Inoltre ti consiglio di aggiungere un controllo se l'utente preme CTRL + C al run.py, tipo così:

       try:
            # If no arguments are provided, ask the user to input the category, if nothing insert return 0
            category = msg.ask("[cyan]Insert category [white]([red]0[white]: [bold magenta]Film/Series[white], [red]1[white]: [bold magenta]Anime[white])[white]:[/cyan]", choices={"0": "", "1": ""}, default="0")

            if category == '0':
                run_function(main_film_series, CLOSE_CONSOLE)

            elif category == '1':
                run_function(main_anime, CLOSE_CONSOLE)

            else:
                console.print("[red]Invalid category, you need to insert 0 or 1.")
                sys.exit(0)
        except KeyboardInterrupt:
            console.print("\n[cyan]Application interrupted by the user.")
            sys.exit(0)

In modo da non generare un errore in caso si termini l'app in quel modo

@Arrowar
Copy link
Owner

Arrowar commented Apr 20, 2024

Per risolvere unpack prova questa soluzione degli import: python/mypy#13981, si ctrl+c lo aggiungerò sicuramente.

@jonnyprogamer
Copy link
Author

jonnyprogamer commented Apr 20, 2024

Modifications to make the program run on Wndows 7:

1) run.py:

Edit, comment out or delete the Python version check:
Example:

if sys.version_info < (3, 8):
        console.log("Install python version >= 3.8.10")
        sys.exit(0)

2) StreamingCommunity_api-main\Src\Lib\FFmpeg\util\helper.py

Edit the import of local libraries to correctly link to them:
Change:

from Src.Util.console import console
from Src.Util.config import config_manager

To:

from ....Util.config import config_manager
from ....Util.console import console

Add -> from typing import List, Dict

Go to line 95, change: list[int, int, int] -> List[int]
Go to line 109, change: return int(hours), int(minutes), int(seconds) -> return [int(hours), int(minutes), int(seconds)]
Change: list[dict[str, str]] -> List[Dict[str, str]] for all the times you find it (should be 3)

3) StreamingCommunity_api-main\Src\Util\os.py

Go to line 228, this syntax is not supported in Python 3.8, we can use Optional[str] and List[str] to get around it.
Change:
def decode_bytes(bytes_data: bytes, encodings_to_try: list[str] = None) -> str:

To:
def decode_bytes(bytes_data: bytes, encodings_to_try: Optional[List[str]] = None) -> Optional[str]:

4) StreamingCommunity_api-main\Src\Lib\Request\user_agent.py

Here we will need to bypass the custom Request library and use Python built in one (for now at least)
We can do so by changing the code like this:

From:

# Internal utilities
from .my_requests import request

def get_browser_user_agents_online(browser: str) -> List[str]:
    """
    Retrieve browser user agent strings from a website.

    Args:
        browser (str): The name of the browser (e.g., 'chrome', 'firefox', 'safari').

    Returns:
        List[str]: List of user agent strings for the specified browser.
    """
    url = f"https://useragentstring.com/pages/{browser}/"

    try:

        # Make request and find all user agents
        html = request.get(url).text
        browser_user_agents = re.findall(r"<a href=\'/.*?>(.+?)</a>", html, re.UNICODE)
        return [ua for ua in browser_user_agents if "more" not in ua.lower()]
    
    except Exception as e:
        logging.error(f"Failed to fetch user agents for '{browser}': {str(e)}")
        return []

To:

import requests

# Internal utilities, bypassed by using standard Python requests lib
# from .my_requests import request

# Modified the functions to use Python built in "requests", compatible with Windows 7 without messing the custom implementation in "my_requests.py"
def get_browser_user_agents_online(browser: str) -> List[str]:
    """
    Retrieve browser user agent strings from a website using Python requests library.

    Args:
        browser (str): The name of the browser (e.g., 'chrome', 'firefox', 'safari').
        proxies (dict, optional): Dictionary containing proxy settings (e.g., {'http': 'http://proxy.example.com:8080'}).

    Returns:
        List[str]: List of user agent strings for the specified browser.
    """
    url = f"https://useragentstring.com/pages/{browser}/"

    try:
        response = requests.get(url) 
        response.raise_for_status()

        html_content = response.text
        browser_user_agents = re.findall(r"<a href=\'/.*?>(.+?)</a>", html_content, re.UNICODE)
        filtered_user_agents = [ua for ua in browser_user_agents if "more" not in ua.lower()]

        if not filtered_user_agents:
            logging.warning(f"No valid user agents found for '{browser}'.")
        
        return filtered_user_agents
    
    except requests.RequestException as e:
        logging.error(f"Failed to fetch user agents for '{browser}': {str(e)}")
        return []

5) StreamingCommunity_api-main\Src\Api\series.py

Add: from typing import List
Change: list[int]: -> List[int]:

6) StreamingCommunity_api-main\Src\Api\site.py

Add: from typing import Tuple
Change: tuple[str, str] -> Tuple[str, str]

7) Run Windows Updates in the target OS

The User must make sure that all the important updates (and up to the latest 2020 Cumulative updates) are installed to avoid TLS issues, this is because of Windows 7 not enforcing TLS 1.2 by default.
Having Windows Update fully working also ensures that the OS Trusted Certificates Store gets udpated regularly by Microsoft servers.
To make sure that TLS 1.2 is enabled, follow this procedure:

  1. Make sure you have updated Internet Explorer to the latest version (11)
  2. Go to Internet Options -> Advanced -> check "Use TLS 1.1" and "Use TLS 1.2"
    Screenshot:
    image
    image

NOTE: IF INTERNET EXPLORER IS NOT UPDATED, these Registry values won't take ANY effect, this also requires update "KB3140245"
Microsoft Knowledge Article: https://support.microsoft.com/kb/3140245

  1. After all the latest Windows Updates are installed, download and run (linked in KB3140245 article) -> https://download.microsoft.com/download/0/6/5/0658B1A7-6D2E-474F-BC2C-D69E5B9E9A68/MicrosoftEasyFix51044.msi
    image

Or, to do it manually, add these values by copying this and saving it as .reg file:

Windows Registry Editor Version 5.00

; Make all protocols available
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp\]
DefaultSecureProtocols=DWORD:0xAA0

; Make all protocols available
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp\]
DefaultSecureProtocols=DWORD:0xAA0

; TLS 1.1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
DisabledByDefault=DWORD:0
Enabled=dword:1

; TLS 1.2
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
DisabledByDefault=DWORD:0
Enabled=dword:1

They should be added automatically by some .Net framework update, but in case the OS doesn't have them added already, you can put them manually, this will also improve compatibility with a lot of new .Net apps

8) Packaging the App

To package the App we must use a compatible version of pyinstaller that works on Windows 7, according to: https://pypi.org/project/pyinstaller/ pyinstaller latest version should work in Windows 7, as stated by:

Windows (32bit/64bit/ARM64):
PyInstaller should work on Windows 7 or newer, but we only officially support Windows 8+.

However it clearly doesn't work, so maybe we can try using an older version, or opening an issue on their Repo.
EDIT: It may be because the project is targeting Python 3.11, i think that if you package it using Python 3.8 it will work

For now the solution would be to provide an unpackaged version of the App, and add a Batch script that just starts it, like this:
"Launch.bat"

@echo off
pushd %~dp0
python run.py

And maybe another script for installing the necessary requirements from requirements.txt
"InstallReqs.bat"

@echo off
pushd %~dp0
pip install -r requirements.txt

Extra

We can add this to "run.py" to set a fixed width and height for all Windows users (helps Win 7 as the CMD size isn't remembered, and the width can't be changed by much without touching the CMD properties)

# Automatically increase the width and height of the CMD window (Windows only)
cmd = 'mode 120,40'
os.system(cmd)

Arrowar added a commit that referenced this issue Apr 21, 2024
@Arrowar
Copy link
Owner

Arrowar commented Apr 21, 2024

Aggiunto tutto, ora dovrebbe andare anche la class my_request

@Arrowar Arrowar closed this as completed Apr 21, 2024
FrancescoGrazioso pushed a commit to FrancescoGrazioso/StreamingCommunity_api that referenced this issue May 3, 2024
Arrowar added a commit that referenced this issue Jun 20, 2024
* fix video download

* update version

* bug

* fix stuck 98%

* add auto update domain

* fix audio film

* solve 409

* check ffmpeg

* add update script

* add debug

* fix error 409

* fix no title

* fix s

* change headers

* fix audio sync

* fix version

* add download range

* Update run.py

Added an admin check, otherwise the script will always fail if launched by a normal user when attempting to add ffmpeg to the system path

* dont check all time admin

* add subtitle download

* update readme

* missing lib add

* fix m3u8 parser sub

* fix cant unpack

* fix subtitle download

* Migliorie per il codice (#45)

* Season range and all download

* fix if/elif

* fix if download all season

* Refactor user input handling in main function now you can choose more than one movie or tv

* Refactor file paths and create subdirectories for tv show now fill number season and episode to arrive to 2 characters

* Update console print message in tv.py

* update version

* Store domain in a JSON file (#46)

* Refactor domain function to store domain in a JSON file

* Revert "update version"

This reverts commit f866d9b.

* fix version

* fix msg

* Update data.json

* Update page.py (#47)

* fix auto domain

* Update vers

* fix error key and folder

* version

* fix dirname

* maybe fix

* fix quote tv

* Fix #38, #57, Implement Config file (#58)

* style: correct some user messages and typos

* feat(config file): implement configuration settings

* style(config): improve config variables readability

* style(config params): config conformity fix

* feat(config): add config feature to variables

* feat(config): add config feature examples to README.md

* style: uniformity

* fix(subtitles): add subtitles to corresponding folder

* fix(tv-series subtitles folder name)

* audio default + sub (#60)

* Improve readability and Conform PEP8 Style Guide (#63)

* style(PEP8): conform to PEP8 guide

* style(spell): spelling corrected

* Improve examples

* refact(audio_extractor): improves code readability refactoring audio_extractor_m3u8 function

* Conform to default example

* Add .idea

* Implementati sottotitoli forzati (#61)

* Implemented forced subs

* removed .idea folder

* Add .idea to .gitignore

* migliorata leggibilitá codice

* Fix no subtitles in film (#64)

* Windows Path Examples (#65)

* style(subtitle_name): unused variable

* Add Windows backslash example

* Add Windows backslash example

* Spell correction

* bypass mutex

* Skip episode in case of error (#69)

* style(readme): improve clarity (#70)

* Improve clarity

Chiarisce alcune differenze tra Windows e sistemi Unix, e altri minor changes

* Improve clarity

Chiarisce alcune differenze tra Windows e sistemi Unix, e altri minor changes

* Fix issue  #37

* remove token headers

* Add Discord Server (#73)

* fix update

* Fix #76 and #75

* Add domain to config #78

* add no stop script

* fix pyinstaller

* fix bug #86 (#86)

Co-authored-by: Helper0x <Helper0x@users.noreply.github.com>

* fix ubuntu bug

* Update README.md

* Un giorno ...

* Un errore...

* Fix latin title

* del file_list.txt

* Fix range for options * in series

* Change Crypto to: pycryptodome

* add unicode, and start clean memory

* Fix unidecode

* del

* Create LICENSE

* Update discord link

* Improve organization

* Fix tmp file user agent  for linux and mac

* Fix stuttering #95 and auto install of ffmpeg.

* Fix tmp for mac (#97)

* try fix stuttering

* try fix stuttering 2

* Fix variable

* Added map for episode names (#98)

* Added map for episode names

* Fix

* Add config.ini, backup path (#99)

* Added option to merge subtitles into one mp4 file or separate into .vtt files (#100)

* Fix sys.exit with raise

* create dockerization for the script (#105)

* add dockerfile and change base domain to current one

* add ffmpeg to dockerfile and edit README

* add instructions to save media locally

* fix typo

* add dependencies to dockerfile

* fix dependencies

* add ability to switch between anime and film on run without changing config

* add dependencies to dockerfile

* add argparse

* fix readme

* fix args description

* Fix tmp dir for mac in user agent

* Fix run and update discord link

* Fix domain not update

* fix m3u8 parser no resolution find

* Add lib unidecode, fix key not exist in codec

* Fix anime cant find eng title

* Fix resolution

* Update parser.py (#111)

* Fix range anime info episode

* No expire discord link.

* Added compatibility for Win 7 #114

* Fix range season

* Update domain (#118)

* Fix options tables

* Try to fix stuttering (ep_3)

* Remove use of lxml

* Add light and strong search domain @inklook

* Fix url with space

* Fix url 2 ( ?? )

* Add note for mac

* fix first episode not downloaded and last downloaded twice in anime series (#123)

* Fix library: my_requests

* Remove exceptation req

* Fix os "...". directory in series name path

* Update README.md

* Update series.py (#124)

* Update anime.py (#125)

* Fix requests for mac

* Update config for only 4 threads.

* Update config.json

* Fix error 401 and invalid character

* fix ascii character

* Atto secondo ...

* Update README.md

* Fix index season map episode for series

* Add download speed

* Delete Src/Lib/Hls/M3U8 directory

* Add altadefinizione

* Update README.md

* Add api costant

* Update requirements.txt

* Add ffmpeg controll

* Minor fixes (#133)

* Fix docker progress bar ffmpeg

* Fix github counter

* Update reame and config file.

* Update README.md

* Add small bar, summary system, fix ffmpeg multiple audios and subtitles.

* Update readme

* Update config.json

* Add other special char, update readme with temux

* Update config.json

* Se la lista dei sottotitoli è vuota vengono scaricati tutti + aggiunta possibilità di non mergiare i sottotitoli (#135)

* Fix small bar with join ffmpeg.

* Feat/app api and frontend (#136)

* minor fixes

* created basic django app

* add django dependency

* created basic search endpoint

* created retrieve method for search

* remove retrieve

* start implementing download endpoint (only movie for now)

* start implementing episode info for series

* finished get_episodes_info

* minor fixes

* add download anime episode

* start implementing download for tv series

* refactor methods

* finished download endpoint (will implement possibility to download single episodes of season in tv series)

* new domain and black on project

* start

* add cors

* add start gui command

* add gui for search

* edited .gitignore

* create component for media details

* better UX/UI

* edited anime episode to stream response (better experience)

* implemented UI for media details (TODO add download capabilities)

* fix poster fetching

* minor fixes

* fix cors error

* start implementing download

* fix typing on anime movies

* refactor

* refactor + add download OVA

* add plot for all anime types

* add download for all anime episodes

* add download all tv series episodes

* fix crach if localStorage is undefined

* moved download logic in separeted file

* fix wrong index passed while downloading tv series

* fix style searchbar

* add loader to search button and add enter listener while searching

* remove dependency from loading episodes to download all in anime series

* add function to download selected episodes for anime

* add sh command to kill gui

* fix messages in kill_gui.sh

* start implementing download select episodes for tv series (to be tested) + run black and eslint

* start  refactoring  to version 2.0

* start implementing preview endpoint

* Restore ...

* Fix shorter video and small bar, remove ctrl+c.

* Add function get server ip.

* Add force 1080p.

* Fix double logger.

* Finalmente fix per file con duratta errata.

* Remove stop_event

* Rename repo.

* Only 4 workers.

* Auto switch proxy.

* Duplicate ip

* Update library and remove my request and user agent.

* Remove ip

* Remove static ip, introduce proxy.

* Finish proxy addition.

* Add other proxy option

* Fix error proxy 1

* Fix speed download

* Fix struck at 100%

* add start delay

* Update validate proxy.

* Update config ...

* Add ddlstreamitaly ...

* Add guardaserie ...

* Migrate to httpx (#143)

* Restore ...

* Update README.me

* Fix missing nodejs in Docker + utility (#147)

* Added Makefile and nodejs to docker

* Update README.md, added makefile description

* Clarification on mounting config.json

* Update config.json

* Test httpx (#149)

* Migrate to httpx

* Revert "Migrate to httpx"

This reverts commit fdd2823.

* Migrate httpx

* minor fixes (#146)

* Update headers

* Update config

* 1v. Add retry

* v1 Finish Guardaserie

* Need to fix client.

* Remove retry

* v2 Add comment guardaserie.

* Add domain ...

* Finish add ddl ...

* Fix use of proxy.

* Fix cookie error.

* Update cookie.

* Dynamic import.

---------

Co-authored-by: Francesco Grazioso <40018163+FrancescoGrazioso@users.noreply.github.com>

* Update version.py

* Remove retry.

* Restore ..

* Better costnat for api.

* Real upload.py

* Fix update with httpx.

* Add real internet speed.

* Add httpx simple retry.

* Better costant with os.

* Fix domain site api.

* remove ...

* Fix github error ...

* Delete Src/Api

* Restore ...

* DDL increase timeout.

* Fix uppload.

* Add loiggin load module.

* Remove audo domain update sc e au.

* Restore github ...

* Update openssl check.

* Fix upload not working.

* Add new auto find new domain.

* Dinamic get_select_title().

* Dinamic manage_selection() and map_episode_title()

---------

Co-authored-by: Ghost <62809003+Ghost6446@users.noreply.github.com>
Co-authored-by: Helper0x <158275011+Helper0x@users.noreply.github.com>
Co-authored-by: daboynb <106079917+daboynb@users.noreply.github.com>
Co-authored-by: Fede14it <115009551+Fede14it@users.noreply.github.com>
Co-authored-by: KastroMugnaio <65294975+KastroMugnaio@users.noreply.github.com>
Co-authored-by: Cohvir <63691557+Cohvir@users.noreply.github.com>
Co-authored-by: Helper0x <Helper0x@users.noreply.github.com>
Co-authored-by: Francesco Grazioso <40018163+FrancescoGrazioso@users.noreply.github.com>
Co-authored-by: Fline <45824466+Flxne@users.noreply.github.com>
Co-authored-by: Emanuele C <korra88@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants