Artist flag

merge-requests/30/head
Bob Mottram 2021-12-04 17:18:32 +00:00
parent 84607912cc
commit 12cd354f7c
2 changed files with 22 additions and 10 deletions

View File

@ -8,6 +8,7 @@ __status__ = "Production"
__module_group__ = "Moderation" __module_group__ = "Moderation"
import os import os
from utils import isArtist
from utils import isAccountDir from utils import isAccountDir
from utils import getFullDomain from utils import getFullDomain
from utils import isEditor from utils import isEditor
@ -57,6 +58,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
"""Show the moderation feed as html """Show the moderation feed as html
This is what you see when selecting the "mod" timeline This is what you see when selecting the "mod" timeline
""" """
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -66,7 +68,7 @@ def htmlModeration(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, fullWidthTimelineButtonHeader, showPublishAsIcon, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
authorized, moderationActionStr, theme, authorized, moderationActionStr, theme,

View File

@ -10,6 +10,7 @@ __module_group__ = "Timeline"
import os import os
import time import time
from shutil import copyfile from shutil import copyfile
from utils import isArtist
from utils import dangerousMarkup from utils import dangerousMarkup
from utils import getConfigParam from utils import getConfigParam
from utils import getFullDomain from utils import getFullDomain
@ -1146,6 +1147,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
""" """
manuallyApproveFollowers = \ manuallyApproveFollowers = \
followerApprovalActive(baseDir, nickname, domain) followerApprovalActive(baseDir, nickname, domain)
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
@ -1159,7 +1161,7 @@ def htmlShares(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1200,6 +1202,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
""" """
manuallyApproveFollowers = \ manuallyApproveFollowers = \
followerApprovalActive(baseDir, nickname, domain) followerApprovalActive(baseDir, nickname, domain)
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
@ -1213,7 +1216,7 @@ def htmlWanted(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1255,6 +1258,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
""" """
manuallyApproveFollowers = \ manuallyApproveFollowers = \
followerApprovalActive(baseDir, nickname, domain) followerApprovalActive(baseDir, nickname, domain)
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
@ -1268,7 +1272,7 @@ def htmlInbox(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1310,6 +1314,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
""" """
manuallyApproveFollowers = \ manuallyApproveFollowers = \
followerApprovalActive(baseDir, nickname, domain) followerApprovalActive(baseDir, nickname, domain)
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
@ -1323,7 +1328,7 @@ def htmlBookmarks(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1363,6 +1368,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
CWlists: {}, listsEnabled: str) -> str: CWlists: {}, listsEnabled: str) -> str:
"""Show the DM timeline as html """Show the DM timeline as html
""" """
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -1373,7 +1379,7 @@ def htmlInboxDMs(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1413,6 +1419,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
CWlists: {}, listsEnabled: str) -> str: CWlists: {}, listsEnabled: str) -> str:
"""Show the replies timeline as html """Show the replies timeline as html
""" """
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -1424,7 +1431,7 @@ def htmlInboxReplies(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1464,6 +1471,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
CWlists: {}, listsEnabled: str) -> str: CWlists: {}, listsEnabled: str) -> str:
"""Show the media timeline as html """Show the media timeline as html
""" """
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -1475,7 +1483,7 @@ def htmlInboxMedia(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1515,6 +1523,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
CWlists: {}, listsEnabled: str) -> str: CWlists: {}, listsEnabled: str) -> str:
"""Show the blogs timeline as html """Show the blogs timeline as html
""" """
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -1526,7 +1535,7 @@ def htmlInboxBlogs(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, newswire, False, False, artist,
positiveVoting, showPublishAsIcon, positiveVoting, showPublishAsIcon,
fullWidthTimelineButtonHeader, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
@ -1671,6 +1680,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
""" """
manuallyApproveFollowers = \ manuallyApproveFollowers = \
followerApprovalActive(baseDir, nickname, domain) followerApprovalActive(baseDir, nickname, domain)
artist = isArtist(baseDir, nickname)
return htmlTimeline(cssCache, defaultTimeline, return htmlTimeline(cssCache, defaultTimeline,
recentPostsCache, maxRecentPosts, recentPostsCache, maxRecentPosts,
translate, pageNumber, translate, pageNumber,
@ -1682,7 +1692,7 @@ def htmlOutbox(cssCache: {}, defaultTimeline: str,
YTReplacementDomain, YTReplacementDomain,
twitterReplacementDomain, twitterReplacementDomain,
showPublishedDateOnly, showPublishedDateOnly,
newswire, False, False, False, positiveVoting, newswire, False, False, artist, positiveVoting,
showPublishAsIcon, fullWidthTimelineButtonHeader, showPublishAsIcon, fullWidthTimelineButtonHeader,
iconsAsButtons, rssIconAtTop, publishButtonAtTop, iconsAsButtons, rssIconAtTop, publishButtonAtTop,
authorized, None, theme, peertubeInstances, authorized, None, theme, peertubeInstances,