APTX [Tue, 18 Aug 2015 20:13:10 +0000 (22:13 +0200)]
Take pending MyList updates into account when choosing the first unwatched file.
Pending MyList update changes are only written to the my_*
fields when a the UDP API confirms it's been set.
If the UDP API doesn't work for some reason firstUnwatchedByAid
will keep returning the same file until AniDB confirms the change.
To work around this, firstUnwatchedByAid now checks if a file isn't
queued to be marked watched right now (an update without a finished
time set). If it is, the file is treated as watched.
This only works in the simple case where a file is marked watched
by fid. It's the method MyList::markWatched uses. All other methods
aren't available outside of manually preparing a PendingMyListUpdate.
APTX [Mon, 17 Aug 2015 19:12:01 +0000 (21:12 +0200)]
Implement "remove file location" context menu option.
FileLocationType now responds to insert/update/delete
of file locations in the database.
The Context menu option just needs to trigger the
removal via MyList.
APTX [Sun, 14 Jun 2015 10:27:56 +0000 (12:27 +0200)]
Add new FileEpisode table to DynamicModel.
This new table shows all files related to an episode
and not just the files for which an episode is the
main episode.
To get all episodes a UNION is needed over file and file
joined with file_episode_rel, but Dynamic Model's query
builder does not support building such queries. The
workaround is to do the UNION in a view and query it
instead.
File will be changed to what FileEpisode does in the
future as it was File's intended behaviour.
APTX [Sun, 25 Jan 2015 11:12:12 +0000 (12:12 +0100)]
Add new version of DynamicModel.
The intention is to replace MyListModel with DynamicModel completely in the
future. Currently MyListModel still does some things DynamicModel can't do,
but it should be a replacement for most use cases.
DynamicModel reacts to changes in the database (if built with Qt5) including
deletions.
New features:
* Filter Anime by alternate titles (if anime is the first level)
* Special episode counts are separated from normal episode counts
APTX [Sun, 2 Nov 2014 16:46:56 +0000 (17:46 +0100)]
Just set the state in the destructor and assume the service manages to cleanup on it's own.
stop/deinitialize call virtual functions which does not work in destructors.
Another option would be to require services to call some "destroy" method in their own destructor.
APTX [Sun, 6 Oct 2013 17:07:31 +0000 (19:07 +0200)]
Add Part rename variable.
Some files represent only a part of an episode. These files will not
differ by Anime/Episode name, number or type. The Part variable
allows to distinguish such files.
APTX [Thu, 3 Oct 2013 18:49:57 +0000 (20:49 +0200)]
Additional mark watched helper functions.
markWatchedIfUnwatched marks a file watched only if it is unwatched. This can prevent changing an already set view date.
markUnwatched marks a file unwatched. This is exposed in the mylist view.
This feature allows you to rename subtitle files the same way as video files.
This is useful as video players usually look for subtitle files which are named the same way as a video file.
QtSQL (pg driver) does not send any notification that the connection
to the database has terminated. LML tries to reconnect if a query
fails with a connection error. That check is not sufficient for the
objects that wait for DB notifications. This solution checks if the
connection is still alive by executing a simple query every minute.
If the query fails on a connection error the reconnect mechanism
triggers as before. A new reconnected() signal is emitted when a
reconnect occurs. The active connection checking is only done in
the main thread. Request-/Rename-handler listen for the new signal.
APTX [Sun, 2 Jun 2013 23:54:08 +0000 (01:54 +0200)]
Disable deletion of pending requests.
This is actually quite dangerous. Requests for Unknown Files already get deleted when the Unknown File is deleted. Other requests may be vital for LML to be able to rename/display files.