Skip to content

Commit

Permalink
v5 remove shebang from modules not directly run
Browse files Browse the repository at this point in the history
Fix issue with legacy config converter not properly turning empty strings into an empty list
  • Loading branch information
terrelsa13 committed Dec 1, 2023
1 parent 6be74b7 commit aeb779e
Show file tree
Hide file tree
Showing 38 changed files with 312 additions and 272 deletions.
2 changes: 1 addition & 1 deletion mumc_modules/mumc_blacklist_whitelist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_compare_items import get_isItemMatching_doesItemStartWith
from mumc_modules.mumc_played_created import get_playedCreatedDays_playedCreatedCounts
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import inspect
import time
from sys import getsizeof
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_compare_items.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import multiprocessing
from mumc_modules.mumc_output import appendTo_DEBUG_log

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_config_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_output import print_byType
from mumc_modules.mumc_setup_questions import get_brand,get_url,get_port,get_base,get_admin_username,get_admin_password,get_library_setup_behavior,get_library_matching_behavior,get_tag_name,get_authentication_key
from mumc_modules.mumc_versions import get_script_version
Expand Down
16 changes: 13 additions & 3 deletions mumc_modules/mumc_config_convert.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import yaml
import copy
from mumc_modules.mumc_versions import get_script_version
Expand Down Expand Up @@ -764,13 +764,23 @@ def convert_legacyConfigToYAML(cfg,configPath,configFileNameNoExt):
config_data['advanced_settings']['behavioral_statements']['audiobook']['blacklisted']['dynamic_behavior']=False

try:
config_data['advanced_settings']['whitetags']=cfg['whitetag'].split(',')
legacy_whitetag_list=list(set(cfg['whitetag'].split(',')))
if (legacy_whitetag_list[0] == ''):
config_data['advanced_settings']['whitetags']=[]
else:
config_data['advanced_settings']['whitetags']=cfg['whitetag'].split(',')
except:
config_data['advanced_settings']['whitetags']=[]

try:
config_data['advanced_settings']['blacktags']=cfg['blacktag'].split(',')
legacy_blacktag_list=list(set(cfg['blacktag'].split(',')))
if (legacy_blacktag_list[0] == ''):
config_data['advanced_settings']['blacktags']=[]
else:
config_data['advanced_settings']['blacktags']=cfg['blacktag'].split(',')
except:
config_data['advanced_settings']['blacktags']=[]

try:
config_data['advanced_settings']['episode_control']['minimum_episodes']=cfg['minimum_number_episodes']
except:
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_config_import.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import importlib
import yaml
from mumc_modules.mumc_configcheck_legacy import cfgCheckLegacy
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_config_skeleton.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_compare_items import keys_exist

#Set yaml config skeleton
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_config_updater.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_output import save_yaml_config


Expand Down
234 changes: 117 additions & 117 deletions mumc_modules/mumc_configcheck_legacy.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mumc_modules/mumc_configuration_yaml.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import json
from mumc_modules.mumc_output import save_yaml_config

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_console_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

# -*- coding: utf-8 -*-
from datetime import datetime
from mumc_modules.mumc_output import appendTo_DEBUG_log,print_byType,convert2json
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_days_since.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from datetime import datetime
from mumc_modules.mumc_output import appendTo_DEBUG_log

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_delete.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import traceback
import urllib.request as urlrequest
from mumc_modules.mumc_output import appendTo_DEBUG_log,print_byType
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_favorited.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_server_type import isJellyfinServer
from mumc_modules.mumc_played_created import get_isPlayed_isUnplayed_isPlayedAndUnplayed_QueryValue,get_playedCreatedDays_playedCreatedCounts
from mumc_modules.mumc_url import api_query_handler
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_get_blacktagged.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_url import api_query_handler
from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_tagged import getChildren_taggedMediaItems,list_to_urlparsed_string
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_get_favorited.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_url import api_query_handler
from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_favorited import getChildren_favoritedMediaItems
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_get_media.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import multiprocessing
from datetime import timedelta
from collections import defaultdict
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_get_watched.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_url import api_query_handler
from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_server_type import isEmbyServer,isJellyfinServer
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_get_whitetagged.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_url import api_query_handler
from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_tagged import getChildren_taggedMediaItems,list_to_urlparsed_string
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_init.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from datetime import datetime,timezone
from sys import argv,path
from mumc_modules.mumc_output import add_to_PATH
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_item_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import urllib.parse as urlparse
from mumc_modules.mumc_url import requestURL

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_minimum_episodes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from collections import defaultdict
from mumc_modules.mumc_output import appendTo_DEBUG_log
from mumc_modules.mumc_item_info import get_ADDITIONAL_itemInfo,get_SERIES_itemInfo
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

# -*- coding: utf-8 -*-
import os
#import re
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_parse_options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import os
from mumc_modules.mumc_console_info import default_helper_menu,print_full_help_menu,missing_config_argument_helper,missing_config_argument_format_helper,alt_config_file_does_not_exists_helper,alt_config_syntax_helper,unknown_command_line_option_helper
from mumc_modules.mumc_output import getFullPathName,getFileExtension
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_played_created.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from dateutil.parser import parse
from mumc_modules.mumc_output import appendTo_DEBUG_log

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_post_process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import multiprocessing
from mumc_modules.mumc_output import appendTo_DEBUG_log,convert2json
from mumc_modules.mumc_server_type import isJellyfinServer
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_prepare_item.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_trakt_fix import modify_lastPlayedDate
from mumc_modules.mumc_server_type import isJellyfinServer
from mumc_modules.mumc_output import appendTo_DEBUG_log
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_season_episode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from mumc_modules.mumc_output import appendTo_DEBUG_log


Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_server_type.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3



#Determine if server is Jellyfin
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_setup_questions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import urllib.request as urlrequest
from mumc_modules.mumc_output import convert2json
from mumc_modules.mumc_url import requestURL
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_sort.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3



#sort the movie delete list
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_tagged.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import urllib.parse as urlparse
from mumc_modules.mumc_server_type import isEmbyServer,isJellyfinServer
from mumc_modules.mumc_played_created import get_isPlayed_isUnplayed_isPlayedAndUnplayed_QueryValue
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_trakt_fix.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import urllib.request as urlrequest
from datetime import datetime
from mumc_modules.mumc_output import appendTo_DEBUG_log,convert2json
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_url.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

import urllib.request as urlrequest
from urllib.error import HTTPError,URLError
import json
Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_userlib_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3

from collections import defaultdict
import copy
from mumc_modules.mumc_url import requestURL
Expand Down
4 changes: 2 additions & 2 deletions mumc_modules/mumc_versions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python3

import platform
from mumc_modules.mumc_url import requestURL


#Get the current script version
def get_script_version():
return '5.3.11'
return '5.3.12'


#Get the min config version
Expand Down
Loading

0 comments on commit aeb779e

Please sign in to comment.