annotate src/modplug/archive/open.cxx @ 3203:f5456241bff9 default tip

changed include path from audacious to audlegacy.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 10 Nov 2009 05:19:25 +0900
parents 996281c0a457
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
1 /* Modplug XMMS Plugin
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 * Authors: Kenton Varda <temporal@gauge3d.org>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
3 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
4 * This source code is public domain.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
5 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
6
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
7 #include "open.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
8 #include "arch_raw.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
9 #include "arch_gzip.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
10 #include "arch_zip.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
11 #include "arch_rar.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
12 #include "arch_bz2.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
13
2456
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
14 Archive* OpenArchive(const string& aFileName) //aFilename is url --yaz
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
15 {
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
16 // TODO: archive support in Modplug plugin is broken - it uses popen() call and Unix commandline tools for that.
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
17 // Plus Modplug allows only one audio file per archive which is wrong anyway.
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
18
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
19 string lExt;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
20 uint32 lPos;
2456
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
21 // convert from uri to fs based filepath
2689
996281c0a457 Add a NULL check to avoid an idiotic crash. (This bug also revealed a
Matti Hamalainen <ccr@tnsp.org>
parents: 2564
diff changeset
22 gchar *filename = g_filename_from_uri(aFileName.c_str(), NULL, NULL);
996281c0a457 Add a NULL check to avoid an idiotic crash. (This bug also revealed a
Matti Hamalainen <ccr@tnsp.org>
parents: 2564
diff changeset
23 if (filename == NULL)
996281c0a457 Add a NULL check to avoid an idiotic crash. (This bug also revealed a
Matti Hamalainen <ccr@tnsp.org>
parents: 2564
diff changeset
24 return new arch_Raw(aFileName);
2456
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
25 string lRealFileName(filename);
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
26 g_free(filename);
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
27
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
28 lPos = lRealFileName.find_last_of('.');
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
29 if(lPos <= lRealFileName.length() && aFileName.find("file://") == 0)
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
30 {
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
31 lExt = lRealFileName.substr(lPos);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
32 for(uint32 i = 0; i < lExt.length(); i++)
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
33 lExt[i] = tolower(lExt[i]);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
34
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
35 if (lExt == ".mdz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
36 return new arch_Zip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
37 if (lExt == ".mdr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
38 return new arch_Rar(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
39 if (lExt == ".mdgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
40 return new arch_Gzip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
41 if (lExt == ".mdbz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
42 return new arch_Bzip2(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
43 if (lExt == ".s3z")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
44 return new arch_Zip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
45 if (lExt == ".s3r")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
46 return new arch_Rar(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
47 if (lExt == ".s3gz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
48 return new arch_Gzip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
49 if (lExt == ".xmz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
50 return new arch_Zip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
51 if (lExt == ".xmr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
52 return new arch_Rar(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
53 if (lExt == ".xmgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
54 return new arch_Gzip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
55 if (lExt == ".itz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
56 return new arch_Zip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
57 if (lExt == ".itr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
58 return new arch_Rar(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
59 if (lExt == ".itgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
60 return new arch_Gzip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
61 if (lExt == ".zip")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
62 return new arch_Zip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
63 if (lExt == ".rar")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
64 return new arch_Rar(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
65 if (lExt == ".gz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
66 return new arch_Gzip(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
67 if (lExt == ".bz2")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
68 return new arch_Bzip2(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
69 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
70
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
71 return new arch_Raw(aFileName);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
72 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
73
2456
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
74 bool ContainsMod(const string& aFileName) //aFilename is url --yaz
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
75 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
76 string lExt;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
77 uint32 lPos;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
78
2456
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
79 // convert from uri to fs based filepath
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
80 gchar *filename;
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
81 filename = g_filename_from_uri(aFileName.c_str(), NULL, NULL);
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
82 string lRealFileName(filename);
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
83 g_free(filename);
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
84
e67bce91d70c revive support for zip and other archive formats. T.M aka teknocat pointed out this problem and provided preliminary patch.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 12
diff changeset
85 lPos = lRealFileName.find_last_of('.');
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
86 if(lPos <= lRealFileName.length() && aFileName.find("file://") == 0)
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
87 {
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
88 lExt = lRealFileName.substr(lPos);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
89 for(uint32 i = 0; i < lExt.length(); i++)
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
90 lExt[i] = tolower(lExt[i]);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
91
2564
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
92 if (lExt == ".mdz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
93 return arch_Zip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
94 if (lExt == ".mdr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
95 return arch_Rar::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
96 if (lExt == ".mdgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
97 return arch_Gzip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
98 if (lExt == ".mdbz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
99 return arch_Bzip2::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
100 if (lExt == ".s3z")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
101 return arch_Zip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
102 if (lExt == ".s3r")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
103 return arch_Rar::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
104 if (lExt == ".s3gz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
105 return arch_Gzip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
106 if (lExt == ".xmz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
107 return arch_Zip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
108 if (lExt == ".xmr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
109 return arch_Rar::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
110 if (lExt == ".xmgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
111 return arch_Gzip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
112 if (lExt == ".itz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
113 return arch_Zip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
114 if (lExt == ".itr")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
115 return arch_Rar::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
116 if (lExt == ".itgz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
117 return arch_Gzip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
118 if (lExt == ".zip")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
119 return arch_Zip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
120 if (lExt == ".rar")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
121 return arch_Rar::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
122 if (lExt == ".gz")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
123 return arch_Gzip::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
124 if (lExt == ".bz2")
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
125 return arch_Bzip2::ContainsMod(lRealFileName);
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
126 }
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
127
b24eda79942b Fixes to ModPlug plugin - don't allow song to loop infinitely, correct loading from archive.
Sergiy Pylypenko <x.pelya.x@gmail.com>
parents: 2456
diff changeset
128 return arch_Raw::ContainsMod(aFileName);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
129 }