Skip to content

Commit

Permalink
Merge pull request #196 from HaveAGitGat/dev
Browse files Browse the repository at this point in the history
Dev 1.107
  • Loading branch information
HaveAGitGat authored Apr 4, 2020
2 parents 2be26dc + 67cf96b commit 3926f0e
Show file tree
Hide file tree
Showing 23 changed files with 958 additions and 643 deletions.
1 change: 1 addition & 0 deletions Docker_files/Alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ RUN export uid=1000 gid=1000 && \
USER Tdarr
ENV HOME /home/Tdarr

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

EXPOSE 8265
WORKDIR /app/Tdarr/bundle
Expand Down
31 changes: 21 additions & 10 deletions Docker_files/Ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM ubuntu:18.04

# Replace 1000 with your user / group idd
# Replace 1000 with your user / group id


ENV DEBIAN_FRONTEND=noninteractive

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

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



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

Expand All @@ -29,6 +29,7 @@ RUN apt install nodejs

RUN apt-get install -y software-properties-common && apt-get update
RUN add-apt-repository ppa:jonathonf/ffmpeg-4 && apt-get update && apt-get -y install ubuntu-restricted-extras
RUN sudo apt-get --allow-releaseinfo-change update
RUN sudo add-apt-repository ppa:stebbins/handbrake-releases && apt-get update
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

Expand All @@ -46,15 +47,24 @@ ENV HOME /home/Tdarr
ADD Tdarr $HOME/Tdarr

COPY ./mongodb /etc/init.d/mongodb
COPY ./HandBrakeCLI /usr/local/bin/HandBrakeCLI

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

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

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

RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg
RUN sudo chown -R $USER:$USER $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
RUN sudo chmod +x $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg
RUN sudo chmod a+rwx $HOME/Tdarr/bundle/programs/server/assets/app/ffmpeg/ffmpeg42/ffmpeg

RUN sudo chown -R $USER:$USER /usr/local/bin/HandBrakeCLI
RUN sudo chmod +x /usr/local/bin/HandBrakeCLI
RUN sudo chmod a+rwx /usr/local/bin/HandBrakeCLI


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




5 changes: 4 additions & 1 deletion imports/ui/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import TabPlugins from './plugins/tab_Plugins.jsx';
import TabSearch from './tab_Search.jsx';
import TabTranscoding from './transcoding/tab_Transcoding.jsx';
import TabBackups from './tab_Backups.jsx';
import TabHire from './tab_Hire.jsx';

