Skip to content

Instantly share code, notes, and snippets.

@AlexNodex
AlexNodex / plex-fix.sh
Last active May 23, 2023 12:35
Update plex metadata after a new server install / moving server
sudo service plexmediaserver stop
sudo /usr/lib/plexmediaserver/Plex\ Media\ Server --sqlite "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
UPDATE metadata_items SET added_at = originally_available_at;
sudo service plexmediaserver start
$event = $container->get('event');
$event->on('cli.commands',function($console){
// you can now bind a route to the console //
$console->command('users:add',function($arguments) {
//$arguments come from the command line like this...
// php run users:add --username="cannap" --password="dp"
// $arguments['username']=cannap;
// $arguments['password']="dp";
$users = $this->get('users'); // get a pre registered service container class under users
return $users->addUser($arguments);
<?php
$console->command('users:add',function($arguments) {
$success = $this->get('users')->add($arguments);
};
//USAGE: php run users:add --username=foo --password=bar
?>
Marker - 11 Jul 2016, 12:32:52
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: the behavior of the UICollectionViewFlowLayout is not defined because:
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x7fcc4ecf27a0>, and it is attached to <UICollectionView: 0x7fcc4d921600; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x7fcc4ec6fdb0>; animations = { bounds.origin=<CASpringAnimation: 0x7fcc4ecc1fb0>; bounds.size=<CASpringAnimation: 0x7fcc4ecc6f80>; position=<CASpringAnimation: 0x7fcc4ecc7100>; }; layer = <CALayer: 0x7fcc4ecd70d0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x7fcc4ecf27a0>.
Jul 1
I have found a very very strange bug in Safari and Chrome on iPad, iPhone and Simulator (Xcode)
On certain photo's (in my case it was photo's from an older iOS pre-update) the uploader will not let me choose a file. By this I mean that it will open the "choose files from "Take photo" and "Photo Library" but as soon as I choose (certain) photo's it fails.
This is where it gets strange. On the same devices it will allow me quite easily to upload other photos that are in the same "Photo library" - the difference being that they're newer images and not pre iOS update.
I have reproduced this on the Xcode simulator and it raises some interesting logs.
`Marker - 11 Jul 2016, 12:32:52
Jul 11 12:33:03 Alexs-MacBook-Pro MobileSafari[1313]: the behavior of the UICollectionViewFlowLayout is not defined because:
server {
listen 80;
server_name .yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}