xbmc
FileItem.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
16 #include "LockType.h"
17 #include "XBDateTime.h"
18 #include "guilib/GUIListItem.h"
19 #include "threads/CriticalSection.h"
20 #include "utils/IArchivable.h"
21 #include "utils/ISerializable.h"
22 #include "utils/ISortable.h"
23 #include "utils/SortUtils.h"
24 
25 #include <map>
26 #include <memory>
27 #include <string>
28 #include <utility>
29 #include <vector>
30 
31 enum class VideoDbContentType;
32 
33 namespace ADDON
34 {
35 class IAddon;
36 }
37 
38 namespace MUSIC_INFO
39 {
40  class CMusicInfoTag;
41 }
42 class CVideoInfoTag;
43 class CPictureInfoTag;
44 
45 namespace KODI
46 {
47 namespace GAME
48 {
49  class CGameInfoTag;
50 }
51 }
52 
53 namespace PVR
54 {
55 class CPVRChannel;
56 class CPVRChannelGroupMember;
57 class CPVREpgInfoTag;
58 class CPVREpgSearchFilter;
59 class CPVRRecording;
60 class CPVRTimerInfoTag;
61 }
62 
63 class CAlbum;
64 class CArtist;
65 class CSong;
66 class CGenre;
67 
68 class CURL;
69 class CVariant;
70 
71 class CFileItemList;
72 class CCueDocument;
73 typedef std::shared_ptr<CCueDocument> CCueDocumentPtr;
74 
75 class IEvent;
76 typedef std::shared_ptr<const IEvent> EventPtr;
77 
78 /* special startoffset used to indicate that we wish to resume */
79 #define STARTOFFSET_RESUME (-1)
80 
81 class CMediaSource;
82 
83 class CBookmark;
84 
85 enum EFileFolderType {
86  EFILEFOLDER_TYPE_ALWAYS = 1<<0,
87  EFILEFOLDER_TYPE_ONCLICK = 1<<1,
88  EFILEFOLDER_TYPE_ONBROWSE = 1<<2,
89 
90  EFILEFOLDER_MASK_ALL = 0xff,
91  EFILEFOLDER_MASK_ONCLICK = EFILEFOLDER_TYPE_ALWAYS
92  | EFILEFOLDER_TYPE_ONCLICK,
93  EFILEFOLDER_MASK_ONBROWSE = EFILEFOLDER_TYPE_ALWAYS
94  | EFILEFOLDER_TYPE_ONCLICK
95  | EFILEFOLDER_TYPE_ONBROWSE,
96 };
97 
102 class CFileItem :
103  public CGUIListItem, public IArchivable, public ISerializable, public ISortable
104 {
105 public:
106  CFileItem(void);
107  CFileItem(const CFileItem& item);
108  explicit CFileItem(const CGUIListItem& item);
109  explicit CFileItem(const std::string& strLabel);
110  explicit CFileItem(const char* strLabel);
111  CFileItem(const CURL& path, bool bIsFolder);
112  CFileItem(const std::string& strPath, bool bIsFolder);
113  explicit CFileItem(const CSong& song);
114  CFileItem(const CSong& song, const MUSIC_INFO::CMusicInfoTag& music);
115  CFileItem(const CURL &path, const CAlbum& album);
116  CFileItem(const std::string &path, const CAlbum& album);
117  explicit CFileItem(const CArtist& artist);
118  explicit CFileItem(const CGenre& genre);
119  explicit CFileItem(const MUSIC_INFO::CMusicInfoTag& music);
120  explicit CFileItem(const CVideoInfoTag& movie);
121  explicit CFileItem(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag);
122  explicit CFileItem(const std::shared_ptr<PVR::CPVREpgSearchFilter>& filter);
123  explicit CFileItem(const std::shared_ptr<PVR::CPVRChannelGroupMember>& channelGroupMember);
124  explicit CFileItem(const std::shared_ptr<PVR::CPVRRecording>& record);
125  explicit CFileItem(const std::shared_ptr<PVR::CPVRTimerInfoTag>& timer);
126  explicit CFileItem(const CMediaSource& share);
127  explicit CFileItem(std::shared_ptr<const ADDON::IAddon> addonInfo);
128  explicit CFileItem(const EventPtr& eventLogEntry);
129 
130  ~CFileItem(void) override;
131  CGUIListItem* Clone() const override { return new CFileItem(*this); }
132 
133  const CURL GetURL() const;
134  void SetURL(const CURL& url);
135  bool IsURL(const CURL& url) const;
136  const std::string& GetPath() const { return m_strPath; }
137  void SetPath(const std::string& path) { m_strPath = path; }
138  bool IsPath(const std::string& path, bool ignoreURLOptions = false) const;
139 
140  const CURL GetDynURL() const;
141  void SetDynURL(const CURL& url);
142  const std::string &GetDynPath() const;
143  void SetDynPath(const std::string &path);
144 
149  void Reset();
150  CFileItem& operator=(const CFileItem& item);
151  void Archive(CArchive& ar) override;
152  void Serialize(CVariant& value) const override;
153  void ToSortable(SortItem &sortable, Field field) const override;
154  void ToSortable(SortItem &sortable, const Fields &fields) const;
155  bool IsFileItem() const override { return true; }
156 
157  bool Exists(bool bUseCache = true) const;
158 
166  std::string GetOpticalMediaPath() const;
172  bool IsVideo() const;
173 
174  bool IsDiscStub() const;
175 
181  bool IsPicture() const;
182  bool IsLyrics() const;
183  bool IsSubtitle() const;
184 
190  bool IsAudio() const;
191 
196  bool IsDeleted() const;
197 
202  bool IsAudioBook() const;
203 
204  bool IsGame() const;
205  bool IsCUESheet() const;
206  bool IsInternetStream(const bool bStrictCheck = false) const;
207  bool IsStreamedFilesystem() const;
208  bool IsPlayList() const;
209  bool IsSmartPlayList() const;
210  bool IsLibraryFolder() const;
211  bool IsPythonScript() const;
212  bool IsPlugin() const;
213  bool IsScript() const;
214  bool IsAddonsPath() const;
215  bool IsSourcesPath() const;
216  bool IsNFO() const;
217  bool IsVideoExtras() const;
218  bool IsDiscImage() const;
219  bool IsOpticalMediaFile() const;
220  bool IsDVDFile(bool bVobs = true, bool bIfos = true) const;
221  bool IsBDFile() const;
222  bool IsBluray() const;
223  bool IsProtectedBlurayDisc() const;
224  bool IsRAR() const;
225  bool IsAPK() const;
226  bool IsZIP() const;
227  bool IsCBZ() const;
228  bool IsCBR() const;
229  bool IsISO9660() const;
230  bool IsCDDA() const;
231  bool IsDVD() const;
232  bool IsOnDVD() const;
233  bool IsOnLAN() const;
234  bool IsHD() const;
235  bool IsNfs() const;
236  bool IsRemote() const;
237  bool IsSmb() const;
238  bool IsURL() const;
239  bool IsStack() const;
240  bool IsFavourite() const;
241  bool IsMultiPath() const;
242  bool IsMusicDb() const;
243  bool IsVideoDb() const;
244  bool IsEPG() const;
245  bool IsPVRChannel() const;
246  bool IsPVRChannelGroup() const;
247  bool IsPVRRecording() const;
248  bool IsUsablePVRRecording() const;
249  bool IsDeletedPVRRecording() const;
250  bool IsInProgressPVRRecording() const;
251  bool IsPVRTimer() const;
252  bool IsType(const char *ext) const;
253  bool IsVirtualDirectoryRoot() const;
254  bool IsReadOnly() const;
255  bool CanQueue() const;
256  void SetCanQueue(bool bYesNo);
257  bool IsParentFolder() const;
258  bool IsFileFolder(EFileFolderType types = EFILEFOLDER_MASK_ALL) const;
259  bool IsRemovable() const;
260  bool IsPVR() const;
261  bool IsLiveTV() const;
262  bool IsRSS() const;
263  bool IsAndroidApp() const;
264 
265  bool HasVideoVersions() const;
266  bool HasVideoExtras() const;
267 
268  void RemoveExtension();
269  void CleanString();
270  void FillInDefaultIcon();
271  void SetFileSizeLabel();
272  void SetLabel(const std::string &strLabel) override;
273  VideoDbContentType GetVideoContentType() const;
274  bool IsLabelPreformatted() const { return m_bLabelPreformatted; }
275  void SetLabelPreformatted(bool bYesNo) { m_bLabelPreformatted=bYesNo; }
276  bool SortsOnTop() const { return m_specialSort == SortSpecialOnTop; }
277  bool SortsOnBottom() const { return m_specialSort == SortSpecialOnBottom; }
278  void SetSpecialSort(SortSpecial sort) { m_specialSort = sort; }
279 
280  inline bool HasMusicInfoTag() const
281  {
282  return m_musicInfoTag != NULL;
283  }
284 
285  MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
286 
287  inline const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag() const
288  {
289  return m_musicInfoTag;
290  }
291 
292  bool HasVideoInfoTag() const;
293 
294  CVideoInfoTag* GetVideoInfoTag();
295 
296  const CVideoInfoTag* GetVideoInfoTag() const;
297 
298  inline bool HasEPGInfoTag() const
299  {
300  return m_epgInfoTag.get() != NULL;
301  }
302 
303  inline const std::shared_ptr<PVR::CPVREpgInfoTag> GetEPGInfoTag() const
304  {
305  return m_epgInfoTag;
306  }
307 
308  bool HasEPGSearchFilter() const { return m_epgSearchFilter != nullptr; }
309 
310  const std::shared_ptr<PVR::CPVREpgSearchFilter> GetEPGSearchFilter() const
311  {
312  return m_epgSearchFilter;
313  }
314 
315  inline bool HasPVRChannelGroupMemberInfoTag() const
316  {
317  return m_pvrChannelGroupMemberInfoTag.get() != nullptr;
318  }
319 
320  inline const std::shared_ptr<PVR::CPVRChannelGroupMember> GetPVRChannelGroupMemberInfoTag() const
321  {
322  return m_pvrChannelGroupMemberInfoTag;
323  }
324 
325  bool HasPVRChannelInfoTag() const;
326  const std::shared_ptr<PVR::CPVRChannel> GetPVRChannelInfoTag() const;
327 
328  inline bool HasPVRRecordingInfoTag() const
329  {
330  return m_pvrRecordingInfoTag.get() != NULL;
331  }
332 
333  inline const std::shared_ptr<PVR::CPVRRecording> GetPVRRecordingInfoTag() const
334  {
335  return m_pvrRecordingInfoTag;
336  }
337 
338  inline bool HasPVRTimerInfoTag() const
339  {
340  return m_pvrTimerInfoTag != NULL;
341  }
342 
343  inline const std::shared_ptr<PVR::CPVRTimerInfoTag> GetPVRTimerInfoTag() const
344  {
345  return m_pvrTimerInfoTag;
346  }
347 
352  CFileItem GetItemToPlay() const;
353 
358  bool IsResumePointSet() const;
359 
364  double GetCurrentResumeTime() const;
365 
372  bool GetCurrentResumeTimeAndPartNumber(int64_t& startOffset, int& partNumber) const;
373 
380  bool IsResumable() const;
381 
387  int64_t GetStartOffset() const { return m_lStartOffset; }
388 
394  void SetStartOffset(const int64_t offset) { m_lStartOffset = offset; }
395 
400  int64_t GetEndOffset() const { return m_lEndOffset; }
401 
406  void SetEndOffset(const int64_t offset) { m_lEndOffset = offset; }
407 
408  inline bool HasPictureInfoTag() const
409  {
410  return m_pictureInfoTag != NULL;
411  }
412 
413  inline const CPictureInfoTag* GetPictureInfoTag() const
414  {
415  return m_pictureInfoTag;
416  }
417 
418  bool HasAddonInfo() const { return m_addonInfo != nullptr; }
419  const std::shared_ptr<const ADDON::IAddon> GetAddonInfo() const { return m_addonInfo; }
420 
421  inline bool HasGameInfoTag() const
422  {
423  return m_gameInfoTag != NULL;
424  }
425 
426  KODI::GAME::CGameInfoTag* GetGameInfoTag();
427 
428  inline const KODI::GAME::CGameInfoTag* GetGameInfoTag() const
429  {
430  return m_gameInfoTag;
431  }
432 
433  CPictureInfoTag* GetPictureInfoTag();
434 
440  std::string GetLocalFanart() const;
441 
449  std::string GetLocalArtBaseFilename() const;
457  std::string GetLocalArtBaseFilename(bool& useFolder) const;
458 
466  std::string GetLocalArt(const std::string& artFile, bool useFolder = false) const;
467 
475  std::string FindLocalArt(const std::string &artFile, bool useFolder) const;
476 
481  bool SkipLocalArt() const;
482 
488  std::string GetThumbHideIfUnwatched(const CFileItem* item) const;
489 
490  // Gets the .tbn file associated with this item
491  std::string GetTBNFile() const;
492  // Gets the folder image associated with this item (defaults to folder.jpg)
493  std::string GetFolderThumb(const std::string &folderJPG = "folder.jpg") const;
494  // Gets the correct movie title
495  std::string GetMovieName(bool bUseFolderNames = false) const;
496 
504  std::string GetBaseMoviePath(bool useFolderNames) const;
505 
506  // Gets the user thumb, if it exists
507  std::string GetUserMusicThumb(bool alwaysCheckRemote = false, bool fallbackToFolder = false) const;
508 
521  std::string GetLocalMetadataPath() const;
522 
523  // finds a matching local trailer file
524  std::string FindTrailer() const;
525 
526  bool LoadMusicTag();
527  bool LoadGameTag();
528 
534  bool LoadDetails();
535 
536  /* Returns the content type of this item if known */
537  const std::string& GetMimeType() const { return m_mimetype; }
538 
539  /* sets the mime-type if known beforehand */
540  void SetMimeType(const std::string& mimetype) { m_mimetype = mimetype; } ;
541 
547  void FillInMimeType(bool lookup = true);
548 
553  bool ContentLookup() { return m_doContentLookup; }
554 
559  void SetMimeTypeForInternetFile();
560 
565  void SetContentLookup(bool enable) { m_doContentLookup = enable; }
566 
567  /* general extra info about the contents of the item, not for display */
568  void SetExtraInfo(const std::string& info) { m_extrainfo = info; }
569  const std::string& GetExtraInfo() const { return m_extrainfo; }
570 
579  void UpdateInfo(const CFileItem &item, bool replaceLabels = true);
580 
587  void MergeInfo(const CFileItem &item);
588 
589  bool IsSamePath(const CFileItem *item) const;
590 
591  bool IsAlbum() const;
592 
597  void SetFromVideoInfoTag(const CVideoInfoTag &video);
598 
603  void SetFromMusicInfoTag(const MUSIC_INFO::CMusicInfoTag &music);
604 
610  void SetFromAlbum(const CAlbum &album);
616  void SetFromSong(const CSong &song);
617 
621  int64_t m_dwSize;
622  std::string m_strDVDLabel;
623  std::string m_strTitle;
624  int m_iprogramCount;
625  int m_idepth;
626  int m_lStartPartNumber;
627  LockType m_iLockMode;
628  std::string m_strLockCode;
629  int m_iHasLock; // 0 - no lock 1 - lock, but unlocked 2 - locked
630  int m_iBadPwdCount;
631 
632  void SetCueDocument(const CCueDocumentPtr& cuePtr);
633  void LoadEmbeddedCue();
634  bool HasCueDocument() const;
635  bool LoadTracksFromCueDocument(CFileItemList& scannedItems);
636 private:
641  void Initialize();
642 
647  void UpdateMimeType(bool lookup = true);
648 
653  CBookmark GetResumePoint() const;
654 
658  void FillMusicInfoTag(const std::shared_ptr<const PVR::CPVREpgInfoTag>& tag);
659 
660  std::string m_strPath;
661  std::string m_strDynPath;
662 
663  SortSpecial m_specialSort;
664  bool m_bIsParentFolder;
665  bool m_bCanQueue;
666  bool m_bLabelPreformatted;
667  std::string m_mimetype;
668  std::string m_extrainfo;
669  bool m_doContentLookup;
670  MUSIC_INFO::CMusicInfoTag* m_musicInfoTag;
671  CVideoInfoTag* m_videoInfoTag;
672  std::shared_ptr<PVR::CPVREpgInfoTag> m_epgInfoTag;
673  std::shared_ptr<PVR::CPVREpgSearchFilter> m_epgSearchFilter;
674  std::shared_ptr<PVR::CPVRRecording> m_pvrRecordingInfoTag;
675  std::shared_ptr<PVR::CPVRTimerInfoTag> m_pvrTimerInfoTag;
676  std::shared_ptr<PVR::CPVRChannelGroupMember> m_pvrChannelGroupMemberInfoTag;
677  CPictureInfoTag* m_pictureInfoTag;
678  std::shared_ptr<const ADDON::IAddon> m_addonInfo;
679  KODI::GAME::CGameInfoTag* m_gameInfoTag;
680  EventPtr m_eventLogEntry;
681  bool m_bIsAlbum;
682  int64_t m_lStartOffset;
683  int64_t m_lEndOffset;
684 
685  CCueDocumentPtr m_cueDocument;
686 };
687 
692 typedef std::shared_ptr<CFileItem> CFileItemPtr;
693 
698 typedef std::vector< CFileItemPtr > VECFILEITEMS;
699 
704 typedef std::vector< CFileItemPtr >::iterator IVECFILEITEMS;
705 
710 typedef std::map<std::string, CFileItemPtr > MAPFILEITEMS;
711 
716 typedef std::pair<std::string, CFileItemPtr > MAPFILEITEMSPAIR;
717 
718 typedef bool (*FILEITEMLISTCOMPARISONFUNC) (const CFileItemPtr &pItem1, const CFileItemPtr &pItem2);
719 typedef void (*FILEITEMFILLFUNC) (CFileItemPtr &item);
720 
725 class CFileItemList : public CFileItem
726 {
727 public:
728  enum CACHE_TYPE { CACHE_NEVER = 0, CACHE_IF_SLOW, CACHE_ALWAYS };
729 
730  CFileItemList();
731  explicit CFileItemList(const std::string& strPath);
732  ~CFileItemList() override;
733  void Archive(CArchive& ar) override;
734  CFileItemPtr operator[] (int iItem);
735  const CFileItemPtr operator[] (int iItem) const;
736  CFileItemPtr operator[] (const std::string& strPath);
737  const CFileItemPtr operator[] (const std::string& strPath) const;
738  void Clear();
739  void ClearItems();
740  void Add(CFileItemPtr item);
741  void Add(CFileItem&& item);
742  void AddFront(const CFileItemPtr &pItem, int itemPosition);
743  void Remove(CFileItem* pItem);
744  void Remove(int iItem);
745  CFileItemPtr Get(int iItem) const;
746  const VECFILEITEMS& GetList() const { return m_items; }
747  CFileItemPtr Get(const std::string& strPath) const;
748  int Size() const;
749  bool IsEmpty() const;
750  void Append(const CFileItemList& itemlist);
751  void Assign(const CFileItemList& itemlist, bool append = false);
752  bool Copy (const CFileItemList& item, bool copyItems = true);
753  void Reserve(size_t iCount);
754  void Sort(SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone);
755  /* \brief Sorts the items based on the given sorting options
756 
757  In contrast to Sort (see above) this does not change the internal
758  state by storing the sorting method and order used and therefore
759  will always execute the sorting even if the list of items has
760  already been sorted with the same options before.
761  */
762  void Sort(SortDescription sortDescription);
763  void Randomize();
764  void FillInDefaultIcons();
765  int GetFolderCount() const;
766  int GetFileCount() const;
767  int GetSelectedCount() const;
768  int GetObjectCount() const;
769  void FilterCueItems();
770  void RemoveExtensions();
771  void SetIgnoreURLOptions(bool ignoreURLOptions);
772  void SetFastLookup(bool fastLookup);
773  bool Contains(const std::string& fileName) const;
774  bool GetFastLookup() const { return m_fastLookup; }
775 
781  void Stack(bool stackFiles = true);
782 
783  SortOrder GetSortOrder() const { return m_sortDescription.sortOrder; }
784  SortBy GetSortMethod() const { return m_sortDescription.sortBy; }
785  void SetSortOrder(SortOrder sortOrder) { m_sortDescription.sortOrder = sortOrder; }
786  void SetSortMethod(SortBy sortBy) { m_sortDescription.sortBy = sortBy; }
787 
798  bool Load(int windowID = 0);
799 
810  bool Save(int windowID = 0);
811  void SetCacheToDisc(CACHE_TYPE cacheToDisc) { m_cacheToDisc = cacheToDisc; }
812  bool CacheToDiscAlways() const { return m_cacheToDisc == CACHE_ALWAYS; }
813  bool CacheToDiscIfSlow() const { return m_cacheToDisc == CACHE_IF_SLOW; }
823  void RemoveDiscCache(int windowID = 0) const;
824  void RemoveDiscCache(const std::string& cachefile) const;
825  void RemoveDiscCacheCRC(const std::string& crc) const;
826  bool AlwaysCache() const;
827 
828  void Swap(unsigned int item1, unsigned int item2);
829 
834  bool UpdateItem(const CFileItem *item);
835 
836  void AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes = SortAttributeNone);
837  void AddSortMethod(SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks);
838  void AddSortMethod(SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks);
839  bool HasSortDetails() const { return m_sortDetails.size() != 0; }
840  const std::vector<GUIViewSortDetails> &GetSortDetails() const { return m_sortDetails; }
841 
848  void SetSortIgnoreFolders(bool sort) { m_sortIgnoreFolders = sort; }
849  bool GetReplaceListing() const { return m_replaceListing; }
850  void SetReplaceListing(bool replace);
851  void SetContent(const std::string& content) { m_content = content; }
852  const std::string& GetContent() const { return m_content; }
853 
854  void ClearSortState();
855 
856  VECFILEITEMS::iterator begin() { return m_items.begin(); }
857  VECFILEITEMS::iterator end() { return m_items.end(); }
858  VECFILEITEMS::iterator erase(VECFILEITEMS::iterator first, VECFILEITEMS::iterator last);
859  VECFILEITEMS::const_iterator begin() const { return m_items.begin(); }
860  VECFILEITEMS::const_iterator end() const { return m_items.end(); }
861  VECFILEITEMS::const_iterator cbegin() const { return m_items.cbegin(); }
862  VECFILEITEMS::const_iterator cend() const { return m_items.cend(); }
863  std::reverse_iterator<VECFILEITEMS::const_iterator> rbegin() const { return m_items.rbegin(); }
864  std::reverse_iterator<VECFILEITEMS::const_iterator> rend() const { return m_items.rend(); }
865 
866 private:
867  void Sort(FILEITEMLISTCOMPARISONFUNC func);
868  void FillSortFields(FILEITEMFILLFUNC func);
869  std::string GetDiscFileCache(int windowID) const;
870 
875  void StackFiles();
876 
881  void StackFolders();
882 
883  VECFILEITEMS m_items;
884  MAPFILEITEMS m_map;
885  bool m_ignoreURLOptions = false;
886  bool m_fastLookup = false;
887  SortDescription m_sortDescription;
888  bool m_sortIgnoreFolders = false;
889  CACHE_TYPE m_cacheToDisc = CACHE_IF_SLOW;
890  bool m_replaceListing = false;
891  std::string m_content;
892 
893  std::vector<GUIViewSortDetails> m_sortDetails;
894 
895  mutable CCriticalSection m_lock;
896 };
CDateTime m_dateTime
file creation date & time
Definition: FileItem.h:620
Definition: GUIListItem.h:29
int64_t m_dwSize
file size (0 for folders)
Definition: FileItem.h:621
std::shared_ptr< CFileItem > CFileItemPtr
A shared pointer to CFileItem.
Definition: FileItem.h:692
Definition: ContextMenuManager.h:24
std::vector< CFileItemPtr >::iterator IVECFILEITEMS
Iterator for VECFILEITEMS.
Definition: FileItem.h:704
Represents a list of files.
Definition: FileItem.h:725
Definition: URL.h:21
int64_t GetStartOffset() const
Get the offset where start the playback.
Definition: FileItem.h:387
Definition: Bookmark.h:14
void SetSortIgnoreFolders(bool sort)
Specify whether this list should be sorted with folders separate from files By default we sort with f...
Definition: FileItem.h:848
void SetStartOffset(const int64_t offset)
Set the offset where start the playback.
Definition: FileItem.h:394
Definition: GameInfoTag.h:24
Represents a share.
Definition: MediaSource.h:22
Definition: LabelFormatter.h:21
Definition: Variant.h:31
int64_t GetEndOffset() const
Get the end offset.
Definition: FileItem.h:400
Definition: IEvent.h:26
Definition: ISerializable.h:13
Definition: AudioDecoder.h:18
Definition: CueDocument.h:20
Definition: Archive.h:29
Class to store and read album information from CMusicDatabase.
Definition: Song.h:34
int m_iDriveType
If m_bIsShareOrDrive is true, use to get the share type. Types see: CMediaSource::m_iDriveType.
Definition: FileItem.h:619
DateTime class, which uses FileTime as it&#39;s base.
Definition: XBDateTime.h:63
Definition: ISortable.h:15
bool ContentLookup()
Some sources do not support HTTP HEAD request to determine i.e. mime type.
Definition: FileItem.h:553
Definition: Album.h:26
SortBy
Definition: SortUtils.h:49
std::map< std::string, CFileItemPtr > MAPFILEITEMS
A map of pointers to CFileItem.
Definition: FileItem.h:710
std::vector< CFileItemPtr > VECFILEITEMS
A vector of pointer to CFileItem.
Definition: FileItem.h:698
void SetContentLookup(bool enable)
Lookup via HTTP HEAD request might not be needed, use this setter to disable ContentLookup.
Definition: FileItem.h:565
bool m_bIsShareOrDrive
is this a root share/drive
Definition: FileItem.h:618
Definition: Addon.cpp:39
Definition: PictureInfoTag.h:30
Definition: SortUtils.h:176
std::pair< std::string, CFileItemPtr > MAPFILEITEMSPAIR
Pair for MAPFILEITEMS.
Definition: FileItem.h:716
Definition: VideoInfoTag.h:53
Definition: Artist.h:40
Definition: MusicInfoTag.h:27
Definition: IArchivable.h:13
Class to store and read song information from CMusicDatabase.
Definition: Song.h:48
Represents a file on a share.
Definition: FileItem.h:102
void SetEndOffset(const int64_t offset)
Set the end offset.
Definition: FileItem.h:406
Definition: Application.h:77