Skip to content

Commit

Permalink
v5 Debug updates
Browse files Browse the repository at this point in the history
  • Loading branch information
terrelsa13 committed Jan 2, 2024
1 parent 41b2136 commit fdf7312
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mumc_modules/mumc_days_since.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_days_since_played(date_last_played,the_dict):
appendTo_DEBUG_log('\n\nCaptured UTC time is: ' + str(date_time_now),3,the_dict)
appendTo_DEBUG_log('\nDate last played or date created is: ' + str(date_last_played),2,the_dict)
appendTo_DEBUG_log('\nFormatted date last played or date created is: ' + str(date_time_last_played),3,the_dict)
appendTo_DEBUG_log('\nMedia item was last \'' + days_since_played + '\'',2,the_dict)
appendTo_DEBUG_log('\nMedia item was last played or created \'' + days_since_played + '\'',2,the_dict)
else:
days_since_played=date_last_played

Expand Down
4 changes: 2 additions & 2 deletions mumc_modules/mumc_tagged.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_isItemTagged(usertags,tagged_items,item,the_dict):
if (itemIsTagged):
tagged_items.append(item['Id'])
if (the_dict['DEBUG']):
appendTo_DEBUG_log('\nItem with Id ' + str(item['Id']) + 'has tag named ' + str(itemTaggedValue),2,the_dict)
appendTo_DEBUG_log('\nEmby tagged item with Id ' + str(item['Id']) + ' has tag named: ' + str(itemTaggedValue),2,the_dict)
#Emby and jellyfin store tags differently
else: #(isJellyfinServer(the_dict['server_brand']))
#Jellyfin tags
Expand All @@ -58,7 +58,7 @@ def get_isItemTagged(usertags,tagged_items,item,the_dict):
if (itemIsTagged):
tagged_items.append(item['Id'])
if (the_dict['DEBUG']):
appendTo_DEBUG_log('\nItem with Id ' + str(item['Id']) + 'has tag named: ' + str(itemTaggedValue),2,the_dict)
appendTo_DEBUG_log('\nJellyfin tagged item with Id ' + str(item['Id']) + ' has tag named: ' + str(itemTaggedValue),2,the_dict)

if (the_dict['DEBUG']):
appendTo_DEBUG_log('\nIs Media Item ' + str(item['Id']) + ' Tagged: ' + str(itemIsTagged),2,the_dict)
Expand Down
9 changes: 8 additions & 1 deletion mumc_modules/mumc_trakt_fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ def modify_lastPlayedDate(item,userKey,the_dict):
serverURL=the_dict['admin_settings']['server']['url']
authKey=the_dict['admin_settings']['server']['auth_key']

if (the_dict['DEBUG']):
appendTo_DEBUG_log("\n['UserData'] from server before requesting update:\n" + str(convert2json(item["UserData"])),2,the_dict)

#save current date-time with specified format to item["UserData"]["LastPlayedDate"]
item["UserData"]["LastPlayedDate"]=str(datetime.strftime(the_dict['date_time_now'], "%Y-%m-%dT%H:%M:%S.000Z"))

if (the_dict['DEBUG']):
appendTo_DEBUG_log("\nAdd missing LastPlayedDate of " + str(item["UserData"]["LastPlayedDate"]) + " to media item with Id: " + str(item["Id"]),3)
appendTo_DEBUG_log("\nAdd missing LastPlayedDate of " + str(item["UserData"]["LastPlayedDate"]) + " to media item with Id: " + str(item["Id"]),2,the_dict)

#convert item to json element
DATA = convert2json(item["UserData"])

if (the_dict['DEBUG']):
appendTo_DEBUG_log("\nPending ['UserData'] update request to be sent to server:\n" + str(convert2json(item["UserData"])),2,the_dict)

#encode json element
DATA = DATA.encode('utf-8')

Expand Down
2 changes: 1 addition & 1 deletion mumc_modules/mumc_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#Get the current script version
def get_script_version():
return '5.3.14'
return '5.3.15'


#Get the min config version
Expand Down

0 comments on commit fdf7312

Please sign in to comment.