Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#### Media file processing script for Filebot
# This script gets triggered by some means (inotify, auditd, cron, etc.) and processes media files in some locations.
# It will run the filebot amc.groovy script against these files and output them into user defined locations for HTPC use.
#
# Known Limitations:
# Not dealing with music files, just video files. I use beets for music tagging.
# Not dealing with unique video types just yet, such as comedy specials, concerts, etc. Filebot might match it okay but I am not confident about it.
@dennisoderwald
dennisoderwald / playercorefactory.xml
Created July 26, 2020 12:19 — forked from mrPrateek95/playercorefactory.xml
Make VLC as the default player on your Kodi Mac
<playercorefactory>
<players>
<player name="VLC" type="ExternalPlayer" audio="false" video="true">
<filename>/Applications/VLC.app/Contents/MacOS/VLC</filename>
<args>--video-on-top --play-and-exit</args>
<hidexbmc>true</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule video="true" player="VLC"/>
@dennisoderwald
dennisoderwald / CanBeReplicated.php
Created July 14, 2019 12:54 — forked from mpociot/CanBeReplicated.php
Add the ability to replicate Laravel models to other models.
<?php
use Illuminate\Support\Arr;
trait CanBeReplicated
{
public function replicateTo(string $model, array $with = null, array $except = null)
{
$defaults = [
$this->getKeyName(),
@dennisoderwald
dennisoderwald / error_blade_directive.php
Created March 30, 2019 14:09 — forked from calebporzio/error_blade_directive.php
A little Blade directive to make working with validation errors a bit nicer.
<?php
// Usage:
// Before
@if ($errors->has('email'))
<span>{{ $errors->first('email') }}</span>
@endif
// After:
@dennisoderwald
dennisoderwald / app.php
Created May 16, 2016 12:57 — forked from ciarans/app.php
Add Graylog to Laravel
$app->configureMonologUsing(function($monolog) {
$transport = new \Gelf\Transport\UdpTransport("192.168.99.100", 12201, \Gelf\Transport\UdpTransport::CHUNK_SIZE_LAN);
$publisher = new \Gelf\Publisher();
$publisher->addTransport($transport);
$monolog->pushHandler(new \Monolog\Handler\GelfHandler($publisher));
});
@dennisoderwald
dennisoderwald / Meta.php
Created August 15, 2014 09:37
morphMany Issue (Now I receive a JSON output with the filtered object, when I call: $model->metas->meta_key)
<?php
class Meta extends Eloquent {
public function newCollection(array $models = array())
{
return new MetaCollection($models);
}
}
@dennisoderwald
dennisoderwald / Resort.php
Created August 15, 2014 09:10
morphMany Issue
<?php
class Resort extends Eloquent {
public function metas()
{
return $this->morphMany('Meta', 'metable')->lists('value', 'key');
}
}