[HowTo] Flexget, "the lazy couch" fully automated watching experience


#1

Flexget is a tool that can automate a lot of things for your mediacenter.
I pay for lineair tv, Netflix and cinema but still prefer to use this method because it provides a better experience.

http://Trakt.tv is a legal site, similar to IMDB.
You can mark tvshows you like (add them to a list) and mark movies you would like to watch (add them to Trakt’s “Watchlist”. Also, it keeps track of Kodi’s watched status. So Trakt knows what you would like to watch and what you have already seen.

What will flexget do?

  1. Flexget will run on your OSMC device, scan your Trakt.tv lists, checks if shows have been fully watched and/or ended and clean up your list if needed. Also, it will figure out the next episode you would want to watch.

  2. Flexget will scan your harddrive for matching content. It will scan your manual download folder and process the matching files as described below.

  3. Flexget will create a list of all movies and unwatched episodes.

  4. Flexget will scan RSS feeds and sites for magnet links that match the unwatched list and only select those that match specific quality and language restrictions.

  5. Flexget will add these magnets to Transmission with correct naming scheme that matches TheTVDB and IMDB, this guarantees Kodi will always be able to recognise the content(!).

  6. Flexget will only download the main file and subtitles, no other files that clutter your drive.

  7. After downloading, Flexget will move the files to the correct folders, again checking if naming schemes. Flexget will make sure you have a neat folder structure.

  8. Also, the files will be added to a subtitles queue and Flexget will use Subliminal to keep looking for subtitles that match your language settings.

  9. Also, Flexget will trigger Kodi(!) to scan the new files to the library.

  10. For movies, they will be removed from your Trakt Watchlist after they have been retrieved.

  11. Once you have finished watching episode 1 of a new season (>1), Flexget will delete older seasons within a week.

  12. After deleting old, watched seasons, Flexget will trigger Kodi to cleanup its library.

  13. Flexget will cleanup Transmission regularly.

A more detailed description of these steps.

Basically, after setup (which is pretty easy) all you need to do is add stuff to your Trakt lists and sit on your couch to watch. Nothing else!

Automatic Installation
Highly recommended because this can be confusing (when to use sudo and when not is very important). Use the Autosetup.sh and make sure you mark flexget=1 and transmission=1. Transmission should already be installed via MyOSMC(!). Follow the instructions on Github.

–> The script requires your trakt username (required), logins to subtitle sites (create them if you need it) and the desired Transmission user/pw (required, will be configured in Transmission for you). Also the path to your temp download folders and permanent folders. The script will configure Flexget and Transmission accordingly.

Manual Installation
This is simply a copy paste of the Autosetup.sh script. Note the $variables need to be filled in by you (use the script if you don’t know what to do). "$HomeFolder should be /home/osmc.

cd $HomeFolder/
sudo apt-get -y install python3
sudo apt-get -y install python3-pip
sudo apt-get -y install 
sudo apt-get install -y python3-libtorrent
sudo pip install --upgrade setuptools
sudo pip install virtualenv
virtualenv --system-site-packages -p python3 $HomeFolder/flexget/
cd $HomeFolder/flexget/
bin/pip install flexget
source ~/flexget/bin/activate
pip install subliminal>=2.0
pip install transmissionrpc
pip install transmissionrpc --upgrade
wget -O config.yml https://rawgit.com/zilexa/flexget_config/master/config.yml
wget -O secrets.yml https://rawgit.com/zilexa/flexget_config/master/secrets.yml
sed -i "s/TraktUser/$TraktUser/g" $HomeFolder/flexget/secrets.yml
sed -i "s/TransmissionUser/$TransmissionUser/g" $HomeFolder/flexget/secrets.yml
sed -i "s/TransmissionPw/$TransmissionPw/g" $HomeFolder/flexget/secrets.yml
sed -i 's|media/RootOfMedia/|'$MediaFolder/'|g' $HomeFolder/flexget/secrets.yml
sudo mkdir $HomeFolder/flexget/plugins/
cd $HomeFolder/flexget/plugins/
wget -O log_filter.py https://rawgit.com/zilexa/flexget_config/master/plugins/log_filter.py

If you do the installation manually, make sure you personalise the secrets.yml file!
Also, I recommend creating a systemctl service for Flexget and enable it (but don’t start it yet). Autosetup.sh does this automatically. Have a look at the contents of the script on github for an example.

test
Run the command ~/flexget/bin/flexget -V. It should give you the version you installed.

Authenticate Flexget with Trakt
Trakt needs to authenticate Flexget to allow access to its (free) API for your Trakt account. To do this, run this command:
~/flexget/bin/flexget trakt auth yourtraktusername

First run (important!)
(do modifications listed below first, if you need any).
Now, Flexget needs to do 1 full run. All the tasks listed above are carefully scheduled (some run every 30 minutes, some once a week). But for the first run, all tasks need to run according to the priorities set for each task. All you need to do is run this command. It could take up to an hour easily:
~/flexget/bin/flexget execute --now

That’s it! You can now start Flexget as a daemon:
sudo systemctl start flexget

Enjoy… I have been for months and it is awesome!

Modify quality settings
Please have a look at this table to understand the quality options and this wiki to understand how it works.

nano ~/flexget/config.yml or use Filezilla to edit the file on your Mac/Windows Notepad.

For series:
Line 38: By default, it will try to get non-10bit, 720p/h265 files. This plays fine on a RPi3.
Line 39: If not found, it will accept HDTV quality or higher in mpeg4 (xvid) or h264 or higher format.

For movies:
Below the series part (line 52), there are 3 buckets: HQ, NQ, LQ. Flexget will always try to find movies that match the HQ template and fallback to NQ or LQ eventually, if nothing found. You can modify the filesize and resolution to roughly get the bitrate you want. By default, these buckets have been carefully configured. It works well and is adjusted to general availability of filesizes and qualities.

Modify language settings
Have a look at the rejections at line 85. Make sure your language is not listed. By default, no translated content is accepted. Only original language content. Also Hindi is excluded. you might want to include that for Bollymovies.
For subtitles, change lines 627 and 654 and 842. You can also add other languages.

Advanced modifications
As an extra, you can add personal/private RSS feeds and use a personalised http//:showrss.info feed (highly recommended, the generic showrss feed does not contain quality info and will therefore be ignored by Flexget). Add/remove RSS feeds starting at line 377.
Also if you know an RSS search provider (like torrentz2 on line 415), you can add that below line 415. You might need more tricks to make it work (see line 167).

Credits go to the Flexget team, all the support they gave me the last 7 months and to Jonybat for his awesome config, which this config.yml is based on for 90%.


#2

**** CURRENT ISSUES *****
24-2-2018
By reverting to that version, the move-series task might give an error because it is not searching the TVDB database. I have updated my config with 1 line in this task (added require_field) and it works now. Line will be removed when future versions deem it unnecessary again.

02-2-2018
This bug. Install Flexget like this to get the version not affected by this bug: bin/pip install flexget==2.11.21


#3

Hi I’m having trouble with setting up the service.

Mar 30 12:23:33 osmc systemd[1]: Started Flexget Daemon.
Mar 30 12:24:12 osmc flexget[273]: 2018-03-30 12:24 WARNING  manager                       Your locale declares ascii as the filesystem encoding. Any plugins reading fi
Mar 30 12:24:34 osmc flexget[273]: Traceback (most recent call last):
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:24:34 osmc flexget[273]:     context)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:24:34 osmc flexget[273]:     cursor.execute(statement, parameters)
Mar 30 12:24:34 osmc flexget[273]: sqlite3.OperationalError: attempt to write a readonly database
Mar 30 12:24:34 osmc flexget[273]: The above exception was the direct cause of the following exception:
Mar 30 12:24:34 osmc flexget[273]: Traceback (most recent call last):
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/bin/flexget", line 11, in <module>
Mar 30 12:24:34 osmc flexget[273]:     sys.exit(main())
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/__init__.py", line 42, in main
Mar 30 12:24:34 osmc flexget[273]:     manager.start()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 330, in start
Mar 30 12:24:34 osmc flexget[273]:     self.initialize()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 203, in initialize
Mar 30 12:24:34 osmc flexget[273]:     self.load_config()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 625, in load_config
Mar 30 12:24:34 osmc flexget[273]:     self.update_config(config)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 636, in update_config
Mar 30 12:24:34 osmc flexget[273]:     self.config = self.validate_config(config)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 689, in validate_config
Mar 30 12:24:34 osmc flexget[273]:     config = fire_event('manager.before_config_validate', config, self)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 106, in fire_event
Mar 30 12:24:34 osmc flexget[273]:     result = event(*args, **kwargs)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 23, in __call__
Mar 30 12:24:34 osmc flexget[273]:     return self.func(*args, **kwargs)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 87, in process_variables
Mar 30 12:24:34 osmc flexget[273]:     variables_to_db(variables)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 65, in variables_to_db
Mar 30 12:24:34 osmc flexget[273]:     session.merge(variables)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1839, in merge
Mar 30 12:24:34 osmc flexget[273]:     self._autoflush()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1407, in _autoflush
Mar 30 12:24:34 osmc flexget[273]:     util.raise_from_cause(e)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:24:34 osmc flexget[273]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:24:34 osmc flexget[273]:     raise value
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1397, in _autoflush
Mar 30 12:24:34 osmc flexget[273]:     self.flush()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2171, in flush
Mar 30 12:24:34 osmc flexget[273]:     self._flush(objects)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush
Mar 30 12:24:34 osmc flexget[273]:     transaction.rollback(_capture_exception=True)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Mar 30 12:24:34 osmc flexget[273]:     compat.reraise(exc_type, exc_value, exc_tb)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:24:34 osmc flexget[273]:     raise value
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush
Mar 30 12:24:34 osmc flexget[273]:     flush_context.execute()
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
Mar 30 12:24:34 osmc flexget[273]:     rec.execute(self)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
Mar 30 12:24:34 osmc flexget[273]:     uow
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
Mar 30 12:24:34 osmc flexget[273]:     mapper, table, update)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 737, in _emit_update_statements
Mar 30 12:24:34 osmc flexget[273]:     execute(statement, multiparams)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
Mar 30 12:24:34 osmc flexget[273]:     return meth(self, multiparams, params)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
Mar 30 12:24:34 osmc flexget[273]:     return connection._execute_clauseelement(self, multiparams, params)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
Mar 30 12:24:34 osmc flexget[273]:     compiled_sql, distilled_params
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
Mar 30 12:24:34 osmc flexget[273]:     context)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception
Mar 30 12:24:34 osmc flexget[273]:     exc_info
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:24:34 osmc flexget[273]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
Mar 30 12:24:34 osmc flexget[273]:     raise value.with_traceback(tb)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:24:34 osmc flexget[273]:     context)
Mar 30 12:24:34 osmc flexget[273]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:24:34 osmc flexget[273]:     cursor.execute(statement, parameters)
Mar 30 12:24:34 osmc flexget[273]: sqlalchemy.exc.OperationalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this
Mar 30 12:24:36 osmc systemd[1]: flexget.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 12:24:45 osmc flexget[1010]: 2018-03-30 12:24 WARNING  manager                       Your locale declares ascii as the filesystem encoding. Any plugins reading f
Mar 30 12:25:05 osmc flexget[1010]: Traceback (most recent call last):
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]:     context)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:25:05 osmc flexget[1010]:     cursor.execute(statement, parameters)
Mar 30 12:25:05 osmc flexget[1010]: sqlite3.OperationalError: attempt to write a readonly database
Mar 30 12:25:05 osmc flexget[1010]: The above exception was the direct cause of the following exception:
Mar 30 12:25:05 osmc flexget[1010]: Traceback (most recent call last):
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/bin/flexget", line 11, in <module>
Mar 30 12:25:05 osmc flexget[1010]:     sys.exit(main())
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/__init__.py", line 42, in main
Mar 30 12:25:05 osmc flexget[1010]:     manager.start()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 330, in start
Mar 30 12:25:05 osmc flexget[1010]:     self.initialize()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 203, in initialize
Mar 30 12:25:05 osmc flexget[1010]:     self.load_config()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 625, in load_config
Mar 30 12:25:05 osmc flexget[1010]:     self.update_config(config)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 636, in update_config
Mar 30 12:25:05 osmc flexget[1010]:     self.config = self.validate_config(config)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 689, in validate_config
Mar 30 12:25:05 osmc flexget[1010]:     config = fire_event('manager.before_config_validate', config, self)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 106, in fire_event
Mar 30 12:25:05 osmc flexget[1010]:     result = event(*args, **kwargs)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 23, in __call__
Mar 30 12:25:05 osmc flexget[1010]:     return self.func(*args, **kwargs)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 87, in process_variables
Mar 30 12:25:05 osmc flexget[1010]:     variables_to_db(variables)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 65, in variables_to_db
Mar 30 12:25:05 osmc flexget[1010]:     session.merge(variables)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1839, in merge
Mar 30 12:25:05 osmc flexget[1010]:     self._autoflush()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1407, in _autoflush
Mar 30 12:25:05 osmc flexget[1010]:     util.raise_from_cause(e)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:25:05 osmc flexget[1010]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:25:05 osmc flexget[1010]:     raise value
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1397, in _autoflush
Mar 30 12:25:05 osmc flexget[1010]:     self.flush()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2171, in flush
Mar 30 12:25:05 osmc flexget[1010]:     self._flush(objects)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush
Mar 30 12:25:05 osmc flexget[1010]:     transaction.rollback(_capture_exception=True)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Mar 30 12:25:05 osmc flexget[1010]:     compat.reraise(exc_type, exc_value, exc_tb)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:25:05 osmc flexget[1010]:     raise value
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush
Mar 30 12:25:05 osmc flexget[1010]:     flush_context.execute()
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
Mar 30 12:25:05 osmc flexget[1010]:     rec.execute(self)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
Mar 30 12:25:05 osmc flexget[1010]:     uow
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
Mar 30 12:25:05 osmc flexget[1010]:     mapper, table, update)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 737, in _emit_update_statements
Mar 30 12:25:05 osmc flexget[1010]:     execute(statement, multiparams)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
Mar 30 12:25:05 osmc flexget[1010]:     return meth(self, multiparams, params)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
Mar 30 12:25:05 osmc flexget[1010]:     return connection._execute_clauseelement(self, multiparams, params)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
Mar 30 12:25:05 osmc flexget[1010]:     compiled_sql, distilled_params
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]:     context)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception
Mar 30 12:25:05 osmc flexget[1010]:     exc_info
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:25:05 osmc flexget[1010]:     reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
Mar 30 12:25:05 osmc flexget[1010]:     raise value.with_traceback(tb)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]:     context)
Mar 30 12:25:05 osmc flexget[1010]:   File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:25:05 osmc flexget[1010]:     cursor.execute(statement, parameters)
Mar 30 12:25:05 osmc flexget[1010]: sqlalchemy.exc.OperationalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Control process exited, code=exited status=1
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Unit entered failed state.
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Failed with result 'exit-code'.

