Instructions adapted from https://docs.cb-net.co.uk/en/development/deploy-your-own.html
Add environment vars to docker .env file
cd $DOCKER_HOME
{ | |
"ride": { | |
"free_for_limited_time": false, | |
"content_availability": "available", | |
"content_availability_level": "digital_and_above", | |
"is_limited_ride": false, | |
"availability": { "is_available": true, "reason": null }, | |
"class_type_ids": ["c87e20095d80463db5ce04df7fe2b989"], | |
"content_provider": "peloton", | |
"content_format": "video", |
""" | |
This script can be used to attempt to download new videos from a | |
YouTube channel and rename them to a Plex friendly format. | |
ex: s01e01 - Video Title[ID].mp4 | |
s01e01 - Video Title.json | |
s01e01 - Video Title.webp | |
It will skip any videos that are shorter than the specified | |
minimum length (in seconds) to avoid downloading shorts. |
Instructions adapted from https://docs.cb-net.co.uk/en/development/deploy-your-own.html
Add environment vars to docker .env file
cd $DOCKER_HOME
`ffmpeg -i "input.file" -sn -c:a libmp3lame -ar 48000 -ab 128k -ac 2 -c:v mpeg4 -vtag xvid -qscale:v 6 -preset slow "output.file"
Change qscale as desired. It is a number from 1-31, with 1 being highest quality/largest filesize and 31 being the lowest quality/smallest filesize.
The monitor only supports up to 1080p so you might want to downscale higher resolution content.
if(!function_exists('log_it')){ | |
function log_it( $message ) { | |
if( WP_DEBUG === true ){ | |
if( is_array( $message ) || is_object( $message ) ){ | |
error_log( print_r( $message, true ) ); | |
} else { | |
error_log( $message ); | |
} | |
} | |
} |
SELECT i.order_id as "Order #", pm4.meta_value as "Order Completed Date", tm.name as "Order Status", pm.meta_value as "Billing State", pm2.meta_value as "Order Total", pm3.meta_value as "Order Tax" | |
FROM wp_woocommerce_order_items i | |
INNER JOIN wp_postmeta pm | |
on pm.post_id = i.order_id | |
INNER JOIN wp_postmeta pm2 | |
on pm2.post_id = i.order_id | |
INNER JOIN wp_postmeta pm3 | |
on pm3.post_id = i.order_id | |
INNER JOIN wp_postmeta pm4 | |
on pm4.post_id = i.order_id |
SELECT i.order_id as "Order #", tm.name as "Order Status", pm.meta_value as "Customer", i.order_item_name as "Subscription Type", m3.meta_value as "Subscription Status", m.meta_value as "Start Date", m2.meta_value as "End Date", m4.meta_value as "Expiry Date", m5.meta_value as "Trial Expiry Date", m6.meta_value as "Completed Payments" | |
FROM wp_woocommerce_order_items i | |
INNER JOIN wp_woocommerce_order_itemmeta m | |
on m.order_item_id = i.order_item_id | |
INNER JOIN wp_woocommerce_order_itemmeta m2 | |
on m2.order_item_id = i.order_item_id | |
INNER JOIN wp_woocommerce_order_itemmeta m3 | |
on m3.order_item_id = i.order_item_id | |
INNER JOIN wp_woocommerce_order_itemmeta m4 | |
on m4.order_item_id = i.order_item_id |
UPDATE wp_posts p | |
INNER JOIN wp_postmeta m2 | |
ON m2.post_id = p.id | |
AND m2.meta_key = 'product_ids' | |
SET p.post_excerpt='groupon' | |
WHERE p.post_type='shop_coupon' | |
AND ( m2.meta_value='xxx' OR m2.meta_value='yyyy' ) |
add_filter( 'woocommerce_coupon_code', 'create_coupon' ); | |
function create_coupon ( $coupon ) { | |
if ( '' != $coupon ) { | |
//$the_coupon = new WC_Coupon( $coupon ); | |
if ( ! $the_coupon->id ) { | |
$coupon_data = array( |
I hereby claim:
To claim this, I am signing this object: