Skip to content

Commit

Permalink
Feat: Scan Implemented
Browse files Browse the repository at this point in the history
This feature enables us to find unregistered files inside the paths.
Initial Implementation
  • Loading branch information
jy95 committed Aug 26, 2017
1 parent 0b94dbe commit 46ebf93
Show file tree
Hide file tree
Showing 16 changed files with 1,404 additions and 94 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -62,4 +62,8 @@ lib

# intellij files
*.iml
.idea
.idea

# test folders
test/folder1
test/folder2
105 changes: 92 additions & 13 deletions docs/TorrentLibrary.html
Expand Up @@ -24,7 +24,7 @@
<label for="nav-trigger" class="overlay"></label>

<nav>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="TorrentLibrary.html">TorrentLibrary</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#.listVideosExtension">listVideosExtension</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#addNewPath">addNewPath</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#hasPathsProvidedByUser">hasPathsProvidedByUser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#scan">scan</a></span></li><li class="nav-heading">Externals</li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-Promise.html">Promise</a></span></li><li class="nav-heading"><a href="global.html">Globals</a></li>
<li class="nav-link nav-home-link"><a href="index.html">Home</a></li><li class="nav-heading">Classes</li><li class="nav-heading"><span class="nav-item-type type-class">C</span><span class="nav-item-name"><a href="TorrentLibrary.html">TorrentLibrary</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#.listVideosExtension">listVideosExtension</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#addNewPath">addNewPath</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#hasPathsProvidedByUser">hasPathsProvidedByUser</a></span></li><li class="nav-item"><span class="nav-item-type type-function">F</span><span class="nav-item-name"><a href="TorrentLibrary.html#scan">scan</a></span></li><li class="nav-heading">Externals</li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-access.html">access</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-difference.html">difference</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-FileHound.html">FileHound</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-nameParser.html">nameParser</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-Promise.html">Promise</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-uniq.html">uniq</a></span></li><li class="nav-heading"><span class="nav-item-type type-external">E</span><span class="nav-item-name"><a href="external-videosExtension.html">videosExtension</a></span></li><li class="nav-heading"><a href="global.html">Globals</a></li>
</nav>

<div id="main">
Expand Down Expand Up @@ -103,7 +103,7 @@ <h4 class="name" id="TorrentLibrary"><span class="type-signature"></span>new Tor

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line101">line 101</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line131">line 131</a>
</li></ul></dd>


Expand Down Expand Up @@ -219,7 +219,7 @@ <h4 class="name" id=".MOVIES_TYPE"><span class="type-signature">(static) </span>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line108">line 108</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line138">line 138</a>
</li></ul></dd>


Expand Down Expand Up @@ -283,7 +283,7 @@ <h4 class="name" id=".TV_SERIES_TYPE"><span class="type-signature">(static) </sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line114">line 114</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line146">line 146</a>
</li></ul></dd>


Expand All @@ -300,6 +300,85 @@ <h4 class="name" id=".TV_SERIES_TYPE"><span class="type-signature">(static) </sp



</div>



<div class="section-members">
<h4 class="name" id="categoryForFile"><span class="type-signature"></span>categoryForFile<span class="type-signature"> :Map</span></h4>




<div class="description">
Mapping filepath => category
</div>





<dl class="details">


























<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line184">line 184</a>
</li></ul></dd>







</dl>



<h5>Type:</h5>
<ul>
<li>

<span class="param-type"><code>Map</code></span>


</li>
</ul>





<h5>Example</h5>

<pre class="prettyprint"><code>{ "D:\somePath\Captain Russia The Summer Soldier (2014) 1080p BrRip x264.MKV" => TorrentLibrary.MOVIES_TYPE }</code></pre>


</div>


Expand Down Expand Up @@ -352,7 +431,7 @@ <h4 class="name" id="defaultPath"><span class="type-signature"></span>defaultPat

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line126">line 126</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line160">line 160</a>
</li></ul></dd>


Expand Down Expand Up @@ -431,7 +510,7 @@ <h4 class="name" id="paths"><span class="type-signature"></span>paths<span class

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line135">line 135</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line169">line 169</a>
</li></ul></dd>


Expand Down Expand Up @@ -510,7 +589,7 @@ <h4 class="name" id="stores"><span class="type-signature"></span>stores<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line140">line 140</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line174">line 174</a>
</li></ul></dd>


Expand Down Expand Up @@ -597,7 +676,7 @@ <h4 class="name" id=".listVideosExtension"><span class="type-signature">(static)

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line155">line 155</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line272">line 272</a>
</li></ul></dd>


Expand Down Expand Up @@ -715,7 +794,7 @@ <h4 class="name" id="addNewPath"><span class="type-signature"></span>addNewPath<

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line170">line 170</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line287">line 287</a>
</li></ul></dd>


Expand Down Expand Up @@ -832,7 +911,7 @@ <h5>Returns:</h5>


<div class="param-desc">
On success the promise will be resolved with "All paths were added!"<br>On error the promise will be rejected with an "Missing parameter" if the argument is missing<br>or "Cannot find/read a path" if one of the provided paths doesn't exist or is not readable<br>
On success the promise will be resolved with "All paths were added!"<br>On error the promise will be rejected with an Error object "Missing parameter" if the argument is missing<br>or an Error object from fs <br>
</div>


Expand Down Expand Up @@ -900,7 +979,7 @@ <h4 class="name" id="hasPathsProvidedByUser"><span class="type-signature"></span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line198">line 198</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line314">line 314</a>
</li></ul></dd>


Expand Down Expand Up @@ -1000,7 +1079,7 @@ <h4 class="name" id="scan"><span class="type-signature"></span>scan<span class="

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line206">line 206</a>
<a href="TorrentLibrary.js.html">TorrentLibrary.js</a>, <a href="TorrentLibrary.js.html#line322">line 322</a>
</li></ul></dd>


Expand Down Expand Up @@ -1061,7 +1140,7 @@ <h4 class="name" id="scan"><span class="type-signature"></span>scan<span class="
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Sat Aug 26 2017 02:36:48 GMT+0200 (Romance Daylight Time) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Sat Aug 26 2017 19:02:13 GMT+0200 (Romance Daylight Time) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down

0 comments on commit 46ebf93

Please sign in to comment.