Any idea what’s the problem here? If I do
sudo ~/flexget/bin/flexget execute --now it does work. I’ve also installed the flexget==2.11.21 version. I’m not sure about the require field bit, although I use the move-series task.

By adding the user root to the system and changing the user to root in the service file I’ve managed to make it work.


#4

Hi Zilexa,

that is an awesome bunch of functionalities you describe. Just a simple – maybe stupid – question: While you point out that trakt.tv is a fully legal service, am I right to assume that the sources used by Transmission to download are not?

If they are, I’d be very interested in which sources it uses. Netflix, Amazon and the likes don’t work for Kodi. Using OTA TV to gather all the desired episodes and movies is cumbersome and a big hassle but has the advantage of being totally legal. A better way without pirating would be great!


#5

Netflix and Amazon do work on Kodi v18 builds.

Transmission uses BitTorrent. It’s P2P…


#6

Yeah, I thought so. Since no reputable studio publishes it’s content through torrents, that is nothing I would publicly advise anybody to use. At least in Europe torrent users risk to be sentenced to high damage payments when they download and thereby at the same time share pirated content.

If Netflix and Amazon work reliably on Kodi 18 that’s great news, but alpha builds are not conducive for the family acceptance, so the average user will still have to wait a little.


#7

Your post is unreadible. Please post your log with three of these before and after on a new line: `


#8

Yes indeed, I pay for Netflix and my regular tv subscription and in my country, TV rights is also part of income tax (crazy but true, in NL). I suppose when you want to use Transmission, you have some common sense and will use a VPN by default.

The Flexget config I provide contains a few public RSS feeds of torrent p2p services. You can of course change this. I believe Flexget also supports NZB/usenet but I don’t know how to configure that.

For me Transmission and Flexget run on a seperate RPi3 which runs OpenVPN as well. These three apps run on OSMC. Kodi is disabled.