Removed unnecessary shuffle feature

This commit is contained in:
Anon 2022-10-24 23:58:39 -07:00
parent 8e3ebac936
commit 735e8a8703
3 changed files with 0 additions and 12 deletions

View File

@ -81,7 +81,6 @@ settings_behavior = {
"content_type": "text/plain", "content_type": "text/plain",
"content_newline": "\n", "content_newline": "\n",
"post_image_link": False, "post_image_link": False,
"post_random": False,
"tmp_dir": "/var/tmp", "tmp_dir": "/var/tmp",
"debug": False "debug": False
} }

View File

@ -65,8 +65,6 @@ This is the main configuration setting for the bot.
**`post_image_link:`** If set to `True` this will insert a direct media link at the end of the message for each media file uploaded. If `content_type` is `'text\markdown'` it will make the link actionable, otherwise it will simply be a plain text html link. Some instances add this link automatically, in which case this should be set to `False`. See `content_newline` and `content_type` to correctly configure actionable links. **`post_image_link:`** If set to `True` this will insert a direct media link at the end of the message for each media file uploaded. If `content_type` is `'text\markdown'` it will make the link actionable, otherwise it will simply be a plain text html link. Some instances add this link automatically, in which case this should be set to `False`. See `content_newline` and `content_type` to correctly configure actionable links.
**`post_random:`** Shuffle all items in `master_list` so that they post in random order.
**`tmp_dir:`** The temporary directory to use if `atomic_saving` is set to `True`. The default location is `/var/tmp`. **`tmp_dir:`** The temporary directory to use if `atomic_saving` is set to `True`. The default location is `/var/tmp`.
**`debug:`** Set this to true for testing. This will prevent Yandere Lewd Bot from logging into the mastodon instance and asking for your encryption password (meaning that nothing will actually get posted to your account, but it will still do everything else). **`debug:`** Set this to true for testing. This will prevent Yandere Lewd Bot from logging into the mastodon instance and asking for your encryption password (meaning that nothing will actually get posted to your account, but it will still do everything else).

View File

@ -19,11 +19,8 @@
import yanlib import yanlib
import os import os
import datetime
import contextlib import contextlib
import fnmatch import fnmatch
import math
import shutil
from threading import Event from threading import Event
from mastodon import Mastodon, MastodonIllegalArgumentError, MastodonAPIError, MastodonVersionError from mastodon import Mastodon, MastodonIllegalArgumentError, MastodonAPIError, MastodonVersionError
@ -183,11 +180,6 @@ class YandereBot:
self.listPictures = self.load_pictures(list_blacklist) self.listPictures = self.load_pictures(list_blacklist)
self.lenBlacklist = len(list_blacklist) self.lenBlacklist = len(list_blacklist)
def shuffle_list(self):
if self.settings_behavior["post_random"]:
import random
random.seed(os.urandom(16))
random.shuffle(self.listPictures)
# Maybe I should remove this from the backend? # Maybe I should remove this from the backend?
def print_header_stats(self, picked): def print_header_stats(self, picked):
@ -338,7 +330,6 @@ class YandereBot:
def prime_bot(self): def prime_bot(self):
self.load_picture_list() self.load_picture_list()
self.validate_post_settings() self.validate_post_settings()
self.shuffle_list()
if not self.debug_mode: if not self.debug_mode:
self.decrypt_settings() self.decrypt_settings()
self.login() self.login()