diff --git a/CHANGES.md b/CHANGES.md index f9026efc..3ceaa1c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ * Add a persons available socials (Youtube, LinkedIn, Reddit, Fansite, TikTok, Wikidata) * Change increase viewable history menu items from 13 to 15 * Change add parsing of 2160p releases that don't have a source tag +* Change twitter.com to x.com and Twitter to X (Twitter) branding ### 3.32.8 (2024-10-07 00:30:00 UTC) diff --git a/gui/slick/images/X16.png b/gui/slick/images/X16.png new file mode 100644 index 00000000..12b785bf Binary files /dev/null and b/gui/slick/images/X16.png differ diff --git a/gui/slick/images/twitter16.png b/gui/slick/images/twitter16.png deleted file mode 100644 index 59183406..00000000 Binary files a/gui/slick/images/twitter16.png and /dev/null differ diff --git a/lib/api_imdb/imdb_api.py b/lib/api_imdb/imdb_api.py index 8220ab35..dddbdc87 100644 --- a/lib/api_imdb/imdb_api.py +++ b/lib/api_imdb/imdb_api.py @@ -18,7 +18,7 @@ from lib.dateutil.parser import parser from lib.tvinfo_base import ( TVInfoCharacter, TVInfoPerson, PersonGenders, TVINFO_IMDB, # TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_TMDB, TVINFO_TRAKT, - # TVINFO_TVDB, TVINFO_TVRAGE, TVINFO_TWITTER, TVINFO_WIKIPEDIA, + # TVINFO_TVDB, TVINFO_TVRAGE, TVINFO_X, TVINFO_WIKIPEDIA, TVInfoBase, TVInfoIDs, TVInfoShow) from sg_helpers import clean_data, enforce_type, get_url, try_int from json_helper import json_loads diff --git a/lib/api_tmdb/tmdb_api.py b/lib/api_tmdb/tmdb_api.py index 9def292f..2bc5968e 100644 --- a/lib/api_tmdb/tmdb_api.py +++ b/lib/api_tmdb/tmdb_api.py @@ -17,7 +17,7 @@ from lib.tvinfo_base import CastList, PersonGenders, RoleTypes, \ TVInfoBase, TVInfoIDs, TVInfoImage, TVInfoImageSize, TVInfoImageType, TVInfoNetwork, TVInfoSocialIDs, \ TVInfoCharacter, TVInfoPerson, TVInfoShow, TVInfoEpisode, TVInfoSeason, \ TVINFO_IMDB, TVINFO_TMDB, TVINFO_TVDB, \ - TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_TWITTER + TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_X from json_helper import json_dumps from sg_helpers import clean_data, enforce_type, get_url, iterate_chunk, try_int @@ -34,7 +34,7 @@ tz_p = parser() tmdbsimple.API_KEY = 'edc5f123313769de83a71e157758030b' id_map = {TVINFO_IMDB: 'imdb_id', TVINFO_TVDB: 'tvdb_id', - TVINFO_FACEBOOK: 'facebook_id', TVINFO_INSTAGRAM: 'instagram_id', TVINFO_TWITTER: 'twitter_id'} + TVINFO_FACEBOOK: 'facebook_id', TVINFO_INSTAGRAM: 'instagram_id', TVINFO_X: 'twitter_id'} tv_show_map = dict( name='seriesname', id='id', first_air_date='firstaired', status='status', original_language='language') @@ -165,7 +165,7 @@ def get_tmdb_constants(): class TmdbIndexer(TVInfoBase): API_KEY = tmdbsimple.API_KEY - supported_person_id_searches = [TVINFO_FACEBOOK, TVINFO_IMDB, TVINFO_INSTAGRAM, TVINFO_TMDB, TVINFO_TWITTER] + supported_person_id_searches = [TVINFO_FACEBOOK, TVINFO_IMDB, TVINFO_INSTAGRAM, TVINFO_TMDB, TVINFO_X] supported_id_searches = [TVINFO_IMDB, TVINFO_TMDB, TVINFO_TVDB] map_languages = {} reverse_map_languages = {v: k for k, v in iteritems(map_languages)} diff --git a/lib/api_trakt/indexerapiinterface.py b/lib/api_trakt/indexerapiinterface.py index 13b235a8..d369f83d 100644 --- a/lib/api_trakt/indexerapiinterface.py +++ b/lib/api_trakt/indexerapiinterface.py @@ -7,7 +7,7 @@ from six import iteritems from .trakt import TraktAPI from lib.tvinfo_base.exceptions import BaseTVinfoShownotfound from lib.tvinfo_base import PersonGenders, TVInfoBase, TVINFO_TRAKT, TVINFO_TMDB, TVINFO_TVDB, TVINFO_TVRAGE, TVINFO_IMDB, \ - TVINFO_SLUG, TVInfoPerson, TVINFO_TWITTER, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, TVINFO_INSTAGRAM, TVInfoCharacter, \ + TVINFO_SLUG, TVInfoPerson, TVINFO_X, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, TVINFO_INSTAGRAM, TVInfoCharacter, \ TVInfoShow, TVInfoIDs, TVInfoSocialIDs, TVINFO_TRAKT_SLUG, TVInfoEpisode, TVInfoSeason, RoleTypes from sg_helpers import clean_data, enforce_type, try_int from lib.dateutil.parser import parser @@ -264,7 +264,7 @@ class TraktIndexer(TVInfoBase): birthplace=person_obj['birthplace'], gender=PersonGenders.trakt_map.get(person_obj['gender'], PersonGenders.unknown), social_ids=TVInfoSocialIDs( - ids={TVINFO_TWITTER: person_obj['social_ids']['twitter'], + ids={TVINFO_X: person_obj['social_ids']['twitter'], TVINFO_FACEBOOK: person_obj['social_ids']['facebook'], TVINFO_INSTAGRAM: person_obj['social_ids']['instagram'], TVINFO_WIKIPEDIA: person_obj['social_ids']['wikipedia'] diff --git a/lib/api_tvdb/tvdb_api_v4.py b/lib/api_tvdb/tvdb_api_v4.py index 609fed27..85c36075 100644 --- a/lib/api_tvdb/tvdb_api_v4.py +++ b/lib/api_tvdb/tvdb_api_v4.py @@ -28,7 +28,7 @@ from lib.tvinfo_base import ( TVInfoPerson, TVInfoSeason, TVInfoSeasonTypes, TVInfoShow, TVInfoSocialIDs, TVINFO_FACEBOOK, TVINFO_FANSITE, TVINFO_IMDB, TVINFO_INSTAGRAM, TVINFO_LINKEDIN, TVINFO_OFFICIALSITE, TVINFO_REDDIT, TVINFO_MID_SEASON_FINALE, TVINFO_SEASON_FINALE, TVINFO_SERIES_FINALE, TVINFO_TIKTOK, TVINFO_TMDB, TVINFO_TVDB, - TVINFO_TVDB_SLUG, TVINFO_TVMAZE, TVINFO_TWITTER, TVINFO_WIKIDATA, TVINFO_WIKIPEDIA, TVINFO_YOUTUBE) + TVINFO_TVDB_SLUG, TVINFO_TVMAZE, TVINFO_X, TVINFO_WIKIDATA, TVINFO_WIKIPEDIA, TVINFO_YOUTUBE) from sg_helpers import clean_data, clean_str, enforce_type, get_url, try_date, try_int from six import integer_types, iteritems, PY3, string_types @@ -194,7 +194,7 @@ source_types = { # 3: TVINFO_ZAP2IT, 4: TVINFO_OFFICIALSITE, 5: TVINFO_FACEBOOK, - 6: TVINFO_TWITTER, + 6: TVINFO_X, 7: TVINFO_REDDIT, 8: TVINFO_FANSITE, 9: TVINFO_INSTAGRAM, @@ -357,8 +357,8 @@ class TvdbAPIv4(TVInfoBase): official_site = src_value elif TVINFO_FACEBOOK == src_type or 'facebook' in src_name: social_ids[TVINFO_FACEBOOK] = src_value - elif TVINFO_TWITTER == src_type or 'twitter' in src_name: - social_ids[TVINFO_TWITTER] = src_value + elif TVINFO_X == src_type or 'twitter' in src_name: + social_ids[TVINFO_X] = src_value elif TVINFO_INSTAGRAM == src_type or 'instagram' in src_name: social_ids[TVINFO_INSTAGRAM] = src_value elif TVINFO_REDDIT == src_type or 'reddit' in src_name: @@ -651,7 +651,7 @@ class TvdbAPIv4(TVInfoBase): ti_show.official_site = src_value elif TVINFO_FACEBOOK == src_type or 'facebook' in src_name: social_ids['facebook'] = src_value - elif TVINFO_TWITTER == src_type or 'twitter' in src_name: + elif TVINFO_X == src_type or 'twitter' in src_name: social_ids['twitter'] = src_value elif TVINFO_INSTAGRAM == src_type or 'instagram' in src_name: social_ids['instagram'] = src_value diff --git a/lib/tvinfo_base/base.py b/lib/tvinfo_base/base.py index 70cdbb07..f988b8c9 100644 --- a/lib/tvinfo_base/base.py +++ b/lib/tvinfo_base/base.py @@ -42,7 +42,7 @@ TVINFO_TRAKT_SLUG = 1101 TVINFO_SLUG = 100000 # social media sources -TVINFO_TWITTER = 250000 +TVINFO_X = 250000 TVINFO_FACEBOOK = 250001 TVINFO_INSTAGRAM = 250002 TVINFO_WIKIPEDIA = 250003 @@ -68,7 +68,7 @@ tv_src_names = { TVINFO_SLUG: 'generic slug', - TVINFO_TWITTER: 'twitter', + TVINFO_X: 'twitter', TVINFO_FACEBOOK: 'facebook', TVINFO_INSTAGRAM: 'instagram', TVINFO_WIKIPEDIA: 'wikipedia', @@ -219,7 +219,7 @@ class TVInfoSocialIDs(object): fansite=None # type: AnyStr ): ids = ids or {} - self.twitter = twitter or ids.get(TVINFO_TWITTER) + self.twitter = twitter or ids.get(TVINFO_X) self.instagram = instagram or ids.get(TVINFO_INSTAGRAM) self.facebook = facebook or ids.get(TVINFO_FACEBOOK) self.wikipedia = wikipedia or ids.get(TVINFO_WIKIPEDIA) @@ -231,14 +231,14 @@ class TVInfoSocialIDs(object): self.fansite = fansite or ids.get(TVINFO_FANSITE) def __getitem__(self, key): - return {TVINFO_TWITTER: self.twitter, TVINFO_INSTAGRAM: self.instagram, TVINFO_FACEBOOK: self.facebook, + return {TVINFO_X: self.twitter, TVINFO_INSTAGRAM: self.instagram, TVINFO_FACEBOOK: self.facebook, TVINFO_WIKIDATA: self.wikidata, TVINFO_WIKIPEDIA: self.wikipedia, TVINFO_REDDIT: self.reddit, TVINFO_TIKTOK: self.tiktok, TVINFO_LINKEDIN: self.linkedin, TVINFO_FANSITE: self.fansite, TVINFO_YOUTUBE: self.youtube}.get(key) def __setitem__(self, key, value): self.__dict__[{ - TVINFO_TWITTER: 'twitter', TVINFO_INSTAGRAM: 'instagram', TVINFO_FACEBOOK: 'facebook', + TVINFO_X: 'twitter', TVINFO_INSTAGRAM: 'instagram', TVINFO_FACEBOOK: 'facebook', TVINFO_WIKIPEDIA: 'wikipedia', TVINFO_REDDIT: 'reddit', TVINFO_YOUTUBE: 'youtube', TVINFO_WIKIDATA: 'wikidata', TVINFO_TIKTOK: 'tiktok', TVINFO_LINKEDIN: 'linkedin', TVINFO_FANSITE: 'fansite' }[key]] = value @@ -251,7 +251,7 @@ class TVInfoSocialIDs(object): yield k def __iter__(self): - for s, v in iter(((TVINFO_TWITTER, self.twitter), (TVINFO_INSTAGRAM, self.instagram), + for s, v in iter(((TVINFO_X, self.twitter), (TVINFO_INSTAGRAM, self.instagram), (TVINFO_FACEBOOK, self.facebook), (TVINFO_TIKTOK, self.tiktok), (TVINFO_WIKIPEDIA, self.wikipedia), (TVINFO_WIKIDATA, self.wikidata), (TVINFO_REDDIT, self.reddit), (TVINFO_YOUTUBE, self.youtube), diff --git a/sickgear/indexers/indexer_config.py b/sickgear/indexers/indexer_config.py index f2334769..a342b167 100644 --- a/sickgear/indexers/indexer_config.py +++ b/sickgear/indexers/indexer_config.py @@ -7,7 +7,7 @@ from lib.api_tmdb.tmdb_api import TmdbIndexer from lib.api_imdb.imdb_api import IMDbIndexer # noinspection PyUnresolvedReferences from lib.tvinfo_base import ( - TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_TWITTER, TVINFO_WIKIPEDIA, + TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_X, TVINFO_WIKIPEDIA, TVINFO_IMDB, TVINFO_TMDB, TVINFO_TRAKT, TVINFO_TVDB, TVINFO_TVMAZE, TVINFO_TVRAGE, TVINFO_TRAKT_SLUG, TVINFO_TVDB_SLUG, TVINFO_TIKTOK, TVINFO_WIKIDATA, TVINFO_LINKEDIN, TVINFO_FANSITE, TVINFO_REDDIT, TVINFO_YOUTUBE @@ -106,16 +106,16 @@ tvinfo_config = { people_only=True, icon='instagram16.png' ), - TVINFO_TWITTER: dict( - id=TVINFO_TWITTER, - name='Twitter', + TVINFO_X: dict( + id=TVINFO_X, + name='X (Twitter)', module=None, active=False, mapped_only=True, - people_url='https://twitter.com/%s', + people_url='https://x.com/%s', show_url=None, people_only=True, - icon='twitter16.png' + icon='X16.png' ), TVINFO_FACEBOOK: dict( id=TVINFO_FACEBOOK, diff --git a/sickgear/tv.py b/sickgear/tv.py index 3c2534d4..05383964 100644 --- a/sickgear/tv.py +++ b/sickgear/tv.py @@ -60,7 +60,7 @@ try: from lib.thefuzz import fuzz except ImportError as e: from lib.fuzzywuzzy import fuzz -from lib.tvinfo_base import RoleTypes, TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_SLUG, TVINFO_TWITTER, \ +from lib.tvinfo_base import RoleTypes, TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_SLUG, TVINFO_X, \ TVINFO_WIKIPEDIA, TVINFO_TIKTOK, TVINFO_FANSITE, TVINFO_YOUTUBE, TVINFO_REDDIT, TVINFO_LINKEDIN, TVINFO_WIKIDATA from lib.tvinfo_base.exceptions import * from sg_helpers import calc_age, int_to_time, remove_file_perm, time_to_int @@ -629,7 +629,7 @@ class Person(Referential): k, v = cur_ids.split(':', 1) k = try_int(k, None) if v and None is not k: - p_ids[k] = v if k in (TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_TWITTER, TVINFO_WIKIPEDIA, + p_ids[k] = v if k in (TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_X, TVINFO_WIKIPEDIA, TVINFO_TIKTOK, TVINFO_FANSITE, TVINFO_YOUTUBE, TVINFO_REDDIT, TVINFO_LINKEDIN, TVINFO_WIKIDATA) \ else try_int(v, None) @@ -816,7 +816,7 @@ class Person(Referential): found_ids.add(cur_i) self.dirty_ids = True - for cur_i in (TVINFO_INSTAGRAM, TVINFO_TWITTER, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, + for cur_i in (TVINFO_INSTAGRAM, TVINFO_X, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, TVINFO_TIKTOK, TVINFO_FANSITE, TVINFO_YOUTUBE, TVINFO_REDDIT, TVINFO_LINKEDIN, TVINFO_WIKIDATA): if not rp.social_ids.get(cur_i): @@ -1866,7 +1866,7 @@ class TVShow(TVShowBase): k, v = cur_i.split(':', 1) k = try_int(k, None) if v: - if k in (TVINFO_INSTAGRAM, TVINFO_TWITTER, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, TVINFO_TIKTOK, + if k in (TVINFO_INSTAGRAM, TVINFO_X, TVINFO_FACEBOOK, TVINFO_WIKIPEDIA, TVINFO_TIKTOK, TVINFO_FANSITE, TVINFO_YOUTUBE, TVINFO_REDDIT, TVINFO_LINKEDIN, TVINFO_WIKIDATA): p_ids[k] = v else: