<commit_before>-- require "mp.msg"
function write_name()
  file = io.open("watched", "a+")
  file:write(mp.get_property("path"), "\n")
  mp.command("playlist-next force")
  file:flush()
  file:close()
end

mp.add_key_binding(nil, "write_name", write_name)<commit_msg>Update writename script to also write failed loads<commit_after>require "mp.msg"
function write_name(filename)
  file = io.open(filename, "a+")
  path = mp.get_property("path")
  file:write(mp.get_property("path"), "\n")
  mp.command("playlist-next force")
  mp.msg.info("Wrote " .. path .. " to " .. filename)
  file:flush()
  file:close()
end

function watched()
  write_name("watched")
end

function failed()

  write_name("failed")
end

mp.add_key_binding(nil, "write_name", watched)

mp.add_hook("on_load_fail", 50, failed)
{'fraction_non_alphanumeric': 0.17232704402515722, 'fraction_numerical': 0.0025157232704402514, 'mean_word_length': 5.267716535433071, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1664918', 'n_tokens_mistral': 291, 'n_tokens_neox': 286, 'n_words': 58}