Ver Fonte

Prepare for DB conversion

Zachary Kotlarek há 9 anos atrás
pai
commit
984edaab8f
2 ficheiros alterados com 26 adições e 0 exclusões
  1. 0 0
      web/includes/tvdb_update.php
  2. 26 0
      web/load.php

+ 0 - 0
web/tvdb.php → web/includes/tvdb_update.php


+ 26 - 0
web/load.php

@@ -0,0 +1,26 @@
+#!/usr/local/bin/php
+<?php
+
+set_time_limit(0);
+require_once 'includes/main.php';
+require_once 'includes/tvdb_update.php';
+
+# Allow single-ID use
+if ($argv[1]) {
+	return tvdb_update($argv[1], true);
+}
+
+# Update all series
+$all_series = allSeriesSeasons(TV_PATH, false);
+foreach ($all_series as $series => $seasons) {
+        $flags = readFlags($series);
+	if (!$flags['tvdb-id']) {
+		echo 'No TVDB ID for: ' . $series . "\n";
+		continue;
+	}
+
+	echo 'Updating: ' . $series . ' (' . $flags['tvdb-id'] . ")\n";
+	tvdb_update($flags['tvdb-id']);
+}
+
+?>