Merge branch 'master' of https://fsdfsd.net/rDrama/rDrama
|
@ -1,9 +1,27 @@
|
|||
.orgy-top-container {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
@media all and (max-width: 900px) {
|
||||
.orgy-top-container {
|
||||
flex-flow: column wrap;
|
||||
}
|
||||
.orgy-info-window-item {
|
||||
max-height: 20% !important;
|
||||
height: 20% !important;
|
||||
}
|
||||
.orgy-chat-window-item {
|
||||
max-height: 80% !important;
|
||||
height: 80% !important;
|
||||
}
|
||||
}
|
||||
@media all and (min-width: 900px) {
|
||||
.orgy-top-container {
|
||||
flex-flow: row nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.orgy-chat-window-item {
|
||||
flex-grow: 2;
|
||||
width: fit-content;
|
||||
|
@ -12,3 +30,8 @@
|
|||
max-width: 550px;
|
||||
width: 550px;
|
||||
}
|
||||
.rumble-player {
|
||||
aspect-ratio: 16/9;
|
||||
max-width: min(70vw,500px) !important;
|
||||
width: 500px;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 139 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 159 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 48 KiB |
|
@ -15,29 +15,52 @@ from files.helpers.config.const import *
|
|||
from files.helpers.lazy import lazy
|
||||
from files.helpers.regex import *
|
||||
from files.helpers.sorting_and_time import *
|
||||
from files.helpers.sanitize import normalize_url, get_youtube_id_and_t
|
||||
|
||||
class Orgy(Base):
|
||||
__tablename__ = "orgies"
|
||||
|
||||
youtube_id = Column(String, primary_key=True)
|
||||
id = Column(Integer, primary_key = True)
|
||||
type = Column(Integer, primary_key = True)
|
||||
data = Column(String)
|
||||
title = Column(String)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def is_youtube(self):
|
||||
return self.type == OrgyTypes.YOUTUBE
|
||||
def is_rumble(self):
|
||||
return self.type == OrgyTypes.RUMBLE
|
||||
def is_twitch(self):
|
||||
return self.type == OrgyTypes.TWITCH
|
||||
|
||||
def __repr__(self):
|
||||
return f"<{self.__class__.__name__}(id={self.youtube_id}, title={self.title})>"
|
||||
return f"<{self.__class__.__name__}(id={self.id}, type={self.type}, data={self.data} title={self.title})>"
|
||||
|
||||
|
||||
def get_orgy():
|
||||
orgy = g.db.query(Orgy).one_or_none()
|
||||
return orgy
|
||||
|
||||
def create_orgy(youtube_id, title):
|
||||
def create_orgy(link, title):
|
||||
assert not get_orgy()
|
||||
assert re.match(yt_id_regex, youtube_id)
|
||||
orgy = Orgy(title=title, youtube_id=youtube_id)
|
||||
normalized_link = normalize_url(link)
|
||||
data = None
|
||||
orgy_type = -1
|
||||
if re.match(bare_youtube_regex, normalized_link):
|
||||
orgy_type = OrgyTypes.YOUTUBE
|
||||
data, _ = get_youtube_id_and_t(normalized_link)
|
||||
elif re.match(rumble_regex, normalized_link):
|
||||
orgy_type = OrgyTypes.RUMBLE
|
||||
data = normalized_link
|
||||
elif re.match(twitch_regex, normalized_link):
|
||||
orgy_type = OrgyTypes.TWITCH
|
||||
data = re.search(twitch_regex, normalized_link).group(3)
|
||||
else:
|
||||
assert False
|
||||
|
||||
orgy = Orgy(title=title, id=0, type = orgy_type, data = data)
|
||||
g.db.add(orgy)
|
||||
g.db.flush()
|
||||
g.db.commit()
|
||||
|
|
|
@ -209,8 +209,6 @@ class User(Base):
|
|||
else:
|
||||
self.marseybux += amount
|
||||
|
||||
g.db.flush()
|
||||
|
||||
|
||||
def charge_account(self, currency, amount, **kwargs):
|
||||
in_db = g.db.query(User).filter(User.id == self.id).with_for_update().one()
|
||||
|
|
|
@ -480,8 +480,9 @@ def execute_dylan(v:User):
|
|||
def execute_under_siege(v:User, target:Optional[Union[Post, Comment]], body, kind:str) -> bool:
|
||||
if v.shadowbanned: return
|
||||
|
||||
if SITE == 'watchpeopledie.tv' or True:
|
||||
if SITE == 'watchpeopledie.tv':
|
||||
execute_dylan(v)
|
||||
if v.shadowbanned: return
|
||||
|
||||
if not get_setting("under_siege"): return
|
||||
if v.admin_level >= PERMS['SITE_BYPASS_UNDER_SIEGE_MODE']: return
|
||||
|
|
|
@ -325,6 +325,7 @@ if SITE_NAME == 'rDrama':
|
|||
'retalk.com',
|
||||
'talk.lol',
|
||||
'lemmy.ml',
|
||||
'lemmy.world',
|
||||
'lemmygrad.ml',
|
||||
'exploding-heads.com',
|
||||
'raddle.me',
|
||||
|
@ -420,7 +421,7 @@ PROFANITIES = {
|
|||
'(?<![a-z])sex(?![a-z])': 'intercourse',
|
||||
'(?<![a-z])cum(?![a-z])': 'c*m',
|
||||
'orgasm': 'sexual climax',
|
||||
'dick': 'peepee',
|
||||
'(?<![a-z])dick': 'peepee',
|
||||
'cock': 'peepee',
|
||||
'cocks': 'peepees',
|
||||
'penis': 'peepee',
|
||||
|
@ -1188,7 +1189,7 @@ def IS_DKD():
|
|||
birthgay_begin = datetime.datetime.strptime(f'20/5/{t.year}', '%d/%m/%Y')
|
||||
birthgay_end = datetime.datetime.strptime(f'22/5/{t.year}', '%d/%m/%Y')
|
||||
def IS_BIRTHGAY():
|
||||
return False and (SITE_NAME == 'rDrama' and birthgay_begin < datetime.datetime.now() < birthgay_end)
|
||||
return SITE_NAME == 'rDrama' and birthgay_begin < datetime.datetime.now() < birthgay_end
|
||||
|
||||
birthdead_begin = datetime.datetime.strptime(f'26/4/{t.year}', '%d/%m/%Y')
|
||||
birthdead_end = datetime.datetime.strptime(f'28/4/{t.year}', '%d/%m/%Y')
|
||||
|
@ -1266,7 +1267,12 @@ GIRL_NAMES = {
|
|||
'Z': ['Zoe', 'Zoey', 'Zaria', 'Zoie']
|
||||
}
|
||||
|
||||
from sqlalchemy import *
|
||||
class OrgyTypes:
|
||||
YOUTUBE = 1
|
||||
RUMBLE = 2
|
||||
TWITCH = 3
|
||||
|
||||
from sqlalchemy.engine.create import create_engine
|
||||
from sqlalchemy.orm import scoped_session, sessionmaker
|
||||
|
||||
engine = create_engine(environ.get("DATABASE_URL").strip())
|
||||
|
|
|
@ -2,7 +2,6 @@ import time
|
|||
from random import choice
|
||||
|
||||
from flask import g
|
||||
from sqlalchemy import *
|
||||
from files.classes.lottery import Lottery
|
||||
|
||||
from files.helpers.alerts import *
|
||||
|
|
|
@ -119,23 +119,6 @@ def convert_to_mp4(old, new, vid):
|
|||
os.replace(tmp, new)
|
||||
os.remove(old)
|
||||
|
||||
media = Media(
|
||||
kind='video',
|
||||
filename=new,
|
||||
user_id=vid,
|
||||
size=os.stat(new).st_size
|
||||
)
|
||||
|
||||
db = db_session()
|
||||
db.add(media)
|
||||
|
||||
try:
|
||||
db.commit()
|
||||
except:
|
||||
db.rollback()
|
||||
|
||||
db.close()
|
||||
|
||||
purge_files_in_cache(f"{SITE_FULL}{new}")
|
||||
|
||||
|
||||
|
@ -170,13 +153,13 @@ def process_video(file, v):
|
|||
|
||||
os.remove(old)
|
||||
|
||||
media = Media(
|
||||
kind='video',
|
||||
filename=new,
|
||||
user_id=v.id,
|
||||
size=os.stat(new).st_size
|
||||
)
|
||||
g.db.add(media)
|
||||
media = Media(
|
||||
kind='video',
|
||||
filename=new,
|
||||
user_id=v.id,
|
||||
size=os.stat(new).st_size
|
||||
)
|
||||
g.db.add(media)
|
||||
|
||||
if SITE == 'watchpeopledie.tv':
|
||||
return f'https://videos.{SITE}' + new.split('/videos')[1]
|
||||
|
|
|
@ -126,6 +126,10 @@ giphy_regex = re.compile('(https:\/\/media\.giphy\.com\/media\/[a-z0-9]+\/giphy)
|
|||
youtube_regex = re.compile('(<p>[^<]*)(https:\/\/youtube\.com\/watch\?[\w\-.#&/=?@%+]{7,})', flags=re.I|re.A)
|
||||
yt_id_regex = re.compile('[\w\-]{5,20}', flags=re.A)
|
||||
|
||||
rumble_regex = re.compile('https://rumble\.com/embed/([a-zA-Z0-9]*)/\?pub=([a-zA-Z0-9]*)',flags=re.I|re.A)
|
||||
bare_youtube_regex = re.compile('https:\/\/youtube\.com\/watch\?([\w\-.#&/=?@%+]{7,})',flags=re.I|re.A)
|
||||
twitch_regex = re.compile('(https:\/\/)?(www\.)?twitch.tv/(.*)',flags=re.I|re.A)
|
||||
|
||||
link_fix_regex = re.compile("(\[.*?\]\()(?!http|\/)(.*?\))" + NOT_IN_CODE_OR_LINKS, flags=re.A)
|
||||
|
||||
css_url_regex = re.compile('url\(\s*[\'"]?(.*?)[\'"]?\s*\)', flags=re.I|re.A)
|
||||
|
|
|
@ -44,7 +44,7 @@ TLDS = ( # Original gTLDs and ccTLDs
|
|||
'app','cleaning','club','dev','farm','florist','fun','gay','lgbt','life','lol',
|
||||
'moe','mom','monster','new','news','online','pics','press','pub','site','blog',
|
||||
'vip','win','world','wtf','xyz','video','host','art','media','wiki','tech',
|
||||
'cooking','network','party','goog','markets','today',
|
||||
'cooking','network','party','goog','markets','today','beauty','camp'
|
||||
)
|
||||
|
||||
allowed_tags = ('b','blockquote','br','code','del','em','h1','h2','h3','h4','h5','h6','hr','i',
|
||||
|
@ -300,14 +300,12 @@ def sanitize_settings_text(sanitized:Optional[str], max_length:Optional[int]=Non
|
|||
if max_length: sanitized = sanitized[:max_length]
|
||||
return sanitized
|
||||
|
||||
|
||||
def handle_youtube_links(url):
|
||||
html = None
|
||||
def get_youtube_id_and_t(url):
|
||||
params = parse_qs(urlparse(url).query, keep_blank_values=True)
|
||||
|
||||
id = params.get('v')
|
||||
|
||||
if not id: return None
|
||||
if not id: return (None, None)
|
||||
|
||||
id = id[0]
|
||||
|
||||
|
@ -318,7 +316,14 @@ def handle_youtube_links(url):
|
|||
t = split[1]
|
||||
|
||||
id = id.split('?')[0]
|
||||
|
||||
return (id, t)
|
||||
|
||||
def handle_youtube_links(url):
|
||||
params = parse_qs(urlparse(url).query, keep_blank_values=True)
|
||||
html = None
|
||||
id, t = get_youtube_id_and_t(url)
|
||||
if not id: return None
|
||||
if yt_id_regex.fullmatch(id):
|
||||
if not t:
|
||||
t = params.get('t', params.get('start', [0]))[0]
|
||||
|
|