mirror of https://gitlab.com/bashrc2/epicyon
Flag to indicate whether shares are shown within profile
parent
ceec79afb7
commit
9765539bd2
|
@ -22414,6 +22414,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
else:
|
||||
print('Adding wanted item')
|
||||
shares_file_type = 'wanted'
|
||||
on_profile = False
|
||||
add_share(self.server.base_dir,
|
||||
self.server.http_prefix,
|
||||
nickname,
|
||||
|
@ -22430,7 +22431,8 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
fields['languagesDropdown'],
|
||||
self.server.translate, shares_file_type,
|
||||
self.server.low_bandwidth,
|
||||
self.server.content_license_url)
|
||||
self.server.content_license_url,
|
||||
on_profile)
|
||||
if filename:
|
||||
if os.path.isfile(filename):
|
||||
try:
|
||||
|
|
|
@ -3459,7 +3459,7 @@ def _command_options() -> None:
|
|||
"City", "0", "GBP",
|
||||
"2 months",
|
||||
debug, city, argb.language, {}, 'shares', argb.low_bandwidth,
|
||||
argb.content_license_url)
|
||||
argb.content_license_url, False)
|
||||
add_share(base_dir,
|
||||
http_prefix, nickname, domain, port,
|
||||
"witch hat",
|
||||
|
@ -3470,7 +3470,7 @@ def _command_options() -> None:
|
|||
"City", "0", "GBP",
|
||||
"3 months",
|
||||
debug, city, argb.language, {}, 'shares', argb.low_bandwidth,
|
||||
argb.content_license_url)
|
||||
argb.content_license_url, False)
|
||||
|
||||
delete_all_posts(base_dir, nickname, domain, 'inbox')
|
||||
delete_all_posts(base_dir, nickname, domain, 'outbox')
|
||||
|
|
11
shares.py
11
shares.py
|
@ -312,7 +312,7 @@ def add_share(base_dir: str,
|
|||
price: str, currency: str,
|
||||
system_language: str, translate: {},
|
||||
shares_file_type: str, low_bandwidth: bool,
|
||||
content_license_url: str) -> None:
|
||||
content_license_url: str, on_profile: bool) -> None:
|
||||
"""Adds a new share
|
||||
"""
|
||||
if is_filtered_globally(base_dir,
|
||||
|
@ -391,7 +391,8 @@ def add_share(base_dir: str,
|
|||
"published": published,
|
||||
"expire": duration_sec,
|
||||
"itemPrice": price,
|
||||
"itemCurrency": currency
|
||||
"itemCurrency": currency,
|
||||
"onProfile": on_profile
|
||||
}
|
||||
|
||||
save_json(shares_json, shares_filename)
|
||||
|
@ -1170,7 +1171,8 @@ def outbox_share_upload(base_dir: str, http_prefix: str,
|
|||
message_json['object']['itemPrice'],
|
||||
message_json['object']['itemCurrency'],
|
||||
system_language, translate, 'shares',
|
||||
low_bandwidth, content_license_url)
|
||||
low_bandwidth, content_license_url,
|
||||
False)
|
||||
if debug:
|
||||
print('DEBUG: shared item received via c2s')
|
||||
|
||||
|
@ -1924,7 +1926,8 @@ def _dfc_to_shares_format(catalog_json: {},
|
|||
"published": start_time_sec,
|
||||
"expire": expiry_time_sec,
|
||||
"itemPrice": item['DFC:price'].split(' ')[0],
|
||||
"itemCurrency": item['DFC:price'].split(' ')[1]
|
||||
"itemCurrency": item['DFC:price'].split(' ')[1],
|
||||
"onProfile": False
|
||||
}
|
||||
return shares_json
|
||||
|
||||
|
|
Loading…
Reference in New Issue