Skip to content

Commit 3926f0e

Browse files
authored
Merge pull request #196 from HaveAGitGat/dev
Dev 1.107
2 parents 2be26dc + 67cf96b commit 3926f0e

File tree

23 files changed

+958
-643
lines changed

23 files changed

+958
-643
lines changed

Docker_files/Alpine/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ RUN export uid=1000 gid=1000 && \
3131
USER Tdarr
3232
ENV HOME /home/Tdarr
3333

34+
RUN cp /usr/bin/ffmpeg /app/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
3435

3536
EXPOSE 8265
3637
WORKDIR /app/Tdarr/bundle

Docker_files/Ubuntu/Dockerfile

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
FROM ubuntu:18.04
22

3-
# Replace 1000 with your user / group idd
3+
# Replace 1000 with your user / group id
4+
45

56
ENV DEBIAN_FRONTEND=noninteractive
67

7-
RUN apt-get update
88
RUN apt-get update && apt-get install -y git-core subversion build-essential gcc-multilib sudo
99

10-
RUN mkdir -p /home/Tdarr && \
10+
RUN export uid=1000 gid=1000 && \
11+
mkdir -p /home/Tdarr && \
1112
mkdir -p /home/Tdarr/media && \
1213
mkdir -p /temp && \
1314
echo "Tdarr:x:${uid}:${gid}:Tdarr,,,:/home/Tdarr:/bin/bash" >> /etc/passwd && \
@@ -18,7 +19,6 @@ RUN mkdir -p /home/Tdarr && \
1819
chown ${uid}:${gid} -R /temp
1920

2021

21-
2222
RUN apt-get install dbus-x11 packagekit-gtk3-module libcanberra-gtk-module -y
2323
RUN apt-get install dbus libnotify4 libnss3 libxss1 xdg-utils trash-cli trash-cli libglib2.0-bin gvfs-bin -y
2424

@@ -29,6 +29,7 @@ RUN apt install nodejs
2929

3030
RUN apt-get install -y software-properties-common && apt-get update
3131
RUN add-apt-repository ppa:jonathonf/ffmpeg-4 && apt-get update && apt-get -y install ubuntu-restricted-extras
32+
RUN sudo apt-get --allow-releaseinfo-change update
3233
RUN sudo add-apt-repository ppa:stebbins/handbrake-releases && apt-get update
3334
RUN apt-get -y install handbrake-cli ffmpeg libavcodec-extra libdvdnav4 libdvdread4 libavcodec-extra57 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly ubuntu-restricted-extras
3435

@@ -46,15 +47,24 @@ ENV HOME /home/Tdarr
4647
ADD Tdarr $HOME/Tdarr
4748

4849
COPY ./mongodb /etc/init.d/mongodb
50+
COPY ./HandBrakeCLI /usr/local/bin/HandBrakeCLI
51+
52+
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/fileScanner/ccextractor/ccextractor
53+
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/fileScanner/ccextractor/ccextractor
54+
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/fileScanner/ccextractor/ccextractor
4955

50-
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ccextractor/ccextractor
51-
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ccextractor/ccextractor
52-
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ccextractor/ccextractor
5356

57+
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg345/ffmpeg
58+
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg345/ffmpeg
59+
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg345/ffmpeg
5460

55-
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
56-
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
57-
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
61+
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
62+
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
63+
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
64+
65+
RUN sudo chown -R $USER:$USER /usr/local/bin/HandBrakeCLI
66+
RUN sudo chmod +x /usr/local/bin/HandBrakeCLI
67+
RUN sudo chmod a+rwx /usr/local/bin/HandBrakeCLI
5868

5969

6070
ENV ROOT_URL http://localhost
@@ -70,3 +80,4 @@ CMD sudo service mongodb start && \
7080

7181

7282

83+

imports/ui/App.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import TabPlugins from './plugins/tab_Plugins.jsx';
2222
import TabSearch from './tab_Search.jsx';
2323
import TabTranscoding from './transcoding/tab_Transcoding.jsx';
2424
import TabBackups from './tab_Backups.jsx';
25+
import TabHire from './tab_Hire.jsx';
2526

