Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sickbeard tweak to update a file in XBMC instead of remove/add

Featured Replies

  • Author

strange. try:

 

select * from MyVideos75.files where strFilename="name.of.the.file.being.replaced"

 

that should give you the entire row. but do it for both the new file and old, before and after. then post the results (4 total). i need to see what the differences are.

strange. try:

 

select * from MyVideos75.files where strFilename="name.of.the.file.being.replaced"

 

that should give you the entire row. but do it for both the new file and old, before and after. then post the results (4 total). i need to see what the differences are.

 

Is the before and after with the old file and then the new file?

 

Ok, let's hope I exported this in a way that helps you.

 

Before:

-- Server version: 5.5.31
-- PHP Version: 5.4.4-14+deb7u5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `MyVideos75`
--

-- --------------------------------------------------------

--
-- Table structure for table `files`
--

CREATE TABLE IF NOT EXISTS `files` (
  `idFile` int(11) NOT NULL AUTO_INCREMENT,
  `idPath` int(11) DEFAULT NULL,
  `strFilename` text,
  `playCount` int(11) DEFAULT NULL,
  `lastPlayed` text,
  `dateAdded` text,
  PRIMARY KEY (`idFile`),
  KEY `ix_files` (`idPath`,`strFilename`(255))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13944 ;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`idFile`, `idPath`, `strFilename`, `playCount`, `lastPlayed`, `dateAdded`) VALUES
(9708, 4817, 'The.Walking.Dead.S03E06.720p.WEB-DL.Hounded.mkv', NULL, NULL, '2012-11-19 14:50:49');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

After:

-- Server version: 5.5.31
-- PHP Version: 5.4.4-14+deb7u5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `MyVideos75`
--

-- --------------------------------------------------------

--
-- Table structure for table `files`
--

CREATE TABLE IF NOT EXISTS `files` (
  `idFile` int(11) NOT NULL AUTO_INCREMENT,
  `idPath` int(11) DEFAULT NULL,
  `strFilename` text,
  `playCount` int(11) DEFAULT NULL,
  `lastPlayed` text,
  `dateAdded` text,
  PRIMARY KEY (`idFile`),
  KEY `ix_files` (`idPath`,`strFilename`(255))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13945 ;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`idFile`, `idPath`, `strFilename`, `playCount`, `lastPlayed`, `dateAdded`) VALUES
(13944, 4817, 'The.Walking.Dead.S03E06.720p BluRay.Hounded.mkv', NULL, NULL, '2013-08-06 14:38:19');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

  • Author

sorry, that was kind of a mess of a sentence.

 

before, run the query twice, once for the old file and once for the new file.

then again after. i need to see what is going on with both files, before and after.

Ok here goes

 

Old File Before:

 

-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 15, 2013 at 10:27 PM
-- Server version: 5.5.31
-- PHP Version: 5.4.4-14+deb7u5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `MyVideos75`
--

-- --------------------------------------------------------

--
-- Table structure for table `files`
--

CREATE TABLE IF NOT EXISTS `files` (
  `idFile` int(11) NOT NULL AUTO_INCREMENT,
  `idPath` int(11) DEFAULT NULL,
  `strFilename` text,
  `playCount` int(11) DEFAULT NULL,
  `lastPlayed` text,
  `dateAdded` text,
  PRIMARY KEY (`idFile`),
  KEY `ix_files` (`idPath`,`strFilename`(255))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13945 ;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`idFile`, `idPath`, `strFilename`, `playCount`, `lastPlayed`, `dateAdded`) VALUES
(9709, 4817, 'The.Walking.Dead.S03E07.720p.WEB-DL.When.the.Dead.Come.Knocking.mkv', NULL, NULL, '2012-11-26 09:59:34');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

New File Before:

 

MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0001 sec )

 

Old File After:

 

-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 15, 2013 at 10:43 PM
-- Server version: 5.5.31
-- PHP Version: 5.4.4-14+deb7u5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `MyVideos75`
--

-- --------------------------------------------------------

