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 IsDiscImage() const;
218  bool IsOpticalMediaFile() const;
219  bool IsDVDFile(bool bVobs = true, bool bIfos = true) const;
220  bool IsBDFile() const;
221  bool IsBluray() const;
222  bool IsProtectedBlurayDisc() const;
223  bool IsRAR() const;
224  bool IsAPK() const;
225  bool IsZIP() const;
226  bool IsCBZ() const;
227  bool IsCBR() const;
228  bool IsISO9660() const;
229  bool IsCDDA() const;
230  bool IsDVD() const;
231  bool IsOnDVD() const;
232  bool IsOnLAN() const;
233  bool IsHD() const;
234  bool IsNfs() const;
235  bool IsRemote() const;
236  bool IsSmb() const;
237  bool IsURL() const;
238  bool IsStack() const;
239  bool IsFavourite() const;
240  bool IsMultiPath() const;
241  bool IsMusicDb() const;
242  bool IsVideoDb() const;
243  bool IsEPG() const;
244  bool IsPVRChannel() const;
245  bool IsPVRChannelGroup() const;
246  bool IsPVRRecording() const;
247  bool IsUsablePVRRecording() const;
248  bool IsDeletedPVRRecording() const;
249  bool IsInProgressPVRRecording() const;
250  bool IsPVRTimer() const;
251  bool IsType(const char *ext) const;
252  bool IsVirtualDirectoryRoot() const;
253  bool IsReadOnly() const;
254  bool CanQueue() const;
255  void SetCanQueue(bool bYesNo);
256  bool IsParentFolder() const;
257  bool IsFileFolder(EFileFolderType types = EFILEFOLDER_MASK_ALL) const;
258  bool IsRemovable() const;
259  bool IsPVR() const;
260  bool IsLiveTV() const;
261  bool IsRSS() const;
262  bool IsAndroidApp() const;
263 
264  void RemoveExtension();
265  void CleanString();
266  void FillInDefaultIcon();
267  void SetFileSizeLabel();
268  void SetLabel(const std::string &strLabel) override;
269  VideoDbContentType GetVideoContentType() const;
270  bool IsLabelPreformatted() const { return m_bLabelPreformatted; }
271  void SetLabelPreformatted(bool bYesNo) { m_bLabelPreformatted=bYesNo; }
272  bool SortsOnTop() const { return m_specialSort == SortSpecialOnTop; }
273  bool SortsOnBottom() const { return m_specialSort == SortSpecialOnBottom; }
274  void SetSpecialSort(SortSpecial sort) { m_specialSort = sort; }
275 
276  inline bool HasMusicInfoTag() const
277  {
278  return m_musicInfoTag != NULL;
279  }
280 
281  MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag();
282 
283  inline const MUSIC_INFO::CMusicInfoTag* GetMusicInfoTag() const
284  {
285  return m_musicInfoTag;
286  }
287 
288  bool HasVideoInfoTag() const;
289 
290  CVideoInfoTag* GetVideoInfoTag();
291 
292  const CVideoInfoTag* GetVideoInfoTag() const;
293 
294  inline bool HasEPGInfoTag() const
295  {
296  return m_epgInfoTag.get() != NULL;
297  }
298 
299  inline const std::shared_ptr<PVR::CPVREpgInfoTag> GetEPGInfoTag() const
300  {
301  return m_epgInfoTag;
302  }
303 
304  bool HasEPGSearchFilter() const { return m_epgSearchFilter != nullptr; }
305 
306  const std::shared_ptr<PVR::CPVREpgSearchFilter> GetEPGSearchFilter() const
307  {
308  return m_epgSearchFilter;
309  }
310 
311  inline bool HasPVRChannelGroupMemberInfoTag() const
312  {
313  return m_pvrChannelGroupMemberInfoTag.get() != nullptr;
314  }
315 
316  inline const std::shared_ptr<PVR::CPVRChannelGroupMember> GetPVRChannelGroupMemberInfoTag() const
317  {
318  return m_pvrChannelGroupMemberInfoTag;
319  }
320 
321  bool HasPVRChannelInfoTag() const;
322  const std::shared_ptr<PVR::CPVRChannel> GetPVRChannelInfoTag() const;
323 
324  inline bool HasPVRRecordingInfoTag() const
325  {
326  return m_pvrRecordingInfoTag.get() != NULL;
327  }
328 
329  inline const std::shared_ptr<PVR::CPVRRecording> GetPVRRecordingInfoTag() const
330  {
331  return m_pvrRecordingInfoTag;
332  }
333 
334  inline bool HasPVRTimerInfoTag() const
335  {
336  return m_pvrTimerInfoTag != NULL;
337  }
338 
339  inline const std::shared_ptr<PVR::CPVRTimerInfoTag> GetPVRTimerInfoTag() const
340  {
341  return m_pvrTimerInfoTag;
342  }
343 
348  CFileItem GetItemToPlay() const;
349 
354  bool IsResumePointSet() const;
355 
360  double GetCurrentResumeTime() const;
361 
368  bool GetCurrentResumeTimeAndPartNumber(int64_t& startOffset, int& partNumber) const;
369 
376  bool IsResumable() const;
377 
383  int64_t GetStartOffset() const { return m_lStartOffset; }
384 
390  void SetStartOffset(const int64_t offset) { m_lStartOffset = offset; }
391 
396  int64_t GetEndOffset() const { return m_lEndOffset; }
397 
402  void SetEndOffset(const int64_t offset) { m_lEndOffset = offset; }
403 
404  inline bool HasPictureInfoTag() const
405  {
406  return m_pictureInfoTag != NULL;
407  }
408 
409  inline const CPictureInfoTag* GetPictureInfoTag() const
410  {
411  return m_pictureInfoTag;
412  }
413 
414  bool HasAddonInfo() const { return m_addonInfo != nullptr; }
415  const std::shared_ptr<const ADDON::IAddon> GetAddonInfo() const { return m_addonInfo; }
416 
417  inline bool HasGameInfoTag() const
418  {
419  return m_gameInfoTag != NULL;
420  }
421 
422  KODI::GAME::CGameInfoTag* GetGameInfoTag();
423 
424  inline const KODI::GAME::CGameInfoTag* GetGameInfoTag() const
425  {
426  return m_gameInfoTag;
427  }
428 
429  CPictureInfoTag* GetPictureInfoTag();
430 
436  std::string GetLocalFanart() const;
437 
445  std::string GetLocalArtBaseFilename() const;
453  std::string GetLocalArtBaseFilename(bool& useFolder) const;
454 
462  std::string GetLocalArt(const std::string& artFile, bool useFolder = false) const;
463 
471  std::string FindLocalArt(const std::string &artFile, bool useFolder) const;
472 
477  bool SkipLocalArt() const;
478 
484  std::string GetThumbHideIfUnwatched(const CFileItem* item) const;
485 
486  // Gets the .tbn file associated with this item
487  std::string GetTBNFile() const;
488  // Gets the folder image associated with this item (defaults to folder.jpg)
489  std::string GetFolderThumb(const std::string &folderJPG = "folder.jpg") const;
490  // Gets the correct movie title
491  std::string GetMovieName(bool bUseFolderNames = false) const;
492 
500  std::string GetBaseMoviePath(bool useFolderNames) const;
501 
502  // Gets the user thumb, if it exists
503  std::string GetUserMusicThumb(bool alwaysCheckRemote = false, bool fallbackToFolder = false) const;
504 
517  std::string GetLocalMetadataPath() const;
518 
519  // finds a matching local trailer file
520  std::string FindTrailer() const;
521 
522  bool LoadMusicTag();
523  bool LoadGameTag();
524 
530  bool LoadDetails();
531 
532  /* Returns the content type of this item if known */
533  const std::string& GetMimeType() const { return m_mimetype; }
534 
535  /* sets the mime-type if known beforehand */
536  void SetMimeType(const std::string& mimetype) { m_mimetype = mimetype; } ;
537 
543  void FillInMimeType(bool lookup = true);
544 
549  bool ContentLookup() { return m_doContentLookup; }
550 
555  void SetMimeTypeForInternetFile();
556 
561  void SetContentLookup(bool enable) { m_doContentLookup = enable; }
562 
563  /* general extra info about the contents of the item, not for display */
564  void SetExtraInfo(const std::string& info) { m_extrainfo = info; }
565  const std::string& GetExtraInfo() const { return m_extrainfo; }
566 
575  void UpdateInfo(const CFileItem &item, bool replaceLabels = true);
576 
583  void MergeInfo(const CFileItem &item);
584 
585  bool IsSamePath(const CFileItem *item) const;
586 
587  bool IsAlbum() const;
588 
593  void SetFromVideoInfoTag(const CVideoInfoTag &video);
594 
599  void SetFromMusicInfoTag(const MUSIC_INFO::CMusicInfoTag &music);
600 
606  void SetFromAlbum(const CAlbum &album);
612  void SetFromSong(const CSong &song);
613 
617  int64_t m_dwSize;
618  std::string m_strDVDLabel;
619  std::string m_strTitle;
620  int m_iprogramCount;
621  int m_idepth;
622  int m_lStartPartNumber;
623  LockType m_iLockMode;
624  std::string m_strLockCode;
625  int m_iHasLock; // 0 - no lock 1 - lock, but unlocked 2 - locked
626  int m_iBadPwdCount;
627 
628  void SetCueDocument(const CCueDocumentPtr& cuePtr);
629  void LoadEmbeddedCue();
630  bool HasCueDocument() const;
631  bool LoadTracksFromCueDocument(CFileItemList& scannedItems);
632 private:
637  void Initialize();
638 
643  void UpdateMimeType(bool lookup = true);
644 
649  CBookmark GetResumePoint() const;
650 
654  void FillMusicInfoTag(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag);
655 
656  std::string m_strPath;
657  std::string m_strDynPath;
658 
659  SortSpecial m_specialSort;
660  bool m_bIsParentFolder;
661  bool m_bCanQueue;
662  bool m_bLabelPreformatted;
663  std::string m_mimetype;
664  std::string m_extrainfo;
665  bool m_doContentLookup;
666  MUSIC_INFO::CMusicInfoTag* m_musicInfoTag;
667  CVideoInfoTag* m_videoInfoTag;
668  std::shared_ptr<PVR::CPVREpgInfoTag> m_epgInfoTag;
669  std::shared_ptr<PVR::CPVREpgSearchFilter> m_epgSearchFilter;
670  std::shared_ptr<PVR::CPVRRecording> m_pvrRecordingInfoTag;
671  std::shared_ptr<PVR::CPVRTimerInfoTag> m_pvrTimerInfoTag;
672  std::shared_ptr<PVR::CPVRChannelGroupMember> m_pvrChannelGroupMemberInfoTag;
673  CPictureInfoTag* m_pictureInfoTag;
674  std::shared_ptr<const ADDON::IAddon> m_addonInfo;
675  KODI::GAME::CGameInfoTag* m_gameInfoTag;
676  EventPtr m_eventLogEntry;
677  bool m_bIsAlbum;
678  int64_t m_lStartOffset;
679  int64_t m_lEndOffset;
680 
681  CCueDocumentPtr m_cueDocument;
682 };
683 
688 typedef std::shared_ptr<CFileItem> CFileItemPtr;
689 
694 typedef std::vector< CFileItemPtr > VECFILEITEMS;
695 
700 typedef std::vector< CFileItemPtr >::iterator IVECFILEITEMS;
701 
706 typedef std::map<std::string, CFileItemPtr > MAPFILEITEMS;
707 
712 typedef std::pair<std::string, CFileItemPtr > MAPFILEITEMSPAIR;
713 
714 typedef bool (*FILEITEMLISTCOMPARISONFUNC) (const CFileItemPtr &pItem1, const CFileItemPtr &pItem2);
715 typedef void (*FILEITEMFILLFUNC) (CFileItemPtr &item);
716 
721 class CFileItemList : public CFileItem
722 {
723 public:
724  enum CACHE_TYPE { CACHE_NEVER = 0, CACHE_IF_SLOW, CACHE_ALWAYS };
725 
726  CFileItemList();
727  explicit CFileItemList(const std::string& strPath);
728  ~CFileItemList() override;
729  void Archive(CArchive& ar) override;
730  CFileItemPtr operator[] (int iItem);
731  const CFileItemPtr operator[] (int iItem) const;
732  CFileItemPtr operator[] (const std::string& strPath);
733  const CFileItemPtr operator[] (const std::string& strPath) const;
734  void Clear();
735  void ClearItems();
736  void Add(CFileItemPtr item);
737  void Add(CFileItem&& item);
738  void AddFront(const CFileItemPtr &pItem, int itemPosition);
739  void Remove(CFileItem* pItem);
740  void Remove(int iItem);
741  CFileItemPtr Get(int iItem) const;
742  const VECFILEITEMS& GetList() const { return m_items; }
743  CFileItemPtr Get(const std::string& strPath) const;
744  int Size() const;
745  bool IsEmpty() const;
746  void Append(const CFileItemList& itemlist);
747  void Assign(const CFileItemList& itemlist, bool append = false);
748  bool Copy (const CFileItemList& item, bool copyItems = true);
749  void Reserve(size_t iCount);
750  void Sort(SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone);
751  /* \brief Sorts the items based on the given sorting options
752 
753  In contrast to Sort (see above) this does not change the internal
754  state by storing the sorting method and order used and therefore
755  will always execute the sorting even if the list of items has
756  already been sorted with the same options before.
757  */
758  void Sort(SortDescription sortDescription);
759  void Randomize();
760  void FillInDefaultIcons();
761  int GetFolderCount() const;
762  int GetFileCount() const;
763  int GetSelectedCount() const;
764  int GetObjectCount() const;
765  void FilterCueItems();
766  void RemoveExtensions();
767  void SetIgnoreURLOptions(bool ignoreURLOptions);
768  void SetFastLookup(bool fastLookup);
769  bool Contains(const std::string& fileName) const;
770  bool GetFastLookup() const { return m_fastLookup; }
771 
777  void Stack(bool stackFiles = true);
778 
779  SortOrder GetSortOrder() const { return m_sortDescription.sortOrder; }
780  SortBy GetSortMethod() const { return m_sortDescription.sortBy; }
781  void SetSortOrder(SortOrder sortOrder) { m_sortDescription.sortOrder = sortOrder; }
782  void SetSortMethod(SortBy sortBy) { m_sortDescription.sortBy = sortBy; }
783 
794  bool Load(int windowID = 0);
795 
806  bool Save(int windowID = 0);
807  void SetCacheToDisc(CACHE_TYPE cacheToDisc) { m_cacheToDisc = cacheToDisc; }
808  bool CacheToDiscAlways() const { return m_cacheToDisc == CACHE_ALWAYS; }
809  bool CacheToDiscIfSlow() const { return m_cacheToDisc == CACHE_IF_SLOW; }
819  void RemoveDiscCache(int windowID = 0) const;
820  void RemoveDiscCache(const std::string& cachefile) const;
821  void RemoveDiscCacheCRC(const std::string& crc) const;
822  bool AlwaysCache() const;
823 
824  void Swap(unsigned int item1, unsigned int item2);
825 
830  bool UpdateItem(const CFileItem *item);
831 
832  void AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes = SortAttributeNone);
833  void AddSortMethod(SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks);
834  void AddSortMethod(SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks);
835  bool HasSortDetails() const { return m_sortDetails.size() != 0; }
836  const std::vector<GUIViewSortDetails> &GetSortDetails() const { return m_sortDetails; }
837 
844  void SetSortIgnoreFolders(bool sort) { m_sortIgnoreFolders = sort; }
845  bool GetReplaceListing() const { return m_replaceListing; }
846  void SetReplaceListing(bool replace);
847  void SetContent(const std::string& content) { m_content = content; }
848  const std::string& GetContent() const { return m_content; }
849 
850  void ClearSortState();
851 
852  VECFILEITEMS::iterator begin() { return m_items.begin(); }
853  VECFILEITEMS::iterator end() { return m_items.end(); }
854  VECFILEITEMS::iterator erase(VECFILEITEMS::iterator first, VECFILEITEMS::iterator last);
855  VECFILEITEMS::const_iterator begin() const { return m_items.begin(); }
856  VECFILEITEMS::const_iterator end() const { return m_items.end(); }
857  VECFILEITEMS::const_iterator cbegin() const { return m_items.cbegin(); }
858  VECFILEITEMS::const_iterator cend() const { return m_items.cend(); }
859  std::reverse_iterator<VECFILEITEMS::const_iterator> rbegin() const { return m_items.rbegin(); }
860  std::reverse_iterator<VECFILEITEMS::const_iterator> rend() const { return m_items.rend(); }
861 
862 private:
863  void Sort(FILEITEMLISTCOMPARISONFUNC func);
864  void FillSortFields(FILEITEMFILLFUNC func);
865  std::string GetDiscFileCache(int windowID) const;
866 
871  void StackFiles();
872 
877  void StackFolders();
878 
879  VECFILEITEMS m_items;
880  MAPFILEITEMS m_map;
881  bool m_ignoreURLOptions = false;
882  bool m_fastLookup = false;
883  SortDescription m_sortDescription;
884  bool m_sortIgnoreFolders = false;
885  CACHE_TYPE m_cacheToDisc = CACHE_IF_SLOW;
886  bool m_replaceListing = false;
887  std::string m_content;
888 
889  std::vector<GUIViewSortDetails> m_sortDetails;
890 
891  mutable CCriticalSection m_lock;
892 };
CDateTime m_dateTime
file creation date & time
Definition: FileItem.h:616
Definition: GUIListItem.h:30
int64_t m_dwSize
file size (0 for folders)
Definition: FileItem.h:617
std::shared_ptr< CFileItem > CFileItemPtr
A shared pointer to CFileItem.
Definition: FileItem.h:688
Definition: ContextMenuManager.h:24
std::vector< CFileItemPtr >::iterator IVECFILEITEMS
Iterator for VECFILEITEMS.
Definition: FileItem.h:700
Represents a list of files.
Definition: FileItem.h:721
Definition: URL.h:21
int64_t GetStartOffset() const
Get the offset where start the playback.
Definition: FileItem.h:383
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:844
void SetStartOffset(const int64_t offset)
Set the offset where start the playback.
Definition: FileItem.h:390
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:396
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:615
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:549
Definition: Album.h:26
SortBy
Definition: SortUtils.h:49
std::map< std::string, CFileItemPtr > MAPFILEITEMS
A map of pointers to CFileItem.
Definition: FileItem.h:706
std::vector< CFileItemPtr > VECFILEITEMS
A vector of pointer to CFileItem.
Definition: FileItem.h:694
void SetContentLookup(bool enable)
Lookup via HTTP HEAD request might not be needed, use this setter to disable ContentLookup.
Definition: FileItem.h:561
bool m_bIsShareOrDrive
is this a root share/drive
Definition: FileItem.h:614
Definition: Addon.cpp:39
Definition: PictureInfoTag.h:30
Definition: SortUtils.h:176
std::pair< std::string, CFileItemPtr > MAPFILEITEMSPAIR
Pair for MAPFILEITEMS.
Definition: FileItem.h:712
Definition: VideoInfoTag.h:51
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:402
Definition: Application.h:79