2627
const tabs = [
2728
{path: '/tdarr/', text: 'Tdarr', component: TabTranscoding},
@@ -33,7 +34,9 @@ const tabs = [
3334
{path: '/logs/', text: 'Logs', component: TabLog},
3435
{path: '/help/', text: 'Help', component: TabHelp},
3536
{path: '/backups/', text: 'Backups', component: TabBackups},
37+
{path: '/hire/', text: 'Hire', component: TabHire},
3638
{path: '/', text: 'Dev', component: TabDev},
39+
3740
];
3841

3942
export default AppRouter = () => {
@@ -44,7 +47,7 @@ export default AppRouter = () => {
4447

4548
const [currentVersion, setVersion] = React.useState('');
4649

47-
const [newVersion, setNewVersion] = React.useState(1.106);
50+
const [newVersion, setNewVersion] = React.useState(1.107);
4851

4952

5053

imports/ui/libraries/tab_Libraries.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class App extends Component {
7878
containerFilter:"mkv,mp4,mov,m4v,mpg,mpeg,avi,flv,webm,wmv,vob,evo,iso,m2ts,ts",
7979
createdAt: new Date(),
8080
folderWatching:false,
81+
useFsEvents:false,
8182
processLibrary:true,
8283
scanOnStart:true,
8384
scanButtons:true,
@@ -754,7 +755,7 @@ class App extends Component {
754755
));
755756

756757

757-
return <div className="tabWrap" > <Tabs selectedIndex={ this.state.selectedLibrary != undefined ? this.state.selectedLibrary : 0} onSelect={tabIndex => {
758+
return <div className="tabWrapLib" > <Tabs selectedIndex={ this.state.selectedLibrary != undefined ? this.state.selectedLibrary : 0} onSelect={tabIndex => {
758759

759760
this.setState({selectedLibrary: tabIndex})
760761
}}>
@@ -778,6 +779,7 @@ class App extends Component {
778779

779780

780781
<div className="containerGeneral">
782+
<div className="tabWrap" >
781783
<center>
782784
<header>
783785
<h1>Libraries</h1>
@@ -809,12 +811,14 @@ class App extends Component {
809811
<LocalImage link="/images/example_folder_browser.png"/>
810812

811813
<p>Make sure to set a transcode cache folder</p>
814+
812815
<p></p>
813816

814817
<p>'Scan (Find new)' does 2 things - it removes files from the database which don't exist anymore, and adds newly detected files. Turn on 'Folder watch' to automate this process. New files will be scanned for every 30 seconds or so.</p>
815818
<p>All new files will be added to both the transcode queues and the health check queues. If you're not interested in using one or the other, then just make sure not to fire up any workers for that respective queue.</p>
816819

817820
<p></p>
821+
<p>If the 'Scan on start' option is turned on, Tdarr will scan the library on start-up and then scan the library daily.</p>
818822
<p></p>
819823
<p></p>
820824
<p>In the library transcode settings, you can either use plugins or manually set either video file or audio file transcode settings.</p>
@@ -854,7 +858,7 @@ class App extends Component {
854858
<p>-Z "Fast 1080p30" -e nvenc_h265 </p>
855859
<p>-Z "Very Fast 1080p30" --all-subtitles --all-audio</p>
856860
<p>-Z "Very Fast 480p30"</p>
857-
<p>--preset-import-file "C:\Users\HaveAGitGat\Desktop\testpreset.json" -Z "My Preset"</p>
861+
<p>--preset-import-file "C:/Users/HaveAGitGat/Desktop/testpreset.json" -Z "My Preset"</p>
858862

859863
<p>You can learn more about HandBrake presets here:</p>
860864

@@ -896,6 +900,7 @@ class App extends Component {
896900
{this.renderLibraries()}
897901

898902
</div>
903+
</div>
899904
);
900905
}
901906
}

imports/ui/libraries/tab_Libraries_Folder.jsx

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var libButtonStyle = {
2626

2727

2828
var tabCol1 = {
29-
width:'200px',
29+
width: '200px',
3030
};
3131

3232
const override = css``;
@@ -95,7 +95,7 @@ class Folder extends Component {
9595

9696
componentWillUnmount() {
9797
clearInterval(this.interval2);
98-
}
98+
}
9999

100100

101101

@@ -415,31 +415,31 @@ class Folder extends Component {
415415

416416
<div className="pluginStackGrid">
417417

418-
<div className="pluginStackCol1"><p>Source</p></div>
418+
<div className="pluginStackCol1"><p>Source</p></div>
419419

420-
<div className="pluginStackCol1"><p>Enabled</p></div>
420+
<div className="pluginStackCol1"><p>Enabled</p></div>
421421

422-
<div className="pluginStackCol1"><p>id/Name</p></div>
423-
424-
<div className="pluginStackCol1"><p>Stage</p></div>
422+
<div className="pluginStackCol1"><p>id/Name</p></div>
425423

426-
<div className="pluginStackCol1"><p>Type</p></div>
424+
<div className="pluginStackCol1"><p>Stage</p></div>
427425

428-
<div className="pluginStackCol1"><p>Operation</p></div>
426+
<div className="pluginStackCol1"><p>Type</p></div>
429427

430-
<div className="pluginStackCol1"><p>Description</p></div>
428+
<div className="pluginStackCol1"><p>Operation</p></div>
431429

432-
<div className="pluginStackCol1"><p>Inputs</p></div>
430+
<div className="pluginStackCol1"><p>Description</p></div>
433431

434-
<div className="pluginStackCol1"><p>Priority</p></div>
432+
<div className="pluginStackCol1"><p>Inputs</p></div>
435433

436-
<div className="pluginStackCol1"><p>Remove</p></div>
434+
<div className="pluginStackCol1"><p>Priority</p></div>
437435

438-
{stack}
436+
<div className="pluginStackCol1"><p>Remove</p></div>
439437

438+
{stack}
440439

441440

442-
</div>,document.getElementById(this.props.libraryItem._id + 'PluginStack')
441+
442+
</div>, document.getElementById(this.props.libraryItem._id + 'PluginStack')
443443
);
444444

445445
} catch (err) { console.log(err) }
@@ -874,7 +874,7 @@ class Folder extends Component {
874874

875875
}>Reset stats: This library</Dropdown.Item>
876876

877-
<Dropdown.Item
877+
<Dropdown.Item
878878
style={{ color: '#bb86fc', fontSize: '14px' }}
879879
onClick={() => {
880880
if (
@@ -1029,7 +1029,7 @@ class Folder extends Component {
10291029
<div className="libraryGrid-itemLeft">
10301030
<p
10311031
onClick={() => {
1032-
this.setState({navItemSelected: 'navSourceFolder'})
1032+
this.setState({ navItemSelected: 'navSourceFolder' })
10331033
}}
10341034
style={{ cursor: 'pointer' }}
10351035
className={
@@ -1042,7 +1042,7 @@ class Folder extends Component {
10421042
</p>
10431043
<p
10441044
onClick={() => {
1045-
this.setState({navItemSelected: 'navCacheFolder'})
1045+
this.setState({ navItemSelected: 'navCacheFolder' })
10461046
}}
10471047
style={{ cursor: 'pointer' }}
10481048
className={
@@ -1055,7 +1055,7 @@ class Folder extends Component {
10551055
</p>
10561056
<p
10571057
onClick={() => {
1058-
this.setState({navItemSelected: 'navOutputFolder'})
1058+
this.setState({ navItemSelected: 'navOutputFolder' })
10591059
}}
10601060
style={{ cursor: 'pointer' }}
10611061
className={
@@ -1068,7 +1068,7 @@ class Folder extends Component {
10681068
</p>
10691069
<p
10701070
onClick={() => {
1071-
this.setState({navItemSelected: 'navContainers'})
1071+
this.setState({ navItemSelected: 'navContainers' })
10721072
}}
10731073
style={{ cursor: 'pointer' }}
10741074
className={
@@ -1081,7 +1081,7 @@ class Folder extends Component {
10811081
</p>
10821082
<p
10831083
onClick={() => {
1084-
this.setState({navItemSelected: 'navTranscode'})
1084+
this.setState({ navItemSelected: 'navTranscode' })
10851085
}}
10861086
style={{ cursor: 'pointer' }}
10871087
className={
@@ -1094,7 +1094,7 @@ class Folder extends Component {
10941094
</p>
10951095
<p
10961096
onClick={() => {
1097-
this.setState({navItemSelected: 'navHealthCheck'})
1097+
this.setState({ navItemSelected: 'navHealthCheck' })
10981098
}}
10991099
style={{ cursor: 'pointer' }}
11001100
className={
@@ -1107,7 +1107,7 @@ class Folder extends Component {
11071107
</p>
11081108
<p
11091109
onClick={() => {
1110-
this.setState({navItemSelected: 'navSchedule'})
1110+
this.setState({ navItemSelected: 'navSchedule' })
11111111
}}
11121112
style={{ cursor: 'pointer' }}
11131113
className={
@@ -1159,6 +1159,8 @@ class Folder extends Component {
11591159
</div>
11601160
</div>
11611161

1162+
1163+
11621164
<div>
11631165
<span className="buttonTextSize mr-2">Process Library:</span>
11641166
<div style={libButtonStyle}>
@@ -1295,6 +1297,28 @@ class Folder extends Component {
12951297
></input>
12961298

12971299

1300+
<p></p>
1301+
1302+
<div>
1303+
<span className="buttonTextSize mr-2">Folder watch: Use file system events (try if folder watch polling causes high CPU/disk IO):</span>
1304+
<div style={libButtonStyle}>
1305+
<ToggleButton
1306+
thumbStyle={borderRadiusStyle}
1307+
trackStyle={borderRadiusStyle}
1308+
name="useFsEvents"
1309+
value={!!this.props.libraryItem.useFsEvents || false}
1310+
onToggle={() => {
1311+
SettingsDB.upsert(this.props.libraryItem._id, {
1312+
$set: {
1313+
useFsEvents: !this.props.libraryItem.useFsEvents,
1314+
},
1315+
});
1316+
}}
1317+
/>
1318+
</div>
1319+
</div>
1320+
1321+
12981322

12991323
</div>
13001324

@@ -1511,7 +1535,7 @@ class Folder extends Component {
15111535

15121536
<input
15131537
type="text"
1514-
className="folderPaths2"
1538+
className="folderPaths"
15151539
name="containerFilter"
15161540
defaultValue={this.props.libraryItem.containerFilter}
15171541
onChange={this.handleChange}
@@ -1741,7 +1765,7 @@ class Folder extends Component {
17411765

17421766
<center>
17431767
<p>
1744-
See the 'Plugins' tab guide for how the plugin stack works and for creating plugins.<b>It is best practice to put video transcode plugins at the top of your stack.</b>
1768+
See the 'Plugins' tab guide for how the plugin stack works and for creating plugins.
17451769
</p>
17461770
</center>
17471771

@@ -2073,8 +2097,8 @@ class Folder extends Component {
20732097
<br />
20742098
<br />
20752099

2076-
2077-
{this.renderScheduleBlocks()}
2100+
2101+
{this.renderScheduleBlocks()}
20782102
</div>
20792103
</div>
20802104
</div>

imports/ui/plugins/pluginTemplates/Action/TranscodeCustom.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default class App extends Component {
3232

3333

3434
var preset = ReactDOM.findDOMNode(this.refs.preset).value
35+
preset = preset.replace(/\\/g, "/");
3536

3637
var container = ReactDOM.findDOMNode(this.refs.container).value
3738

@@ -41,6 +42,8 @@ export default class App extends Component {
4142

4243
}
4344

45+
46+
4447

4548
var obj = {
4649
name: 'Custom transcode',
@@ -150,7 +153,7 @@ export default class App extends Component {
150153
<p>-Z "Fast 1080p30" -e nvenc_h265 </p>
151154
<p>-Z "Very Fast 1080p30" --all-subtitles --all-audio</p>
152155
<p>-Z "Very Fast 480p30"</p>
153-
<p>--preset-import-file "C:\Users\HaveAGitGat\Desktop\testpreset.json" -Z "My Preset"</p>
156+
<p>--preset-import-file "C:/Users/HaveAGitGat/Desktop/testpreset.json" -Z "My Preset"</p>
154157

155158
<p>You can learn more about HandBrake presets here:</p>
156159

0 commit comments

Comments
 (0)