Skip to content
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

Ignore gifted sub drops stream watching #630

Open
AdamSaketume26 opened this issue Dec 12, 2024 · 0 comments
Open

Ignore gifted sub drops stream watching #630

AdamSaketume26 opened this issue Dec 12, 2024 · 0 comments

Comments

@AdamSaketume26
Copy link

Is your feature request related to a problem?

If you use Priority.DROPS it will get stuck watching stream with drop with reward for gifting subs

Proposed solution

Twitch miner should ignore drops that require gifting a sub since its not possible with twitch miner. If data.user.dropCampaign.timeBasedDrops[0].requiredSubs > 0 that means the drop requires gifting a sub to earn the drop so skip watching the stream for it

Alternatives you've considered

No response

Additional context

here is the DropCampaignDetails response object

from uuid import UUID
from typing import Union, List, Any
from datetime import datetime


class Allow:
    channels: None
    is_enabled: bool
    typename: str

    def __init__(self, channels: None, is_enabled: bool, typename: str) -> None:
        self.channels = channels
        self.is_enabled = is_enabled
        self.typename = typename


class Self:
    is_account_connected: bool
    typename: str

    def __init__(self, is_account_connected: bool, typename: str) -> None:
        self.is_account_connected = is_account_connected
        self.typename = typename


class Game:
    id: int
    slug: str
    display_name: str
    typename: str

    def __init__(self, id: int, slug: str, display_name: str, typename: str) -> None:
        self.id = id
        self.slug = slug
        self.display_name = display_name
        self.typename = typename


class Owner:
    id: Union[UUID, int]
    name: str
    typename: str

    def __init__(self, id: Union[UUID, int], name: str, typename: str) -> None:
        self.id = id
        self.name = name
        self.typename = typename


class Benefit:
    id: str
    created_at: datetime
    entitlement_limit: int
    game: Owner
    image_asset_url: str
    is_ios_available: bool
    name: str
    owner_organization: Owner
    distribution_type: str
    typename: str

    def __init__(self, id: str, created_at: datetime, entitlement_limit: int, game: Owner, image_asset_url: str, is_ios_available: bool, name: str, owner_organization: Owner, distribution_type: str, typename: str) -> None:
        self.id = id
        self.created_at = created_at
        self.entitlement_limit = entitlement_limit
        self.game = game
        self.image_asset_url = image_asset_url
        self.is_ios_available = is_ios_available
        self.name = name
        self.owner_organization = owner_organization
        self.distribution_type = distribution_type
        self.typename = typename


class BenefitEdge:
    benefit: Benefit
    entitlement_limit: int
    typename: str

    def __init__(self, benefit: Benefit, entitlement_limit: int, typename: str) -> None:
        self.benefit = benefit
        self.entitlement_limit = entitlement_limit
        self.typename = typename


class TimeBasedDrop:
    id: UUID
    required_subs: int
    benefit_edges: List[BenefitEdge]
    end_at: datetime
    name: str
    precondition_drops: None
    required_minutes_watched: int
    start_at: datetime
    typename: str

    def __init__(self, id: UUID, required_subs: int, benefit_edges: List[BenefitEdge], end_at: datetime, name: str, precondition_drops: None, required_minutes_watched: int, start_at: datetime, typename: str) -> None:
        self.id = id
        self.required_subs = required_subs
        self.benefit_edges = benefit_edges
        self.end_at = end_at
        self.name = name
        self.precondition_drops = precondition_drops
        self.required_minutes_watched = required_minutes_watched
        self.start_at = start_at
        self.typename = typename


class DropCampaign:
    id: UUID
    drop_campaign_self: Self
    allow: Allow
    account_link_url: str
    description: str
    details_url: str
    end_at: datetime
    event_based_drops: List[Any]
    game: Game
    image_url: str
    name: str
    owner: Owner
    start_at: datetime
    status: str
    time_based_drops: List[TimeBasedDrop]
    typename: str

    def __init__(self, id: UUID, drop_campaign_self: Self, allow: Allow, account_link_url: str, description: str, details_url: str, end_at: datetime, event_based_drops: List[Any], game: Game, image_url: str, name: str, owner: Owner, start_at: datetime, status: str, time_based_drops: List[TimeBasedDrop], typename: str) -> None:
        self.id = id
        self.drop_campaign_self = drop_campaign_self
        self.allow = allow
        self.account_link_url = account_link_url
        self.description = description
        self.details_url = details_url
        self.end_at = end_at
        self.event_based_drops = event_based_drops
        self.game = game
        self.image_url = image_url
        self.name = name
        self.owner = owner
        self.start_at = start_at
        self.status = status
        self.time_based_drops = time_based_drops
        self.typename = typename


class User:
    id: int
    drop_campaign: DropCampaign
    typename: str

    def __init__(self, id: int, drop_campaign: DropCampaign, typename: str) -> None:
        self.id = id
        self.drop_campaign = drop_campaign
        self.typename = typename


class Data:
    user: User

    def __init__(self, user: User) -> None:
        self.user = user


class Extensions:
    duration_milliseconds: int
    operation_name: str
    request_id: str

    def __init__(self, duration_milliseconds: int, operation_name: str, request_id: str) -> None:
        self.duration_milliseconds = duration_milliseconds
        self.operation_name = operation_name
        self.request_id = request_id


class WelcomeElement:
    data: Data
    extensions: Extensions

    def __init__(self, data: Data, extensions: Extensions) -> None:
        self.data = data
        self.extensions = extensions
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

1 participant