-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watched state management refactor #31
Conversation
elgatito
commented
Apr 7, 2017
- Processing Watched progress state in torrentfs Close() to be sure we save progress for any played item.
- Removed Player.onStop notification processor as Kodi seems to send sometimes wrong IDs (depends on ListItem parameters, while we surely know what we play).
- Moved all that to separate Library package, moved Infolabels also there
- When Item is started from Quasar - it's Watching state gets synchronized with Kodi library.
7837098
to
42db57e
Compare
All additions are using spaces for indentation... |
bittorrent/service.go
Outdated
"regexp" | ||
"strconv" | ||
"strings" | ||
"time" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the visual order for imports
bittorrent/service.go
Outdated
"github.com/scakemyer/quasar/config" | ||
"github.com/scakemyer/quasar/diskusage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those imports were ordered properly
bittorrent/service.go
Outdated
libtorrent.AlertErrorNotification)) | ||
libtorrent.AlertStatusNotification| | ||
libtorrent.AlertStorageNotification| | ||
libtorrent.AlertErrorNotification)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation and space before |
was fine here
bittorrent/service.go
Outdated
case libtorrent.ExternalIpAlertAlertType: | ||
splitMessage := strings.Split(alertMessage, ":") | ||
splitIP := strings.Split(splitMessage[len(splitMessage)-1], ".") | ||
alertMessage = strings.Join(splitMessage[:len(splitMessage)-1], ":") + splitIP[0] + ".XX.XX.XX" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces around -
bittorrent/torrentfs.go
Outdated
"sync" | ||
"time" | ||
"unsafe" | ||
"encoding/hex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import order...
5b6fff2
to
dab905d
Compare
Commit updated |
api/watcher.go
Outdated
) | ||
|
||
var ( | ||
watcherLog = logging.MustGetLogger("watcher") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single space after watcherLog
here
bittorrent/service.go
Outdated
@@ -313,7 +319,7 @@ func (s *BTService) configure() { | |||
settings.SetBool(libtorrent.SettingByName("use_read_cache"), true) | |||
settings.SetBool(libtorrent.SettingByName("coalesce_reads"), true) | |||
settings.SetBool(libtorrent.SettingByName("coalesce_writes"), true) | |||
settings.SetInt(libtorrent.SettingByName("max_queued_disk_bytes"), 10 * 1024 * 1024) | |||
settings.SetInt(libtorrent.SettingByName("max_queued_disk_bytes"), 10*1024*1024) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bring back those shpaces pleagzes
bittorrent/torrentfs.go
Outdated
"path/filepath" | ||
"sync" | ||
"time" | ||
"unsafe" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import order was fine here, encoding/hex
would go just before path/filepath
and that's it
dab905d
to
37cac48
Compare
Updated with fixes. |