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 
374  bool IsResumable() const;
375 
381  int64_t GetStartOffset() const { return m_lStartOffset; }
382 
388  void SetStartOffset(const int64_t offset) { m_lStartOffset = offset; }
389 
394  int64_t GetEndOffset() const { return m_lEndOffset; }
395 
400  void SetEndOffset(const int64_t offset) { m_lEndOffset = offset; }
401 
402  inline bool HasPictureInfoTag() const
403  {
404  return m_pictureInfoTag != NULL;
405  }
406 
407  inline const CPictureInfoTag* GetPictureInfoTag() const
408  {
409  return m_pictureInfoTag;
410  }
411 
412  bool HasAddonInfo() const { return m_addonInfo != nullptr; }
413  const std::shared_ptr<const ADDON::IAddon> GetAddonInfo() const { return m_addonInfo; }
414 
415  inline bool HasGameInfoTag() const
416  {
417  return m_gameInfoTag != NULL;
418  }
419 
420  KODI::GAME::CGameInfoTag* GetGameInfoTag();
421 
422  inline const KODI::GAME::CGameInfoTag* GetGameInfoTag() const
423  {
424  return m_gameInfoTag;
425  }
426 
427  CPictureInfoTag* GetPictureInfoTag();
428 
434  std::string GetLocalFanart() const;
435 
443  std::string GetLocalArtBaseFilename() const;
451  std::string GetLocalArtBaseFilename(bool& useFolder) const;
452 
460  std::string GetLocalArt(const std::string& artFile, bool useFolder = false) const;
461 
469  std::string FindLocalArt(const std::string &artFile, bool useFolder) const;
470 
475  bool SkipLocalArt() const;
476 
482  std::string GetThumbHideIfUnwatched(const CFileItem* item) const;
483 
484  // Gets the .tbn file associated with this item
485  std::string GetTBNFile() const;
486  // Gets the folder image associated with this item (defaults to folder.jpg)
487  std::string GetFolderThumb(const std::string &folderJPG = "folder.jpg") const;
488  // Gets the correct movie title
489  std::string GetMovieName(bool bUseFolderNames = false) const;
490 
498  std::string GetBaseMoviePath(bool useFolderNames) const;
499 
500  // Gets the user thumb, if it exists
501  std::string GetUserMusicThumb(bool alwaysCheckRemote = false, bool fallbackToFolder = false) const;
502 
515  std::string GetLocalMetadataPath() const;
516 
517  // finds a matching local trailer file
518  std::string FindTrailer() const;
519 
520  bool LoadMusicTag();
521  bool LoadGameTag();
522 
528  bool LoadDetails();
529 
530  /* Returns the content type of this item if known */
531  const std::string& GetMimeType() const { return m_mimetype; }
532 
533  /* sets the mime-type if known beforehand */
534  void SetMimeType(const std::string& mimetype) { m_mimetype = mimetype; } ;
535 
541  void FillInMimeType(bool lookup = true);
542 
547  bool ContentLookup() { return m_doContentLookup; }
548 
553  void SetMimeTypeForInternetFile();
554 
559  void SetContentLookup(bool enable) { m_doContentLookup = enable; }
560 
561  /* general extra info about the contents of the item, not for display */
562  void SetExtraInfo(const std::string& info) { m_extrainfo = info; }
563  const std::string& GetExtraInfo() const { return m_extrainfo; }
564 
573  void UpdateInfo(const CFileItem &item, bool replaceLabels = true);
574 
581  void MergeInfo(const CFileItem &item);
582 
583  bool IsSamePath(const CFileItem *item) const;
584 
585  bool IsAlbum() const;
586 
591  void SetFromVideoInfoTag(const CVideoInfoTag &video);
592 
597  void SetFromMusicInfoTag(const MUSIC_INFO::CMusicInfoTag &music);
598 
604  void SetFromAlbum(const CAlbum &album);
610  void SetFromSong(const CSong &song);
611 
615  int64_t m_dwSize;
616  std::string m_strDVDLabel;
617  std::string m_strTitle;
618  int m_iprogramCount;
619  int m_idepth;
620  int m_lStartPartNumber;
621  LockType m_iLockMode;
622  std::string m_strLockCode;
623  int m_iHasLock; // 0 - no lock 1 - lock, but unlocked 2 - locked
624  int m_iBadPwdCount;
625 
626  void SetCueDocument(const CCueDocumentPtr& cuePtr);
627  void LoadEmbeddedCue();
628  bool HasCueDocument() const;
629  bool LoadTracksFromCueDocument(CFileItemList& scannedItems);
630 private:
635  void Initialize();
636 
641  CBookmark GetResumePoint() const;
642 
646  void FillMusicInfoTag(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag);
647 
648  std::string m_strPath;
649  std::string m_strDynPath;
650 
651  SortSpecial m_specialSort;
652  bool m_bIsParentFolder;
653  bool m_bCanQueue;
654  bool m_bLabelPreformatted;
655  std::string m_mimetype;
656  std::string m_extrainfo;
657  bool m_doContentLookup;
658  MUSIC_INFO::CMusicInfoTag* m_musicInfoTag;
659  CVideoInfoTag* m_videoInfoTag;
660  std::shared_ptr<PVR::CPVREpgInfoTag> m_epgInfoTag;
661  std::shared_ptr<PVR::CPVREpgSearchFilter> m_epgSearchFilter;
662  std::shared_ptr<PVR::CPVRRecording> m_pvrRecordingInfoTag;
663  std::shared_ptr<PVR::CPVRTimerInfoTag> m_pvrTimerInfoTag;
664  std::shared_ptr<PVR::CPVRChannelGroupMember> m_pvrChannelGroupMemberInfoTag;
665  CPictureInfoTag* m_pictureInfoTag;
666  std::shared_ptr<const ADDON::IAddon> m_addonInfo;
667  KODI::GAME::CGameInfoTag* m_gameInfoTag;
668  EventPtr m_eventLogEntry;
669  bool m_bIsAlbum;
670  int64_t m_lStartOffset;
671  int64_t m_lEndOffset;
672 
673  CCueDocumentPtr m_cueDocument;
674 };
675 
680 typedef std::shared_ptr<CFileItem> CFileItemPtr;
681 
686 typedef std::vector< CFileItemPtr > VECFILEITEMS;
687 
692 typedef std::vector< CFileItemPtr >::iterator IVECFILEITEMS;
693 
698 typedef std::map<std::string, CFileItemPtr > MAPFILEITEMS;
699 
704 typedef std::pair<std::string, CFileItemPtr > MAPFILEITEMSPAIR;
705 
706 typedef bool (*FILEITEMLISTCOMPARISONFUNC) (const CFileItemPtr &pItem1, const CFileItemPtr &pItem2);
707 typedef void (*FILEITEMFILLFUNC) (CFileItemPtr &item);
708 
713 class CFileItemList : public CFileItem
714 {
715 public:
716  enum CACHE_TYPE { CACHE_NEVER = 0, CACHE_IF_SLOW, CACHE_ALWAYS };
717 
718  CFileItemList();
719  explicit CFileItemList(const std::string& strPath);
720  ~CFileItemList() override;
721  void Archive(CArchive& ar) override;
722  CFileItemPtr operator[] (int iItem);
723  const CFileItemPtr operator[] (int iItem) const;
724  CFileItemPtr operator[] (const std::string& strPath);
725  const CFileItemPtr operator[] (const std::string& strPath) const;
726  void Clear();
727  void ClearItems();
728  void Add(CFileItemPtr item);
729  void Add(CFileItem&& item);
730  void AddFront(const CFileItemPtr &pItem, int itemPosition);
731  void Remove(CFileItem* pItem);
732  void Remove(int iItem);
733  CFileItemPtr Get(int iItem) const;
734  const VECFILEITEMS& GetList() const { return m_items; }
735  CFileItemPtr Get(const std::string& strPath) const;
736  int Size() const;
737  bool IsEmpty() const;
738  void Append(const CFileItemList& itemlist);
739  void Assign(const CFileItemList& itemlist, bool append = false);
740  bool Copy (const CFileItemList& item, bool copyItems = true);
741  void Reserve(size_t iCount);
742  void Sort(SortBy sortBy, SortOrder sortOrder, SortAttribute sortAttributes = SortAttributeNone);
743  /* \brief Sorts the items based on the given sorting options
744 
745  In contrast to Sort (see above) this does not change the internal
746  state by storing the sorting method and order used and therefore
747  will always execute the sorting even if the list of items has
748  already been sorted with the same options before.
749  */
750  void Sort(SortDescription sortDescription);
751  void Randomize();
752  void FillInDefaultIcons();
753  int GetFolderCount() const;
754  int GetFileCount() const;
755  int GetSelectedCount() const;
756  int GetObjectCount() const;
757  void FilterCueItems();
758  void RemoveExtensions();
759  void SetIgnoreURLOptions(bool ignoreURLOptions);
760  void SetFastLookup(bool fastLookup);
761  bool Contains(const std::string& fileName) const;
762  bool GetFastLookup() const { return m_fastLookup; }
763 
769  void Stack(bool stackFiles = true);
770 
771  SortOrder GetSortOrder() const { return m_sortDescription.sortOrder; }
772  SortBy GetSortMethod() const { return m_sortDescription.sortBy; }
773  void SetSortOrder(SortOrder sortOrder) { m_sortDescription.sortOrder = sortOrder; }
774  void SetSortMethod(SortBy sortBy) { m_sortDescription.sortBy = sortBy; }
775 
786  bool Load(int windowID = 0);
787 
798  bool Save(int windowID = 0);
799  void SetCacheToDisc(CACHE_TYPE cacheToDisc) { m_cacheToDisc = cacheToDisc; }
800  bool CacheToDiscAlways() const { return m_cacheToDisc == CACHE_ALWAYS; }
801  bool CacheToDiscIfSlow() const { return m_cacheToDisc == CACHE_IF_SLOW; }
811  void RemoveDiscCache(int windowID = 0) const;
812  void RemoveDiscCache(const std::string& cachefile) const;
813  void RemoveDiscCacheCRC(const std::string& crc) const;
814  bool AlwaysCache() const;
815 
816  void Swap(unsigned int item1, unsigned int item2);
817 
822  bool UpdateItem(const CFileItem *item);
823 
824  void AddSortMethod(SortBy sortBy, int buttonLabel, const LABEL_MASKS &labelMasks, SortAttribute sortAttributes = SortAttributeNone);
825  void AddSortMethod(SortBy sortBy, SortAttribute sortAttributes, int buttonLabel, const LABEL_MASKS &labelMasks);
826  void AddSortMethod(SortDescription sortDescription, int buttonLabel, const LABEL_MASKS &labelMasks);
827  bool HasSortDetails() const { return m_sortDetails.size() != 0; }
828  const std::vector<GUIViewSortDetails> &GetSortDetails() const { return m_sortDetails; }
829 
836  void SetSortIgnoreFolders(bool sort) { m_sortIgnoreFolders = sort; }
837  bool GetReplaceListing() const { return m_replaceListing; }
838  void SetReplaceListing(bool replace);
839  void SetContent(const std::string& content) { m_content = content; }
840  const std::string& GetContent() const { return m_content; }
841 
842  void ClearSortState();
843 
844  VECFILEITEMS::iterator begin() { return m_items.begin(); }
845  VECFILEITEMS::iterator end() { return m_items.end(); }
846  VECFILEITEMS::iterator erase(VECFILEITEMS::iterator first, VECFILEITEMS::iterator last);
847  VECFILEITEMS::const_iterator begin() const { return m_items.begin(); }
848  VECFILEITEMS::const_iterator end() const { return m_items.end(); }
849  VECFILEITEMS::const_iterator cbegin() const { return m_items.cbegin(); }
850  VECFILEITEMS::const_iterator cend() const { return m_items.cend(); }
851  std::reverse_iterator<VECFILEITEMS::const_iterator> rbegin() const { return m_items.rbegin(); }
852  std::reverse_iterator<VECFILEITEMS::const_iterator> rend() const { return m_items.rend(); }
853 
854 private:
855  void Sort(FILEITEMLISTCOMPARISONFUNC func);
856  void FillSortFields(FILEITEMFILLFUNC func);
857  std::string GetDiscFileCache(int windowID) const;
858 
863  void StackFiles();
864 
869  void StackFolders();
870 
871  VECFILEITEMS m_items;
872  MAPFILEITEMS m_map;
873  bool m_ignoreURLOptions = false;
874  bool m_fastLookup = false;
875  SortDescription m_sortDescription;
876  bool m_sortIgnoreFolders = false;
877  CACHE_TYPE m_cacheToDisc = CACHE_IF_SLOW;
878  bool m_replaceListing = false;
879  std::string m_content;
880 
881  std::vector<GUIViewSortDetails> m_sortDetails;
882 
883  mutable CCriticalSection m_lock;
884 };
CDateTime m_dateTime
file creation date & time
Definition: FileItem.h:614
Definition: GUIListItem.h:30
int64_t m_dwSize
file size (0 for folders)
Definition: FileItem.h:615
std::shared_ptr< CFileItem > CFileItemPtr
A shared pointer to CFileItem.
Definition: FileItem.h:680
Definition: ContextMenuManager.h:24
std::vector< CFileItemPtr >::iterator IVECFILEITEMS
Iterator for VECFILEITEMS.
Definition: FileItem.h:692
Represents a list of files.
Definition: FileItem.h:713
Definition: URL.h:20
int64_t GetStartOffset() const
Get the offset where start the playback.
Definition: FileItem.h:381
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:836
void SetStartOffset(const int64_t offset)
Set the offset where start the playback.
Definition: FileItem.h:388
Definition: GameInfoTag.h:21
Represents a share.
Definition: MediaSource.h:22
Definition: LabelFormatter.h:21
Definition: Variant.h:29
int64_t GetEndOffset() const
Get the end offset.
Definition: FileItem.h:394
Definition: IEvent.h:26
Definition: ISerializable.h:13
Controller configuration window.
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:613
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:547
Definition: Album.h:26
SortBy
Definition: SortUtils.h:49
std::map< std::string, CFileItemPtr > MAPFILEITEMS
A map of pointers to CFileItem.
Definition: FileItem.h:698
std::vector< CFileItemPtr > VECFILEITEMS
A vector of pointer to CFileItem.
Definition: FileItem.h:686
void SetContentLookup(bool enable)
Lookup via HTTP HEAD request might not be needed, use this setter to disable ContentLookup.
Definition: FileItem.h:559
bool m_bIsShareOrDrive
is this a root share/drive
Definition: FileItem.h:612
Definition: Addon.cpp:39
Definition: PictureInfoTag.h:30
Definition: SortUtils.h:176
std::pair< std::string, CFileItemPtr > MAPFILEITEMSPAIR
Pair for MAPFILEITEMS.
Definition: FileItem.h:704
Definition: VideoInfoTag.h:51
Definition: Artist.h:32
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:400
Definition: Application.h:79