<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/off.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/off.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/tmdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/tmdb.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1605087787424" duration="33487000" />
<workItem from="1605261347643" duration="1199000" />
<workItem from="1605342171398" duration="4613000" />
- <workItem from="1605355486465" duration="19020000" />
- </task>
- <task id="LOCAL-00351" summary=".">
- <created>1603560058397</created>
- <option name="number" value="00351" />
- <option name="presentableId" value="LOCAL-00351" />
- <option name="project" value="LOCAL" />
- <updated>1603560058397</updated>
+ <workItem from="1605355486465" duration="22961000" />
</task>
<task id="LOCAL-00352" summary=".">
<created>1603560834622</created>
<option name="project" value="LOCAL" />
<updated>1605437322206</updated>
</task>
- <option name="localTasksCounter" value="400" />
+ <task id="LOCAL-00400" summary=".">
+ <created>1605437456015</created>
+ <option name="number" value="00400" />
+ <option name="presentableId" value="LOCAL-00400" />
+ <option name="project" value="LOCAL" />
+ <updated>1605437456015</updated>
+ </task>
+ <option name="localTasksCounter" value="401" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="LAST_COMMIT_MESSAGE" value="." />
</component>
<component name="WindowStateProjectService">
- <state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0" timestamp="1604146905948">
- <screen x="0" y="0" width="1707" height="920" />
+ <state x="1110" y="259" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0" timestamp="1605437484620">
+ <screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
- <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605437318597">
+ <state x="1110" y="259" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.2560.1040@0.0.2560.1040" timestamp="1605437484620" />
+ <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605437453046">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
<state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1605188136787" />
- <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605437318597" />
+ <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605437453046" />
<state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605104496549">
<screen x="0" y="0" width="2560" height="1040" />
</state>
protected $tvShows = [];
protected $force = false;
+ protected $tmdbclient;
+ protected $find;
public function __construct($directories, $force = false)
{
$this->force = $force;
+
+ $this->tmdbclient = getTmbdClient();
+ $this->find = $this->tmdbclient->getFindApi();
+
foreach ($directories as $directory) {
if ($directory['context'] != 'tvshow') {
continue;
@rename($f->getPathname(), str_replace('.tmbd.id', '.tmdb.id', $f->getPathname()));
continue;
}
+ if ($f->isDir() && !file_exists($f->getPath() . '/.tmdb.id') && strpos($f->getPath(), '.tt') !== false) {
+
+ $e = explode('.', $f->getPath());
+ $last = array_pop($e);
+ $r = $this->find->findBy($last, ['external_source' => 'imdb_id']);
+
+ foreach ($r['tv_results'] as $tv_result) {
+ if (isset($tv_result['id'])) {
+ file_put_contents($f->getPath() . '/.tmdb.id', $tv_result['id']);
+ break;
+ }
+ }
+ continue;
+ }
if ($f->isDir() || strpos($f->getFilename(), '.tmdb.id') === false) {
continue;
}