--
-- Table structure for table `files`
--

CREATE TABLE IF NOT EXISTS `files` (
  `idFile` int(11) NOT NULL AUTO_INCREMENT,
  `idPath` int(11) DEFAULT NULL,
  `strFilename` text,
  `playCount` int(11) DEFAULT NULL,
  `lastPlayed` text,
  `dateAdded` text,
  PRIMARY KEY (`idFile`),
  KEY `ix_files` (`idPath`,`strFilename`(255))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13946 ;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`idFile`, `idPath`, `strFilename`, `playCount`, `lastPlayed`, `dateAdded`) VALUES
(9709, 4817, 'The.Walking.Dead.S03E07.720p.WEB-DL.When.the.Dead.Come.Knocking.mkv', NULL, NULL, '2012-11-26 09:59:34');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

New File After:

 

-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 15, 2013 at 10:43 PM
-- Server version: 5.5.31
-- PHP Version: 5.4.4-14+deb7u5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `MyVideos75`
--

-- --------------------------------------------------------

--
-- Table structure for table `files`
--

CREATE TABLE IF NOT EXISTS `files` (
  `idFile` int(11) NOT NULL AUTO_INCREMENT,
  `idPath` int(11) DEFAULT NULL,
  `strFilename` text,
  `playCount` int(11) DEFAULT NULL,
  `lastPlayed` text,
  `dateAdded` text,
  PRIMARY KEY (`idFile`),
  KEY `ix_files` (`idPath`,`strFilename`(255))
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=13946 ;

--
-- Dumping data for table `files`
--

INSERT INTO `files` (`idFile`, `idPath`, `strFilename`, `playCount`, `lastPlayed`, `dateAdded`) VALUES
(13945, 4817, 'The.Walking.Dead.S03E07.720p BluRay.When.the.Dead.Come.Knocking.mkv', NULL, NULL, '2013-08-06 15:18:58');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

 

  • Author

hmmm... they appear the same. so not a caching issue. but definitely something wrong. maybe a rights issue? because it is auto-incrementing a new file instead or updating it. i will look into but i will be busy this weekend. this is good though that i can get the kinks worked out.

  • Author

still looking into this. until then you can try making it clean the library right after the update (untested):

 

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' -u $USERNAME:$PASSWORD http://localhost:$PORT/jsonrpc

still looking into this. until then you can try making it clean the library right after the update (untested):

 

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' -u $USERNAME:$PASSWORD http://localhost:$PORT/jsonrpc

 

Do I run this on unraid, where the xbmc library plug-in resides?

  • Author

You could but I meant adding it to the script after the MySQL part. It just tells XBMC to clean the library.

still looking into this. until then you can try making it clean the library right after the update (untested):

 

curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Clean", "id": "mybash"}' -H 'content-type: application/json;' -u $USERNAME:$PASSWORD http://localhost:$PORT/jsonrpc

 

It looks like it is working with the library clean command running after the script to replace the file.

 

This is a full library clean, correct?

  • Author

yes. i looked to see if there is a way to just clean that directory but havent found anything yet. still trying to find out why it is inserting instead of updating. it just doesnt make sense.

Any luck with this?

  • Author

Not yet. Right now it is inserting instead of updating. Which makes absolutely no sense. And everyone I've talked to insists that there must be some other bit of code because it isn't possible. Normally, I would agree. I think there must be something specific to his set up. I haven't given up though. I have come up with a temp fix though of cleaning the library after the update. It takes longer but gets rid of the invalid entry from the old file. I will try to get a Windows version for you to test soon.

  • 1 month later...
  • Author

Ok, I know it has been a while but I've had a lot going on during the holidays. I will have a Windows system to test soon and hope to fix the insert instead of update issue for those who have Sickbeard running on UnRaid. I literally had an epiphany on the toilet last night about it.

 

That is probably too much information but I thought it was funny because apparently that really happens.

Good to hear. Many a great idea had been born on the toilet.

 

Sent from my SM-N900V using Tapatalk

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.