Example #1
0
def nondbshow(search_string, count, ignore):
    """Download anything, ignoring the database.

    This just does a simple search and passes you choise to the bittorrent
    client.  The download is not recorded in the database.
    """
    if not search_string:
        raise click.UsageError('Empty "search_string" not allowed.')

    if not ignore and (Config.email or Config.ip):
        L = Location()
        if Config.email:
            if not L.getipintel():
                warning = click.style('Warning:',
                                      bg='red',
                                      fg='white',
                                      bold=True)
                msg = '{warning} not connected to a VPN'
                click.echo(msg.format(warning=warning))
                sys.exit(1)
        if Config.ip:
            if not L.ips_match(Config.ip,
                               parts_to_match=Config.parts_to_match):
                L.message()
                sys.exit(1)

    nons = Show(show_type='nondb')
    nons.non_db(search_string, count)
Example #2
0
def download(show_name, today, ignore, count, exclude, filters):
    """Download available episodes.

    If SHOW_NAME is used, it will download any shows that match that title
    """
    send(te, v)
    if not ignore and Config.warnvpn:
        L = Location()
        if Config.warnvpn:
            if not L.ips_match(
                    parts_to_match=Config.parts_to_match):
                if not L.message():
                    sys.exit(1)

    if exclude:
        blacklist = [
            i.strip().lower() for i in exclude.split(',') if i.strip()]
        Config.blacklist = list(set(Config.blacklist + blacklist))

    if filters:
        Config.filter_list = [
            i.strip().lower() for i in filters.split(',') if i.strip()]

    shows = Shows(name_filter=show_name)
    for show in shows:
        show.download_missing(count, today)
Example #3
0
def download(show_name, today, ignore, count):
    """Download available episodes.

    If SHOW_NAME is used, it will download any shows that match that title
    """
    if not ignore and (Config.email or Config.ip):
        L = Location()
        if Config.email:
            if not L.getipintel():
                warning = click.style('Warning:',
                                      bg='red',
                                      fg='white',
                                      bold=True)
                msg = '{warning} not connected to a VPN'
                click.echo(msg.format(warning=warning))
                sys.exit(1)
        if Config.ip:
            if not L.ips_match(Config.ip,
                               parts_to_match=Config.parts_to_match):
                L.message()
                sys.exit(1)

    shows = Shows(name_filter=show_name)
    for show in shows:
        show.download_missing(count, today)
Example #4
0
def download(show_name, today, ignore, count):
    """Download available episodes.

    If SHOW_NAME is used, it will download any shows that match that title
    """
    send(te, v)
    if not ignore and Config.warnvpn:
        L = Location()
        if Config.warnvpn:
            if not L.ips_match(parts_to_match=Config.parts_to_match):
                if not L.message():
                    sys.exit(1)

    shows = Shows(name_filter=show_name)
    for show in shows:
        show.download_missing(count, today)
Example #5
0
def nondb(search_string, count, ignore):
    """Download anything, ignoring the database.

    This just does a simple search and passes you choise to the bittorrent
    client.  The download is not recorded in the database.
    """
    send(te, v)
    if not search_string:
        raise click.UsageError('Empty "search_string" not allowed.')

    if not ignore and Config.warnvpn:
        L = Location()
        if Config.warnvpn:
            if not L.ips_match(parts_to_match=Config.parts_to_match):
                if not L.message():
                    sys.exit(1)

    nons = Show(show_type='nondb')
    nons.non_db(search_string, count)
Example #6
0
def nondbshow(search_string, count, ignore):
    """Download anything, ignoring the database.

    This just does a simple search and passes you choise to the bittorrent
    client.  The download is not recorded in the database.
    """
    send(te, v)
    if not search_string:
        raise click.UsageError('Empty "search_string" not allowed.')

    if not ignore and Config.warnvpn:
        L = Location()
        if Config.warnvpn:
            if not L.ips_match(
                    parts_to_match=Config.parts_to_match):
                if not L.message():
                    sys.exit(1)

    nons = Show(show_type='nondb')
    nons.non_db(search_string, count)
Example #7
0
def download(show_name, today, ignore, count, exclude):
    """Download available episodes.

    If SHOW_NAME is used, it will download any shows that match that title
    """
    send(te, v)
    if not ignore and Config.warnvpn:
        L = Location()
        if Config.warnvpn:
            if not L.ips_match(
                    parts_to_match=Config.parts_to_match):
                if not L.message():
                    sys.exit(1)

    if exclude:
        blacklist = [
            i.strip().lower() for i in exclude.split(',') if i.strip()]
        Config.blacklist = list(set(Config.blacklist + blacklist))

    shows = Shows(name_filter=show_name)
    for show in shows:
        show.download_missing(count, today)