Skip to content

Commit

Permalink
config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gallayl committed Jun 3, 2024
1 parent ff1c290 commit 128fd1e
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 19 deletions.
18 changes: 17 additions & 1 deletion common/src/models/config/movies-config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
export interface MoviesConfig {
id: 'MOVIES_CONFIG'
value: {
/**
* Search .nfo files for imdb id
*/
enableNfoParsing: boolean

/**
* 'all' or a list of directories to watch for new movies.
*/
watchFiles: 'all' | Array<{ drive: string; path: string }>
watchFiles:
| 'all'
| Array<{
/**
* The drive to watch
*/
drive: string
/**
* An optional path filter. If not set, all files in the drive will be watched.
*/
path?: string
}>
}
}
14 changes: 14 additions & 0 deletions common/src/models/config/omdb-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
export interface OmdbConfig {
/**
* Configuration entry for the OMDB API
*/
id: 'OMDB_CONFIG'
value: {
/**
* The API key for the OMDB API, can be requested at https://www.omdbapi.com/
*/
apiKey: string
/**
* If a movie / series entry is added, try to search for the movie from data extracted from the file name (e.g.: title, year, season, episode, etc...)
*/
trySearchMovieFromTitle: boolean
/**
* If a new imdb id is added, download the metadata automatically
*/
autoDownloadMetadata: boolean
}
}
107 changes: 89 additions & 18 deletions common/src/models/media/arch.dio
Original file line number Diff line number Diff line change
@@ -1,44 +1,115 @@
<mxfile host="65bd71144e">
<diagram id="BJ3E8tSsQ_AqJaKTDWiC" name="Page-1">
<mxGraphModel dx="832" dy="563" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<mxGraphModel dx="1204" dy="562" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="5" value="" style="shape=flexArrow;endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="200" y="110" as="sourcePoint"/>
<mxPoint x="300" y="110" as="targetPoint"/>
<mxCell id="33" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="120" y="240" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="10" value="isMediaFile?" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="5">
<mxGeometry x="-0.304" y="1" relative="1" as="geometry">
<mxPoint x="15" y="-29" as="offset"/>
<mxCell id="35" value="opened: isMovieFile?" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="33">
<mxGeometry x="0.4057" y="-3" relative="1" as="geometry">
<mxPoint as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="6" value="FileEntry" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="160" height="120" as="geometry"/>
<mxCell id="6" value="FileEntry" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="40" y="40" width="160" height="120" as="geometry">
<mxRectangle x="40" y="40" width="90" height="30" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="7" value="Drive + Path info" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6">
<mxCell id="7" value="Drive + Path info" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="6" vertex="1">
<mxGeometry y="30" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="8" value="Extension" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6">
<mxCell id="8" value="Extension" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="6" vertex="1">
<mxGeometry y="60" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="9" value="Can be opened" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="6">
<mxCell id="9" value="Can be opened" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="6" vertex="1">
<mxGeometry y="90" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="11" value="MediaFile" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="300" y="40" width="140" height="120" as="geometry"/>
<mxCell id="22" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.511;exitY=1.048;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="14" target="25">
<mxGeometry relative="1" as="geometry">
<mxPoint x="600" y="250" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="26" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="27">
<mxGeometry relative="1" as="geometry">
<mxPoint x="680" y="320" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="28" value="isSeries?" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="26">
<mxGeometry x="0.3072" y="-1" relative="1" as="geometry">
<mxPoint as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="11" value="MovieFile" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="530" y="40" width="140" height="120" as="geometry"/>
</mxCell>
<mxCell id="12" value="Item 1" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="11">
<mxCell id="12" value="drive" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="11" vertex="1">
<mxGeometry y="30" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="13" value="Item 2" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="11">
<mxCell id="13" value="path" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="11" vertex="1">
<mxGeometry y="60" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="14" value="Item 3" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="11">
<mxCell id="14" value="imdbId" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" parent="11" vertex="1">
<mxGeometry y="90" width="140" height="30" as="geometry"/>
</mxCell>
<mxCell id="21" style="edgeStyle=none;html=1;" edge="1" parent="1" source="15" target="13">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="15" value="Extract imdb id from&lt;br&gt;.nfo / OMDB" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="320" y="40" width="120" height="120" as="geometry"/>
</mxCell>
<mxCell id="19" style="edgeStyle=none;html=1;" edge="1" parent="1" source="8">
<mxGeometry relative="1" as="geometry">
<mxPoint x="320" y="100" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="20" value="isMovieFile?" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="19">
<mxGeometry x="-0.1693" y="-1" relative="1" as="geometry">
<mxPoint as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="31" style="edgeStyle=none;html=1;" edge="1" parent="1" source="25" target="32">
<mxGeometry relative="1" as="geometry">
<mxPoint x="480" y="440" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="25" value="Fetch movie&lt;br&gt;&amp;nbsp;metadata from OMDB" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="420" y="310" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="29" style="edgeStyle=none;html=1;" edge="1" parent="1" source="27" target="30">
<mxGeometry relative="1" as="geometry">
<mxPoint x="680" y="440" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="27" value="Fetch series metadata from OMDB" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="310" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="30" value="Build Series entry" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="620" y="420" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="32" value="Build Movie entry" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="420" y="420" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="36" value="VideoWatchProgress" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=40;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="40" y="240" width="160" height="160" as="geometry">
<mxRectangle x="40" y="240" width="150" height="30" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="37" value="drive" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="36">
<mxGeometry y="40" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="38" value="path" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="36">
<mxGeometry y="70" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="39" value="watchedSeconds" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="36">
<mxGeometry y="100" width="160" height="30" as="geometry"/>
</mxCell>
<mxCell id="41" value="userName" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;" vertex="1" parent="36">
<mxGeometry y="130" width="160" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
Expand Down

0 comments on commit 128fd1e

Please sign in to comment.