mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
sor required fields, add date and enable StallEventSubscribe
This commit is contained in:
@@ -39,6 +39,7 @@ func Start() {
|
|||||||
FriendlyName: getDefaultFriendlyName(),
|
FriendlyName: getDefaultFriendlyName(),
|
||||||
NoTranscode: true,
|
NoTranscode: true,
|
||||||
NoProbe: true,
|
NoProbe: true,
|
||||||
|
StallEventSubscribe: true,
|
||||||
Icons: []dms.Icon{
|
Icons: []dms.Icon{
|
||||||
dms.Icon{
|
dms.Icon{
|
||||||
Width: 32,
|
Width: 32,
|
||||||
|
|||||||
@@ -22,12 +22,13 @@ func getTorrents() (ret []interface{}) {
|
|||||||
for _, t := range torrs {
|
for _, t := range torrs {
|
||||||
obj := upnpav.Object{
|
obj := upnpav.Object{
|
||||||
ID: "%2F" + t.TorrentSpec.InfoHash.HexString(),
|
ID: "%2F" + t.TorrentSpec.InfoHash.HexString(),
|
||||||
Restricted: 1,
|
|
||||||
ParentID: "0",
|
ParentID: "0",
|
||||||
Class: "object.container.storageFolder",
|
|
||||||
Title: t.Title,
|
Title: t.Title,
|
||||||
|
Class: "object.container.storageFolder",
|
||||||
|
Restricted: 1,
|
||||||
Icon: t.Poster,
|
Icon: t.Poster,
|
||||||
AlbumArtURI: t.Poster,
|
AlbumArtURI: t.Poster,
|
||||||
|
Date: upnpav.Timestamp{Time: time.Now()},
|
||||||
}
|
}
|
||||||
cnt := upnpav.Container{Object: obj}
|
cnt := upnpav.Container{Object: obj}
|
||||||
ret = append(ret, cnt)
|
ret = append(ret, cnt)
|
||||||
@@ -55,10 +56,11 @@ func getTorrent(path, host string) (ret []interface{}) {
|
|||||||
if torr.Files() == nil {
|
if torr.Files() == nil {
|
||||||
obj := upnpav.Object{
|
obj := upnpav.Object{
|
||||||
ID: parent + "%2FLoad Torrent",
|
ID: parent + "%2FLoad Torrent",
|
||||||
Restricted: 1,
|
|
||||||
ParentID: parent,
|
ParentID: parent,
|
||||||
Class: "object.container.storageFolder",
|
|
||||||
Title: "Load Torrent",
|
Title: "Load Torrent",
|
||||||
|
Class: "object.container.storageFolder",
|
||||||
|
Restricted: 1,
|
||||||
|
Date: upnpav.Timestamp{Time: time.Now()},
|
||||||
}
|
}
|
||||||
cnt := upnpav.Container{Object: obj}
|
cnt := upnpav.Container{Object: obj}
|
||||||
ret = append(ret, cnt)
|
ret = append(ret, cnt)
|
||||||
@@ -132,10 +134,11 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
|
|||||||
|
|
||||||
obj := upnpav.Object{
|
obj := upnpav.Object{
|
||||||
ID: parent + "%2F" + file.Path,
|
ID: parent + "%2F" + file.Path,
|
||||||
Restricted: 1,
|
|
||||||
ParentID: parent,
|
ParentID: parent,
|
||||||
Class: "object.item." + mime.Type() + "Item",
|
|
||||||
Title: file.Path,
|
Title: file.Path,
|
||||||
|
Class: "object.item." + mime.Type() + "Item",
|
||||||
|
Restricted: 1,
|
||||||
|
Date: upnpav.Timestamp{Time: time.Now()},
|
||||||
}
|
}
|
||||||
|
|
||||||
item := upnpav.Item{
|
item := upnpav.Item{
|
||||||
|
|||||||
Reference in New Issue
Block a user