const tabs = [
{path: '/tdarr/', text: 'Tdarr', component: TabTranscoding},
Expand All @@ -33,7 +34,9 @@ const tabs = [
{path: '/logs/', text: 'Logs', component: TabLog},
{path: '/help/', text: 'Help', component: TabHelp},
{path: '/backups/', text: 'Backups', component: TabBackups},
{path: '/hire/', text: 'Hire', component: TabHire},
{path: '/', text: 'Dev', component: TabDev},

];

export default AppRouter = () => {
Expand All @@ -44,7 +47,7 @@ export default AppRouter = () => {

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

const [newVersion, setNewVersion] = React.useState(1.106);
const [newVersion, setNewVersion] = React.useState(1.107);



Expand Down
9 changes: 7 additions & 2 deletions imports/ui/libraries/tab_Libraries.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class App extends Component {
containerFilter:"mkv,mp4,mov,m4v,mpg,mpeg,avi,flv,webm,wmv,vob,evo,iso,m2ts,ts",
createdAt: new Date(),
folderWatching:false,
useFsEvents:false,
processLibrary:true,
scanOnStart:true,
scanButtons:true,
Expand Down Expand Up @@ -754,7 +755,7 @@ class App extends Component {
));


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

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


<div className="containerGeneral">
<div className="tabWrap" >
<center>
<header>
<h1>Libraries</h1>
Expand Down Expand Up @@ -809,12 +811,14 @@ class App extends Component {
<LocalImage link="/images/example_folder_browser.png"/>

<p>Make sure to set a transcode cache folder</p>

<p></p>

<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>
<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>

<p></p>
<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>
<p></p>
<p></p>
<p>In the library transcode settings, you can either use plugins or manually set either video file or audio file transcode settings.</p>
Expand Down Expand Up @@ -854,7 +858,7 @@ class App extends Component {
<p>-Z "Fast 1080p30" -e nvenc_h265 </p>
<p>-Z "Very Fast 1080p30" --all-subtitles --all-audio</p>
<p>-Z "Very Fast 480p30"</p>
<p>--preset-import-file "C:\Users\HaveAGitGat\Desktop\testpreset.json" -Z "My Preset"</p>
<p>--preset-import-file "C:/Users/HaveAGitGat/Desktop/testpreset.json" -Z "My Preset"</p>

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

Expand Down Expand Up @@ -896,6 +900,7 @@ class App extends Component {
{this.renderLibraries()}

</div>
</div>
);
}
}
Expand Down
78 changes: 51 additions & 27 deletions imports/ui/libraries/tab_Libraries_Folder.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var libButtonStyle = {


var tabCol1 = {
width:'200px',
width: '200px',
};

const override = css``;
Expand Down Expand Up @@ -95,7 +95,7 @@ class Folder extends Component {

componentWillUnmount() {
clearInterval(this.interval2);
}
}



Expand Down Expand Up @@ -415,31 +415,31 @@ class Folder extends Component {

<div className="pluginStackGrid">

<div className="pluginStackCol1"><p>Source</p></div>
<div className="pluginStackCol1"><p>Source</p></div>

<div className="pluginStackCol1"><p>Enabled</p></div>
<div className="pluginStackCol1"><p>Enabled</p></div>

<div className="pluginStackCol1"><p>id/Name</p></div>

<div className="pluginStackCol1"><p>Stage</p></div>
<div className="pluginStackCol1"><p>id/Name</p></div>

<div className="pluginStackCol1"><p>Type</p></div>
<div className="pluginStackCol1"><p>Stage</p></div>

<div className="pluginStackCol1"><p>Operation</p></div>
<div className="pluginStackCol1"><p>Type</p></div>

<div className="pluginStackCol1"><p>Description</p></div>
<div className="pluginStackCol1"><p>Operation</p></div>

<div className="pluginStackCol1"><p>Inputs</p></div>
<div className="pluginStackCol1"><p>Description</p></div>

<div className="pluginStackCol1"><p>Priority</p></div>
<div className="pluginStackCol1"><p>Inputs</p></div>

<div className="pluginStackCol1"><p>Remove</p></div>
<div className="pluginStackCol1"><p>Priority</p></div>

{stack}
<div className="pluginStackCol1"><p>Remove</p></div>

{stack}


</div>,document.getElementById(this.props.libraryItem._id + 'PluginStack')

</div>, document.getElementById(this.props.libraryItem._id + 'PluginStack')
);

} catch (err) { console.log(err) }
Expand Down Expand Up @@ -874,7 +874,7 @@ class Folder extends Component {

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

<Dropdown.Item
<Dropdown.Item
style={{ color: '#bb86fc', fontSize: '14px' }}
onClick={() => {
if (
Expand Down Expand Up @@ -1029,7 +1029,7 @@ class Folder extends Component {
<div className="libraryGrid-itemLeft">
<p
onClick={() => {
this.setState({navItemSelected: 'navSourceFolder'})
this.setState({ navItemSelected: 'navSourceFolder' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1042,7 +1042,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navCacheFolder'})
this.setState({ navItemSelected: 'navCacheFolder' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1055,7 +1055,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navOutputFolder'})
this.setState({ navItemSelected: 'navOutputFolder' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1068,7 +1068,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navContainers'})
this.setState({ navItemSelected: 'navContainers' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1081,7 +1081,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navTranscode'})
this.setState({ navItemSelected: 'navTranscode' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1094,7 +1094,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navHealthCheck'})
this.setState({ navItemSelected: 'navHealthCheck' })
}}
style={{ cursor: 'pointer' }}
className={
Expand All @@ -1107,7 +1107,7 @@ class Folder extends Component {
</p>
<p
onClick={() => {
this.setState({navItemSelected: 'navSchedule'})
this.setState({ navItemSelected: 'navSchedule' })
}}
style={{ cursor: 'pointer' }}
className={
Expand Down Expand Up @@ -1159,6 +1159,8 @@ class Folder extends Component {
</div>
</div>



<div>
<span className="buttonTextSize mr-2">Process Library:</span>
<div style={libButtonStyle}>
Expand Down Expand Up @@ -1295,6 +1297,28 @@ class Folder extends Component {
></input>


<p></p>

<div>
<span className="buttonTextSize mr-2">Folder watch: Use file system events (try if folder watch polling causes high CPU/disk IO):</span>
<div style={libButtonStyle}>
<ToggleButton
thumbStyle={borderRadiusStyle}
trackStyle={borderRadiusStyle}
name="useFsEvents"
value={!!this.props.libraryItem.useFsEvents || false}
onToggle={() => {
SettingsDB.upsert(this.props.libraryItem._id, {
$set: {
useFsEvents: !this.props.libraryItem.useFsEvents,
},
});
}}
/>
</div>
</div>



</div>

Expand Down Expand Up @@ -1511,7 +1535,7 @@ class Folder extends Component {

<input
type="text"
className="folderPaths2"
className="folderPaths"
name="containerFilter"
defaultValue={this.props.libraryItem.containerFilter}
onChange={this.handleChange}
Expand Down Expand Up @@ -1741,7 +1765,7 @@ class Folder extends Component {

<center>
<p>
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>
See the 'Plugins' tab guide for how the plugin stack works and for creating plugins.
</p>
</center>

Expand Down Expand Up @@ -2073,8 +2097,8 @@ class Folder extends Component {
<br />
<br />

{this.renderScheduleBlocks()}

{this.renderScheduleBlocks()}
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class App extends Component {


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

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

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

}




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

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

Expand Down
Loading

0 comments on commit 3926f0e

Please sign in to comment.