Cleanup
This commit is contained in:
@@ -97,7 +97,7 @@ def cleanup_watched(
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
(
|
(
|
||||||
show_watched_list_2_keys_dict,
|
_,
|
||||||
episode_watched_list_2_keys_dict,
|
episode_watched_list_2_keys_dict,
|
||||||
movies_watched_list_2_keys_dict,
|
movies_watched_list_2_keys_dict,
|
||||||
) = generate_library_guids_dict(watched_list_2[user_2][library_2])
|
) = generate_library_guids_dict(watched_list_2[user_2][library_2])
|
||||||
@@ -273,7 +273,7 @@ def filter_episode_watched_list_2_keys_dict(
|
|||||||
episode_watched_list_2_keys_dict
|
episode_watched_list_2_keys_dict
|
||||||
)
|
)
|
||||||
for key, value in filtered_episode_watched_list_2_keys_dict.items():
|
for key, value in filtered_episode_watched_list_2_keys_dict.items():
|
||||||
for index, item in enumerate(value):
|
for index in range(len(value)):
|
||||||
if index not in indecies:
|
if index not in indecies:
|
||||||
filtered_episode_watched_list_2_keys_dict[key][index] = None
|
filtered_episode_watched_list_2_keys_dict[key][index] = None
|
||||||
|
|
||||||
|
|||||||
@@ -20,18 +20,26 @@ def check_marklog(lines, expected_values):
|
|||||||
if line not in expected_values:
|
if line not in expected_values:
|
||||||
raise Exception("Line not found in marklog: " + line)
|
raise Exception("Line not found in marklog: " + line)
|
||||||
|
|
||||||
|
|
||||||
found_values.append(line)
|
found_values.append(line)
|
||||||
|
|
||||||
# Check to make sure the marklog contains the same number of values as the expected values
|
# Check to make sure the marklog contains the same number of values as the expected values
|
||||||
if len(found_values) != len(expected_values):
|
if len(found_values) != len(expected_values):
|
||||||
raise Exception("Marklog did not contain the same number of values as the expected values, found " +
|
raise Exception(
|
||||||
str(len(found_values)) + " values, expected " + str(len(expected_values)) + " values")
|
"Marklog did not contain the same number of values as the expected values, found "
|
||||||
|
+ str(len(found_values))
|
||||||
|
+ " values, expected "
|
||||||
|
+ str(len(expected_values))
|
||||||
|
+ " values"
|
||||||
|
)
|
||||||
|
|
||||||
# Check that the two lists contain the same values
|
# Check that the two lists contain the same values
|
||||||
if sorted(found_values) != sorted(expected_values):
|
if sorted(found_values) != sorted(expected_values):
|
||||||
raise Exception("Marklog did not contain the same values as the expected values, found:\n" +
|
raise Exception(
|
||||||
"\n".join(sorted(found_values)) + "\n\nExpected:\n" + "\n".join(sorted(expected_values)))
|
"Marklog did not contain the same values as the expected values, found:\n"
|
||||||
|
+ "\n".join(sorted(found_values))
|
||||||
|
+ "\n\nExpected:\n"
|
||||||
|
+ "\n".join(sorted(expected_values))
|
||||||
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@@ -61,6 +69,5 @@ def main():
|
|||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user